开发者

Enyim Performance issue

I'm using enyim to provide access to a membase server for a multi-threaded queue readers. These readers access an AQMP queue, check the cache to see if the item has already been processed and if not inserts it into the database and into the cache. The issue is that accessing the cache eats up the CPU. With 4 threads processing messages the CPU 开发者_如何学Cis at 80-90%. I've implemented a custom serializer that feeds bytes to enyim. If I switch to my in memory fall back and I can go up to 9 threads before the CPU usage gets to high. The only difference with the in-memory caching and the membase cache is that the bytes are being stored in memory instead of the cache. Any idea of what I could be doing wrong with eynim that could be causing this high CPU usage or is normal? At max the clients are performing about 2.5k ops/s according to the membase console.


One known bottle neck is creating a new MembaseClient every time you want to access cache. The recommendation is to make one instance of the MembaseClient and pass that same instance around. Check this link for details about it:

https://github.com/enyim/EnyimMemcached/wiki/MembaseClient-Usage

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜