Why do I see increased CPU usage after upgrading to Nexus 2.0?

The most likely cause of increased CPU usage immediately after upgrading to Nexus 2.0 is a background thread which upgrades the repository metadata information.

Nexus stores meta information about every file in the storage directory, such as when it was last accessed, who uploaded it, it's checksums, etc.

In previous versions of Nexus this information was stored in "sonatype-work/nexus/proxy/attributes/<repo-id>" in XML format, one XML file for each file in storage.

In 2.0 this is stored in "sonatype-work/nexus/storage/<repo-id>/.nexus/attributes".

This has the advantage of consolidating all information about each repository in a single location, which makes it much easier to backup repositories.  We've also changed the file format so that it is much more efficient.

On upgrade, we run a low priority thread that reads in the old attributes and writes them out in the new location.  This thread is self-throttling, it checks for excessive disk usage and slows itself down if it detects it, and it runs at a lower priority than other threads of the server.

However, if your server is relatively idle it will consume more resources.

As it finishes processing repositories it leaves a marker file named "README.txt" in each directory under proxy/attributes.  When it finishes processing all repositories it will leave a README.txt in the "proxy/attributes" root directory, indicating that it is safe to delete this directory.

When all the repository metadata has been upgraded the CPU usage will return to normal.



Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk