[an error occurred while processing this directive]
| |
Linux Host Performance Tips
Note: This document pertains to the host system of a
machine running VMware Workstation 2.x for Linux. Tips for configuring guest operating
systems are provided in separate notes.
Host Disk Performance
- DMA disk access
The best thing you can do to ensure good disk performance is be
certain Linux is using direct memory access (DMA) to access your disks.
DMA disk access is significantly faster than non-DMA modes, it imposes
much less load on the CPU, and it holds up much better on a busy machine.
If you have SCSI disks, this is the only configuration you are likely to
have, and you do not need to do anything.
If you have IDE disks, make certain that "Busmastering DMA" is enabled.
As root, run hdparm. It provides information about disks in the
following format:
# /sbin/hdparm /dev/hda
/dev/hda:
multcount = 0 (off)
I/O support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 1 (on)
keepsettings = 0 (off)
nowerr = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 523/255/63, sectors = 8406720, start = 0
The using_dma line indicates whether or not DMA is enabled.
If DMA is not enabled, there are several ways to enable it.
- Checking performance
You can use hdparm to gather some fairly raw performance
numbers about your disk speed and disk cache speed as well, using
the following two options:
-t perform device read timings
-T perform cache read timings
The following listings show two sample runs, the first without DMA enabled
and the second with DMA enabled.
# /sbin/hdparm -Tt /dev/hda
/dev/hda:
Timing buffer-cache reads: 128 MB in 1.23 seconds =104.07 MB/sec
Timing buffered disk reads: 64 MB in 14.40 seconds = 4.44 MB/sec
# /sbin/hdparm -Tt /dev/hda
/dev/hda:
Timing buffer-cache reads: 128 MB in 1.22 seconds =104.92 MB/sec
Timing buffered disk reads: 64 MB in 3.52 seconds =18.18 MB/sec
- Software RAID
Some forms of software RAID claim to improve disk performance. We have not
tried this approach, so we cannot provide any measurements of its
effectiveness. If you are willing to invest a fair amount of work, take a
look at the Software RAID HOWTO.
The section entitled "Why RAID?" includes a discussion of how
the various configurations can help disk performance.
Host Display Performance
- Accelerated X server
For best graphics performance, the first thing to do is make certain
your card has an accelerated X server. Often the first
release of "support" for a given chip will include a caveat
that "only unaccelerated support is present," and that unaccelerated
support is often terribly slow.
In addition, be sure you are running version 3.3.4 or later of XFree86.
VMware has written and contributed an extension to the XFree86 DGA
(Direct Graphics Access) code that allows VMware Workstation accelerated performance
in full-screen mode. All versions of XFree86 from 3.3.4 forward include
the enhanced DGA support in the X servers for which DGA exists.
- Color depth
The higher your color depth, the more memory your screen
requires. This often slows graphics operations. This is
especially true with VMware Workstation, and we recommend you use a 16-bit
color depth with your X server. The appearance is much better than 8-bit
pseudo-colour. And compared to 32-bit color, the 16-bit mode requires
VMware Workstation to use only half as much memory for the display.
Host Memory Performance
Host Sound Performance
- Sound configuration
If the sound support in your kernel is built as modules (not compiled
into the kernel), you can improve the efficiency of the modules'
operation.
It is unclear how much difference this makes in system performance,
but at the very least it will prevent errors message from
your sound modules saying they are unable to allocate DMA memory.
If you have a 2.2.x kernel, you can configure the sound modules to
allocate their play buffer only once, then keep it, instead of
freeing it and reallocating it as the sound card is used and
freed. As root, you can edit /etc/conf.modules (or
/etc/modules.conf, depending on your Linux distribution) and add the line
options sound.o dmabuf=1
Place this entry on the line immediately above the line that reads
alias sound followed by the name of the driver for your sound
card. You will need to unload and reload the sound module if you
do this.
|