Couchbase v1.8, CentOs 5.6
When disk cache fill all available memory, Couchbase starts to save data on disk instead of using memory that allocated to disk cache. And this is cause performance problems on my application.
Also i don't know why disk cache is used when all data saved in memory, and there are no disk read?
Few days ago a got problem with Couchbase server. When i look at the stats i saw that server had no free RAM. 30% was filled with Couchbase, and else 70% with disk cache. Normally applications can use memory that allocated for disk cache but Couchbase seems to me not, because it started to save data directly to the disk. Because of this greatly increased disk reads and performance goes down.
For now i setup cron to flush disk cache every day. But by the day disk cache growing very vest. Server only used for Couchbase and don't have any disk heavy operation. So problem that Couchbase don't reuse memory allocated for disk cache as it should.
Clearing cache really helps, in other way i got to many errors on get requests.
My server have 24GB Ram. Couchbase using 10GB and i didn't add any additional memory.
I'm clearing disk cache like this:echo 3 > /proc/sys/vm/drop_caches
Bucket quota is 20GB, 2 Couchbase server 1.8 with 10GB. I have only one, default bucket.
On Mon, Dec 17, 2012 at 11:46 AM, Andrey Nikishaev <cre...@gmail.com> wrote:
I'm clearing disk cache like this:echo 3 > /proc/sys/vm/drop_caches
Something is weird. Can you elaborate exactly how it helps? Is that something measurable ?
I have cluster with two servers by 10GB each, with only one bucket. So bucket limit on cluster is 20GB. Node quota is 10GB.
Clearing disk cache free memory that Couchbase can use, it must use it even if it used by disk cache, but for some reason not do this.
For example memory filled on 100% and Couchbase started to write data to disk, after i clear disk cache i got 50% free memory and Couchbase started to work normally writing data to memory not to disk.
That's not how it works. Clean pages of page cache are just like free pages and any reasonably modern OS can reuse them with ease. If explicitly getting rid of page cache helps in your case then there must be something else that's noteable.
That's not how it works. Clean pages of page cache are just like free pages and any reasonably modern OS can reuse them with ease. If explicitly getting rid of page cache helps in your case then there must be something else that's noteable.I know, but for some reason Couchbase cant use memory that allocated to disk cache.
Yes each server have 24GB, but for Couchbase used only 10GB.
Yes, it's not built for doing that. It'll try hard to never use more then bucket's quotas.
Then just bump per-node bucket quota to about 20 gigs and you'll be fine.
Then just bump per-node bucket quota to about 20 gigs and you'll be fine.I think this will make worse, because disk cache will fill up memory faster, and couchbase will use mostly disk.
Bucket quota is amount RAM that couchbase is using as it's _own_ cache. There's no need to cache same data in page cache.
So you're trying to say, that server will start evicting documents even when couchbase memory usage is well below bucket quota?