3

Is there an intelligent way how to restrict buffering/caching in a Linux system and to make it writing on disk more or less continuously?

I am asking because I am running several Linux virtual machines in one physical Linux box. The default buffering/caching mechanism of Linux causes that all those virtual machines are caching writings to disk until some moment when they decide to flush everything out. The problem happens when several virtual boxes start to flush their buffers at the same time. At this moment the hard disk on the physical machine becomes overcharged and I am facing a 90% of wa (Wait for I/O) wasted CPU time on physical machine. All virtual machines freezes for a few seconds causing that some TCP/IP connections are broken, etc.

I would like to disable caching in virtual sub-systems and to do all the caching in the physical system, because it is accessing physical disk. Any hint?

ADDED: Disks for virtual machines were created by going through workstation menus usually accepting (if I remember well) default values. Disks images are stored in files like XXX-s000.vmdk until XXX-s100.vmdk. They are seen from virtual Linux boxes as scsi-drives.

I am using vmware workstation 10 for virtualization. As far as I know, no vmware guest tools were installed on those machines.

  • What VM subsystem are you using? Are your disks in each guest virtualized or is your VM layer having to emulate the SATA interface for each guest? Please reply by updating your question, not as a comment. – roaima Apr 10 '15 at 8:15
  • You mention vmdk files. Does this mean you are using VMware? – roaima Apr 10 '15 at 12:19
  • Have you installed the guest tools on each guest? – roaima Apr 10 '15 at 17:27
2

First off, install the VMware guest tools on (all) the Guests.

This will let VMware implement a more efficient interface between those Guests' disks, NICs, and screen and the Host. As a result you may well find your contention issues are much reduced.

On a Debian-style distribution the package name is open-vm-tools, see https://github.com/vmware/open-vm-tools

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.