[Xapian-discuss] how can i reduce cpu usage

ouwind ouwind at 163.com
Thu Sep 3 04:04:11 BST 2009


thank u ,i try it to see the effect




On Thu, Sep 03, 2009 at 09:12:14AM +0800, ouwind wrote:
> my os is windows. there are a thread used to insert document into
> xapian, i reduce the priority of the thread to below normal, but i
> still get high usage.

A quick google suggests THREAD_PRIORITY_IDLE is what you want there,
rather than just reducing the priority.

High CPU usage is still to be expected, but not to the detriment of
other processes.  So if another process is CPU bound, you'd expect the
indexer to use close to 0%, but if the other processes would only be
using 25% CPU, the indexer would be expected to use up to 75%.

If this really isn't working, I'm not going to be able to help as
Microsoft stuff isn't my area of expertise.  If nobody else on the list
knows, you could try an OS-specific list/forum/irc channel/etc.

If you really want to stick to your original plan, you're going to have
to profile to find where CPU time is actually spent (as I mentioned
before).

Cheers,
    Olly
     




More information about the Xapian-discuss mailing list