update-apt-xapian using excessive resources

I’ve had an issue with some of my Ubuntu VM’s lately destroying the available resources on my ESXi box. The hard drives were going crazy due to a combination of normal disk access and also memory paging into swap file.

Running top showed a process “update-apt-xapi” which was top of the charts for memory and cpu usage.

I googled around a bit, and found that the update-apt-xapian-index process is Ubuntu’s way of updating the synaptic indexing. Considering this is a cli-only vm where I use puppet to manage the packaging, it’s useless. Also, there’s many many many posts on the web about this package going mental on low-resource machines.

As a test I removed the package from the VM that kept having issues with the following commands:

sudo apt-get autoremove --purge apt-xapian-index 

This removed the package and dumped all config/storage of the files.

After leaving it for a few days it was fine, so I added the following config to puppet to make sure all my machines remove it:

package{ 'apt-xapian-index' : ensure => purged } 

Within an hour or so this had run through all my managed VM’s and the problem shouldn’t occur again.

#apt #bugs #ESXi #fail #puppet #synaptic #Ubuntu #xapian