FreeBSD changes continually, and later systems might have
FreeBSD changes continually, and later systems might have new tuning and performance features. Take a look at tuning(7) on your system to find any new performance tips. We’ll cover tuning information that is useful on any FreeBSD (and almost any UNIX) system. Note One word you’re going to keep stumbling across in this chapter is “abnormal.” As the systems administrator, you’re supposed to know what is normal for your system. It’s somewhat like art: You might not be able to define normal, but you need to recognize it when you see it. It’s a good idea for you to use these tools to check your systems regularly when they’re behaving correctly, so you will have a good idea of what is out of whack when the system slows down. We’ll also look at some long-term monitoring tools, so you can gauge system performance over months or years. [1]Technically, network bandwidth is part of input/output. However, it’s special enough that we’ll treat it separately. Disk Input/Output We looked at disk operations in some detail in Chapter 16. When it comes to performance, disk speed is usually a big bottleneck. If programs are waiting for disk activity to complete before proceeding, they will slow your system down. (This is commonly called “blocking on disk,” meaning that the disk is blocking program activity.) The only real solution for this is to use a faster disk or a RAID array, or to split your disk activity between two disks. How do you know if your disk is actually blocking program activity? We’ll look at that in “Using Vmstat,” later in the chapter. Network Bandwidth If your system performance slowdown is due to network problems, you need more bandwidth. In short: You can only push as much bandwidth as you have. If your T1 is full, you need more bandwidth. If your system cannot fill the existing bandwidth, use the tools discussed in Chapter 5 to increase system capacity. To check for this problem, begin by monitoring how much bandwidth your system is using. Chapter 15 discusses how to generate long-term graphs of band-width usage. We also discussed networking in Chapter 5. Consult netstat -m, and increase your kernel’s NMBCLUSTERS, as described in Chapter 4. That’s really all there is to it. Other system conditions are more complicated. CPU and Memory The top(1) tool is a good place to start if you’re examining a system that seems to be running slowly. It provides a good overview of system status, but it only shows information about the CPU and memory usage; input/output and band-width are not touched. 407
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP Web Hosting services