3

What does the output of the RPC call getmemoryinfo actually mean? For example, this is from my node running in Docker. Does that mean the bitcoind process inside the container is only using 64272 bytes of memory? That's only 64k, that can't be correct, right?

{
  "result": {
    "locked": {
      "used": 64272,
      "free": 1264,
      "total": 65536,
      "locked": 65536,
      "chunks_used": 2002,
      "chunks_free": 2
    }
  },
  "error": null,
  "id": "curltest"
}

These are the processes inside the container.

/ $ ps -a
PID   USER     TIME  COMMAND
    1 bitcoind 12:52 bitcoind -zmqpubrawblock=tcp://0.0.0.0:28332 -zmqpubrawtx=tcp://0.0.0.0:28333
   43 bitcoind  0:00 /bin/sh
   51 bitcoind  0:00 ps -a
4

It is reporting the memory statistics of the locked memory pool, not all memory used in general.

The locked pool is used to store private keys and other security-sensitive material. Bitcoin Core requests from the OS that the memory used by this locked pool is not swapped out, to prevent it from ending up on a swapfile/swap partition on disk.

1
  • thanks for this info. I see that running cat /proc/$PID/status | grep VmLck returns VmLck: 64 kB, which is in-line with the 65536 I saw earlier. – Logan M. Jan 26 at 20:39

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.