[Xapian-discuss] thread locked while flushing to database

Luca Barbieri lucabarb at gmail.com
Thu Aug 12 09:53:42 BST 2010


On a multicore Linux platform I'm running a simple c test program, to
evaluate xapian performance, and inspect advantages in multiple indexing.
I'm starting two threads, and each thread writes to his database.

   main th          -> indexing thread_1 -> db1
(dispatcher)     -> indexing thread_2 -> db2

I use sched_setaffinity to bind each indexing thread to a specific core.

During indexing phase i see both core running, but when my threads try to
flush to the databases one of them keeps working, the other thread stop the
execution (0% cpu) and stracing his pid seems that it's blocked in a futex.

Why does this happens if the 2 databases are different objects (with
different path)?
I'm doing something wrong?
This seem to happen both with xapian-core.1.1.3 and xapian-core.1.2.2, and
different gcc versions.

Here are some details, strace outpud, gdb output, and top results:
http://pastebin.com/udGQTi6K

Cheers.

-- 
---------------------
Luca Barbieri


More information about the Xapian-discuss mailing list