Can't stop CB from swapping with lots of small objects
Hello,
I'm running CB dev preview. My objects are really little. In fact, my keys are exactly 10 chars and my values are exactly 10 chars.
I'm inserting using Cache::Memcache:Fast (perl) using noreply. With noreply=1, I get about 25K-50K writes/sec. With noreply=0 I get about 2-3K writes/sec. Not sure if any of that is relevant.
However, after about 10M objects, the server starts to swap hard and gets crazy slow (obviously).
Servers have 6G of real memory. Used the default on setup which was about 4G of memory. 2 Servers (identical) in cluster.
I also get errors like this:
[10:35:43] - Metadata overhead warning. Over 50% of RAM allocated to bucket "default" on node "10.38.20.203" is taken up by keys and metadata.
I'm expecting to insert a **few hundred million keys**. I'm expecting most of this to be on disk. Server uses only SSDs.
Any suggestions for me? Is it just crazy for me to try to store this much data? I feel like the "overhead" data is really way to high. The amount of memory used by the number of keys doesn't work out to the 20 characters stored per object :/
Thanks!
-Brett
The meta data overhead is 72 bytes + keylength. This means that if your values are small then your meta data will most likely take up more space then your values. We do have customers who are using Couchbase similarly to you though so you are certainly not doing anything crazy.
Right now we require all meta data to be stored in memory permanently. Future versions of Couchbase will allow meta data to be persisted to disk and evicted from memory.