Summary buffers size is greater than free memory according to documentation?

Hello, while configuring the server, I figured out an interesting thing.

From documentation

This is in pages, 8K per page
NumberOfBuffers = (Free Memory * 0.66)/8000
MaxDirtyBuffers (3/4 of NumberOfBuffers)

Then

NumberOfBuffers = 66% of memory
MaxDirtyBuffers = 66% * 3/4 = 49,5% of memory

What equals to

66% (NumberOfBuffers) + 49,5% (MaxDirtyBuffers) > 100% free memory. Out of memory!

Buffers are greater than free memory
Can you explain to me, please, where am I wrong, or is it a mistake in documentation?

And… Virtuoso probably needs additional memory for executing and compiling queries? Or this additional memory is included in NumberOfBuffers?

PS: our Virtuoso instance works fine with such instructions, I only want to understand the mechanism

MaxDirtyBuffers does not allocate additional memory.

The MaxDirtyBuffers param represents the maximum number of NumberOfBuffers that are allowed to be “dirty” (i.e., have changes in memory, not yet stored on disk), which is why it is a percentage (i.e., 75% of NumberOfBuffers) before they are flushed/written to disk.

Thank you, @hwilliams

Could you describe the behaviour of buffers, if we do bulk upload and all the buffers are already taken?

Does Virtuoso free some buffers and take dirty buffers instead?
Or it wouldn’t make any dirty buffers in this case?

Thank you!
Stas

It all buffers are used, then Virtuoso will start using the the Linux swap space on disk to swap buffers in and out of RAM. This is why the performance degrades when all buffers are used, because of the need to start swapping in and out of memory.

Dirty Buffers is not related to used buffers; as stated previously, these are buffers that are in use that have changes which have not been committed to the Virtuoso database file on disk – which is separate from swap space.