[DRBD-user] Summarizing DRBD memory usage

Iustin Pop iustin at google.com
Thu Jul 24 11:02:16 CEST 2008

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


There have been lately some very good threads about DRBD memory usage.
I'd like to ask if, after this, my understanding about the total memory
usage is correct.

If I understand correctly, we have:
  - per-TB 32MB of memory used, statically, independent of over how many
    DRBD minors it is spread
  - a per-minor usage of up to:
    - sndbuf-size for the TCP connection (can be ignored)
    - PAGE_SIZE * max_buffers
    - probably some other small values (kernel structures or such) which
      can be ignored for normal cases

This means, a 1TB device with the defaults of sndbuf-size 132KB and
max_buffers 2048 will use (at max, e.g. during resync):
  - 32MB for bitmap
  - 132KB for TCP connection
  - 8MB for the buffers

I.e. this is ~40MB.

On the other hand, a 1TB device split over 8 x 128MB, will have 32MB +
8x8MB =~ 96MB.

Is this correct?

thank you!
iustin



More information about the drbd-user mailing list