[Evolution-hackers] libdb performance issue? (was: Re: libebook: errors when using asynchronous contact addition/removal functions)



On Fr, 2011-05-13 at 12:42 +0100, Christophe Dumez wrote:
> On my machine some of the insertions often fail with error:
> E_BOOK_ERROR_NOT_SUPPORTED.

What is the error explanation in that case? See gError->message.

When I run the test program, I see that e-addressbook-factory starts
consuming 100% CPU time. "strace -p <pid>" shows that not a single
system call is done. Attaching with gdb and a "thread apply all bt"
shows that there are roughly 15 threads, most of them in libdb inside
libthread and/or __os_yield(). Can you confirm similar behavior?

My hypothesis is that we either run into a real bug in libdb (no
progress made executing multiple concurrent writes) or a corner case
where progress is extremely slow. Something like this made EDS look bad
in the tracker<->EDS comparison:
http://mail.gnome.org/archives/tracker-list/2011-March/msg00035.html

In libebook, I get a "Timeout was reached" because the asynchronous
operation doesn't complete quickly enough. Same for the attempt to
delete the contacts. The gError->code is 24, which is indeed
E_BOOK_ERROR_NOT_SUPPORTED.

Running dbus-monitor, I see that removeContacts is called, but there's
no reply because the D-Bus server is busy.

I tried the LD_PRELOAD=libeatmydata.so workaround suggested in the mail
above and it does avoid the problem.

Is there anyone around who understand libdb well enough to shed some
light on this? What is a proper fix?

-- 
Bye, Patrick Ohly
--  
Patrick Ohly gmx de
http://www.estamos.de/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]