Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Node Production Chain occupies too much memory #2662

Open
Geo0426 opened this issue Apr 4, 2023 · 1 comment
Open

Multiple Node Production Chain occupies too much memory #2662

Geo0426 opened this issue Apr 4, 2023 · 1 comment

Comments

@Geo0426
Copy link

Geo0426 commented Apr 4, 2023

Blockchain occupies too much memory

Does parameter dev_ block_ interval_ ms only take effect in dev mode?

I chose the test mode, but I don't know how to reduce the block out time. My server has limited memory, and I don't know the reason for the high memory usage. I guess it's because the mining speed is too fast (possibly).

What should I do to reduce memory usage?

Sorry, my current server resources are limited. So I want to know how I can reduce the memory usage of independent chain. Should I modify the configuration file?

conflux.log

2023-04-04T10:03:28.824010219+08:00 WARN IO Worker #2 network::ser - No peers connected at this moment, 1 pending + 0 started
2023-04-04T10:03:28.824049441+08:00 INFO IO Worker #1 cfxcore::syn - Catch-up mode: false, latest epoch: 407 missing_bodies: 0
2023-04-04T10:03:28.902911961+08:00 INFO mining cfxcore::syn - Mined block 0xc82f2783c3207a379cfa9b6219e2748880430f1e21f745ce45eb847f27e55e20 header=BlockHeader { rlp_part: BlockHeaderRlpPart { parent_hash: 0xfe104eaa03a4c5da92f77461218c97f3bcb6ebfee39ba37390015c5f299f4167, height: 408, timestamp: 1680573808, author: 0x174b46fc33fcd702db97871183a882e1f9172f94, transactions_root: 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470, deferred_state_root: 0xae20b2ede475b5c72490f995adf15a5b19670d138cea7dc3404c7b2064163c08, deferred_receipts_root: 0x09f8709ea9f344a810811a373b30861568f5686e649d6177fd92ea2db7477508, deferred_logs_bloom_hash: 0xd397b3b043d87fcd6fad1291ff0bfd16401c274896d8c63a923727f077b8e0b5, blame: 0, difficulty: 4, adaptive: false, gas_limit: 30000000, referee_hashes: [], custom: [], nonce: 15116217592705301801 }, hash: Some(0xc82f2783c3207a379cfa9b6219e2748880430f1e21f745ce45eb847f27e55e20), pow_hash: None, approximated_rlp_size: 352 }
2023-04-04T10:03:28.993693415+08:00 INFO mining cfxcore::syn - Mined block 0xa0f68944d8aadca8d21bd24a8047553d4de64df481187fb675974023f03f1943 header=BlockHeader { rlp_part: BlockHeaderRlpPart { parent_hash: 0xc82f2783c3207a379cfa9b6219e2748880430f1e21f745ce45eb847f27e55e20, height: 409, timestamp: 1680573808, author: 0x174b46fc33fcd702db97871183a882e1f9172f94, transactions_root: 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470, deferred_state_root: 0x40d422654c680af813ce0cebadcd2d32a847a1fa79f506ee5bc3d3ea408692ee, deferred_receipts_root: 0x09f8709ea9f344a810811a373b30861568f5686e649d6177fd92ea2db7477508, deferred_logs_bloom_hash: 0xd397b3b043d87fcd6fad1291ff0bfd16401c274896d8c63a923727f077b8e0b5, blame: 0, difficulty: 4, adaptive: false, gas_limit: 30000000, referee_hashes: [], custom: [], nonce: 6398255997441759358 }, hash: Some(0xa0f68944d8aadca8d21bd24a8047553d4de64df481187fb675974023f03f1943), pow_hash: None, approximated_rlp_size: 352 }
2023-04-04T10:03:29.114341123+08:00 INFO mining cfxcore::syn - Mined block 0xc375d8c6c1fd28716a3ea53d69d350eab1af0c4347888587e5834152a6407b5a header=BlockHeader { rlp_part: BlockHeaderRlpPart { parent_hash: 0xa0f68944d8aadca8d21bd24a8047553d4de64df481187fb675974023f03f1943, height: 410, timestamp: 1680573809, author: 0x174b46fc33fcd702db97871183a882e1f9172f94, transactions_root: 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470, deferred_state_root: 0x9d8f3d8eef85d03d17ece7aa739ab9c4af55b7bc7f4f85ce65614293585436a9, deferred_receipts_root: 0x09f8709ea9f344a810811a373b30861568f5686e649d6177fd92ea2db7477508, deferred_logs_bloom_hash: 0xd397b3b043d87fcd6fad1291ff0bfd16401c274896d8c63a923727f077b8e0b5, blame: 0, difficulty: 4, adaptive: false, gas_limit: 30000000, referee_hashes: [], custom: [], nonce: 11452726266917030730 }, hash: Some(0xc375d8c6c1fd28716a3ea53d69d350eab1af0c4347888587e5834152a6407b5a), pow_hash: None, approximated_rlp_size: 352 }
2023-04-04T10:03:29.205182073+08:00 INFO mining cfxcore::syn - Mined block 0xcb19c6dddf640cf5b3d74c0023934ee20a775c57f0133b9b3282204092fada25 header=BlockHeader { rlp_part: BlockHeaderRlpPart { parent_hash: 0xc375d8c6c1fd28716a3ea53d69d350eab1af0c4347888587e5834152a6407b5a, height: 411, timestamp: 1680573809, author: 0x174b46fc33fcd702db97871183a882e1f9172f94, transactions_root: 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470, deferred_state_root: 0x31bba6fe1fc66b8b4e081c2e5faf859d79bfcefbe4a518989277a0ee67527c3f, deferred_receipts_root: 0x09f8709ea9f344a810811a373b30861568f5686e649d6177fd92ea2db7477508, deferred_logs_bloom_hash: 0xd397b3b043d87fcd6fad1291ff0bfd16401c274896d8c63a923727f077b8e0b5, blame: 0, difficulty: 4, adaptive: false, gas_limit: 30000000, referee_hashes: [], custom: [], nonce: 5754150310821372984 }, hash: Some(0xcb19c6dddf640cf5b3d74c0023934ee20a775c57f0133b9b3282204092fada25), pow_hash: None, approximated_rlp_size: 352 }

@peilun-conflux
Copy link
Contributor

  1. dev_block_interval_ms only takes effects in dev mode where blocks are generated with fixed interval for a single server.

  2. By default a single node takes up to 13GB memory and the suggested memory requirement is 16GB. To reduce the memory usage, you could adjust the following performance-related cache configurations: ledger_cache_size, rocksdb_cache_size, and several storage_delta_mpts_cache_*_size. You can try to reduce them all by the same ratio to see if the memory usage changes. Other consensus-related configurations dev_snapshot_epoch_count (2000) and era_epoch_count (20000) could also be reduced, but this may lead to unexpected crash if not configured properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants