-1

Leveldb can only run at single process.

why Ethereum can run p2p, create block, rpc server at the same time, and the leveldb no lock?

0

All the modules you mention: p2p, blocks, rpc, etc, are executed inside a unique process: geth.

Inside geth the different modules have access to leveldb synchronized through mutexes and other synchronization primitives like locks.

-1

When you run a key-value-store like levelDb, the bottleneck is not the CPU-usage but the disc-IO. So it does not matter if you use 1 or more processes to handle the sets and gets, but mostly the speed of the hard-drive is relevant.

  • This doesn't answer how geth access to leveldb. – Ismael Jul 28 '18 at 2:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.