Very high CPU utilization when run with multiple threads

41 views
Skip to first unread message

John Stockton

unread,
Nov 18, 2013, 8:49:08 PM11/18/13
to tokyocabi...@googlegroups.com

Hello,

I am new to Kyoto Cabinet and I am trying to evaluate it for a use case.

I am accessing KC via the Java API and my program runs with multiple threads where each thread creates a separate Tree DB. When I run my program, CPU consumption hits to the roof. I checked the stack trace and realized most threads are stuck in Cursor(). Later I checked the code and saw that cursor is protected with spin lock:

.
.
ScopedSpinRWLock lock(&db_->mlock_true);
.
.


As I said before, each of the threads create its own DB, i.e. no two threads access to the same DB. So, there is no reason for threads to block each other given the lock is per DB.

Would anyone have a guess on what might be happening? By the way, I tried to configure KC with --disable-atomic flag with no luck.

Appreciate for any help.

- John
Reply all
Reply to author
Forward
0 new messages