Aerospike requires a big virtual memory, where is the memory used?


The Administrator guide suggest a minimum of 4G of DRAM. By the top command on Ubuntu, we can see virtual memory usage is more than 5G on solo node. Furthermore, threads info shows: more than 2G memory is used by as_netio_th thread. However, I cannot find where is the memory used in source code.

Any reply will appreciated from you!

On enterprise versions, the primary index memory is allocated in 1 GiB slabs, so the size of the index is at minimum 1GiB. Each index entry occupies 64 Bytes of ram, each object is tracked by an index entry. Then if you are data-in-memory or using storage-engine memory there will be additional overhead.

You mention the Administrator Sizing Guide, are you referring to this Sizing Guide?

Here I am not use enterprise versions.I do some tests on Aerospike Community Edition build 3.6.3 os Ubuntu 12.04. By execution of linux top command, we can see asd will use about 5G virtual memory as follows:

28342 root      20   0 5245288  64160   1464 S   5.6  3.6   0:02.53 asd

So where I can modify the memory usage in the source code or configuration files in order to reduce memory uasge on Aerospike Community Edition.

I have tried to change aerospike.conf all of the namespace memory size from 4G to 1G, but it did not work.

From your top output, Aerospike is using 64 MiB. The server has Allocated 5 GiB but Linux withholds much of that until the server actually uses it. I am not aware of any configuration to reduce the memory consumption of netio.

Our data is not that big, so we want to do some memory tuning. If I want to reduce the 5GiB memory allocated by server to, for example, 2GiB, how could I do it? Could I reduce the primary and secondary index memory? If I modify server source code of community edition and recompile it in order to to reduce memory allocation, where should I start from?

Aerospike is optimized for large scale deployments, so it’s unusual to be working around 2Gib overall limitation. However, the community version have no limitation for running with 2Gib, as long as the data size fits.

I would recommend looking at the sizing calculation that @kporter pointed out to make sure data fits. Given that as_netio_th is involved, looking at secondary index usage sizing would be important.

Aerospike support large database.I would run the aerospike purely in 2GiB memory.If I use community version,How could I configure the memory to 2Gib?,I want to reduce virtual memory that asd use to 2GiB.Is it possible to do it by configuration or customize the community version for our own requirement.