Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
Like this article? We recommend


Is CPU utilization too high in Linux?

If you don't put use recoll as my search engine on my Linux host, run recollindex three times a week overnight to pick up the latest changes. I don't run recoll in daemon mode because it's a resource hog, though playing with renice might curb its appetite for CPU and memory to a reasonable level. I noticed Kubuntu running over 90 percent capacity of my CPUs (I have a dual core). So I opened a terminal, used $ top to find out what was eating CPU power, and found the Strigi indexed search daemon busily indexing away on a practically empty 20GB virtual HD. From Start > Add/Remove Programs, I removed all the Strigi applications. That solved the problem. Should I ever decide to put data on the virtual drive, I can always reinstall it. I also discovered that before I stopped it, Strigi ate several gigabytes of disk space. The fix is:

$ rm -rf /home/username/.strigi 

to remove the files. Then follow the Virtual Hard Disk Compacting instructions below to get your space back.

I am running Debian Lenny instead of Ubuntu as a VM and found Guest Additions don't work?

Try this solution. That's all I can say about it—I found this by accident while trying to solve the problem of getting shared folders automounting in Ubuntu. Oddly enough, it solved my problem as well; I didn't know that Guest Additions didn't start when one would expect them to, and that's all I needed to know to figure out that I needed to run the mount command for shared folders in rc.local instead of fstab.

How do I compact the virtual hard disk for Linux guest VMs?

To compact the virtual disk to make it give up unused space, first you have to write zeros into every byte of free space.

In Kubuntu, do this with:

$ dd if=/dev/zero of=filler bs=1M
$ rm -rf filler

This writes 1KB blocks of zeroes to the filesystem into a file named filler until it runs out of room. This will take a while. Then, delete the file. Shut down the guest in the guest VM window and the xVM console.

Then, run this command on the host:

VBoxManage modifyvdi /home/username/.VirtualBox/VDI/Kubuntu.vdi compact

This code is a single line regardless of how line wrap makes it look. Use a correct filename if you called it something else.

  • + Share This
  • 🔖 Save To Your Account