Attempt to control the CPU usage during Lucene index editing

Source: Internet
Author: User

one thing that has been quite painful during Lucene's use process is that the optimize method occupies a large amount of system resources (say "exclusive" is not enough ), A 4G + index of 0.29 million pieces of data, optimize on my laptop for up to 32 minutes, during which I can almost only work on desktops. Unfortunately, at least I haven't found a way to control the CPU usage of its open APIs. In fact, it is hard to imagine because of the hard work of writing data to disk I/O, however, the computing action is to consume CPU. Finally, I got a conclusion in an email reply from a foreigner that "the CPU resource usage cannot be controlled":

I think I answered that question just the other day... privately...
No, there is nothing inLuceneTo help youCPUUtilization.
However, if you are running this on a Unix box of some kind, you can (re) Nice the process and thus lower its priority, giving other processes more time withCPU. Windows may have something similar.

 

This is the only option for the time being. However, if the Lucene index maintenance process and the website application process are on the same server, maintaining the Lucene index will definitely affect the normal application of the website, i'm afraid that's why many people set the index maintenance time between and in the design.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.