Lisk-sdk: Resolve memory leaks

Created on 8 Dec 2017  路  1Comment  路  Source: LiskHQ/lisk-sdk

Devnet tests of 1.0.0 version revealed memory leaks while operating on 10 nodes. Average memory consumption was raising linearly on every machine.

Further investigation (performing heap snapshots of running Lisk Core instances being part of Devnet) lead into the observation that backing_store [JSArrayBufferData] variable of bson library consumes 40% of 130 MB total memory used by the application.

Usage of bson library was introduced to 1.0.0 codebase as a part of #541 - Use binary format. Connecting the node without block serialization/deserialization to Devnet resulted in eliminating of linearly increasing memory consumption on the hosting machine.

Blocks serialization/deserialization to binary format needs to be re-reviewed to spot and resolve potential memory leaks problems.

bug

Most helpful comment

Analyze of heap snapshots taken from nodes running 1.0.0 devnet, revealed an issue with storing huge amounts of RPC calls in memory.
screen shot 2018-02-01 at 12 14 37
The issue is caused by wamp-socket-cluster library which uses lodash.get and lodash.set functions to access/store performed RPC calls. The further description is provided in issue description: https://github.com/LiskHQ/wamp-socket-cluster/issues/24. After eliminating the cause in wamp-socket-cluster library, this issue should be closed by updating the wamp-socket-cluster version.

>All comments

Analyze of heap snapshots taken from nodes running 1.0.0 devnet, revealed an issue with storing huge amounts of RPC calls in memory.
screen shot 2018-02-01 at 12 14 37
The issue is caused by wamp-socket-cluster library which uses lodash.get and lodash.set functions to access/store performed RPC calls. The further description is provided in issue description: https://github.com/LiskHQ/wamp-socket-cluster/issues/24. After eliminating the cause in wamp-socket-cluster library, this issue should be closed by updating the wamp-socket-cluster version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaciejBaj picture MaciejBaj  路  3Comments

ScrewchMcMuffin picture ScrewchMcMuffin  路  3Comments

ManuGowda picture ManuGowda  路  3Comments

willclarktech picture willclarktech  路  4Comments

yatki picture yatki  路  3Comments