[Xapian-discuss] how can i reduce cpu usage

Olly Betts olly at survex.com
Thu Sep 3 00:01:44 BST 2009


On Wed, Sep 02, 2009 at 12:10:12PM +0100, Olly Betts wrote:
> Why not work with the facilities the OS provides?
> 
> If this is Unix, then use "nice -n19" to tell the scheduler to give
> least priority to the indexing process.  Then other processes will get
> all the CPU time they want, and the indexer will use as much of the
> remaining CPU time as it wants.

Recent Linux (>= 2.6.23) also has "chrt --idle".  I've not compared, but
it's probably slightly more effective at achieving the above.

> If you have a recent Linux version, "ionice -c3" can do similar things
> for I/O prioritising.

Cheers,
    Olly



More information about the Xapian-discuss mailing list