Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [453]

By Root 2832 0
forth a long way to switch between partitions. On the other hand, files within a partition will be relatively local to one another. When partitioning a new disk, you may want to consider the performance implications and put files that are accessed together in the same filesystem.

To really achieve maximum disk performance, you should put filesystems that are used together on different disks. Although it depends on the bus architecture and device drivers, most computers can manage multiple disks independently, dramatically increasing throughput. For example, web server data and web server logs can profitably be put on different disks.

If you have a lot of disks, you may be able to boost performance even further by installing more than one disk controller or SCSI bus. The effectiveness of this technique will depend on the architecture of your system. Check your hardware documentation or consult your vendor.

It’s especially important to split the swap area among several disks if possible, since paging tends to slow down the entire system. All systems support this configuration through the use of the swapon command, the swap command, or a kernel configuration option (see Chapter 8). Many systems can use both dedicated swap partitions and swap files on a formatted filesystem. Dedicated partitions are more efficient; do not use swap files if you have a choice.

Some systems also allow you to set up /tmp as a “memory based filesystem,” which is essentially the same thing as a PC RAM disk. A special driver poses as a disk but actually stores data in memory. Using a RAM disk may reduce the average amount of memory available for general use, but it makes the reading and writing of temporary files blindingly fast. It’s generally a good deal. For more information, see the man page for tmpfs on Solaris, the man page for ram on Red Hat, or the man page for mfs on FreeBSD.

Some software degrades the system’s performance by delaying basic operations. Two examples are disk quotas and CPU accounting. Quotas require a disk usage summary to be updated as files are written and deleted. CPU accounting writes a data record to an accounting file whenever a process completes. Disk caching helps to soften the impact of these features, but they may still have a slight effect on performance and should not be enabled unless you really use them.

Virtual Adrian

Solaris administrators can leave the driving to Adrian—Adrian Cockcroft, that is. Adrian is a performance expert employed by Sun who distributes his own analysis and tuning tools. His SymbEL tool kit (known as SE) is an interpreted language designed for building performance tools and utilities. The tool kit includes the “Virtual Adrian” ruleset, which is said to embody Adrian’s many years of Solaris performance tuning experience. Although it’s not officially supported by Sun, you can download the tool kit from Sun’s web site at

http://www.sun.com/sun-on-net/performance/se3

procinfo: display Red Hat performance data

Red Hat’s procinfo command provides a nice summary of system performance information, much like that of vmstat but in a more understandable form. The information it provides about PC interrupts is especially useful. If you have a spare terminal or window and can spare the CPU cycles, you can run procinfo -f to show updates every 5 seconds.

% procinfo

Linux 2.2.5-15 (root@porky.devel.redhat.com) (gcc egcs-2.91.66) #1 [redhat]

Memory: Total Used Free Shared Buffers Cached

Mem: 30756 23908 6848 9084 12496 3968

Swap: 133016 224 132792

Bootup: Tue May 2 12:26:13 2000 Load average: 0.08 0.02 0.01 1/26 16173

user : 0:08:15.35 0.0% page in : 774301 disk 1: 229922r 109442w

nice : 0:00:00.00 0.0% page out: 177675

system: 0:10:46.41 0.0% swap in : 183

idle : 30d 2:06:40.89 100.0% swap out: 60

uptime: 30d 2:25:42.64 context : 7221865

irq 0 : 260074265 timer irq 10 : 3032801 eth0

irq 1 : 8 keyboard irq 13 : 1 fpu

irq 2 : 0 cascade [4] irq 14 : 1905415 ide0

irq 6 : 3 irq 15 : 5 ide1

irq 8 : 2 rtc

pstat: print random FreeBSD statistics

Another

Return Main Page Previous Page Next Page

®Online Book Reader