Upcoming Events

Executive conference

Cloud Connect March 16-18

Comprehensive thought leadership for executives, IT professionals and developers. Topics include: the ROI, cost and economics of on-demand computing; Migration strategies to move from on-premise to cloud-based IT; Vertical cloud specialization, tailoring features and architectures to specific applications, industries, and customer ecosystems

More Events »

Subscribe to Newsletter

  • Keep up with all of the latest news and analysis on the fast-moving IT industry with Network Computing newsletters.
Sign Up

  W O R K S H O P

Linux Power Tuning

November 13, 2000


Tweaks and Hints

  • Kernel bloat: Every device driver loaded into the kernel takes up space in RAM. Most Linux distributions use loadable modules, but some may be loaded that aren't needed (such as parallel port drivers). Run lsmod or look at /proc/modules to see what modules are loaded, as well as those that are in use. Then think about which of these drivers are really needed. If you compile your own kernels, don't compile unneeded drivers.

  • Resource limits: There are global and per-user imposed resource limits. A good rule of thumb is 256 open files for every 4 MB of RAM. There is a similar inode maximum (these are inode data structures, not inodes on a disk) that should be roughly four times the max open files. If you are seeing errors in your error log mentioning failure to allocate (or grow) more inodes or if the file-max limit has been reached, try echo 16384 > /proc/sys/fs/file-max or echo 65536 > /proc/sys/fs/inode-max. The max value (for the Intel IA32 architecture) is 231 - 1, or 2,147,483,647. These changes must be executed at every boot. A likely place to put them is the start-up script rc.local, in /etc.

  • Tracking CPU usage: Using the tool vmstat, you can pinpoint various application processing problems. Look at the us field of vmstat's output. If it is high, then a high percentage of the system CPU is being used by a process doing computation. Use top to figure out which process is using so much of the CPU. If the sys field in vmstat is high (relative to baseline), then CPU time is being spent by the kernel itself. Typically, if both sys and us are high relative to your baseline, your system is overloaded.

  • Tracking disk usage: Using the vmstat tool, you can monitor the blocks moving in and out of the disk system by monitoring the bi and bo fields. If they increase relative to the baselines, the disks are working harder. Seeking is a problem where many files are opened, read or written to, and closed again and again. To determine if seeks are a problem, know your disk's seek time and use it to compute the total TPS (transactions per second) that your disk is capable of. Then use the iostat tool to find out the actual TPS.

  • Tracking network usage: Use iptraf to monitor network interfaces. Use ifconfig to see any errors at the data link level. When debugging traffic problems or misbehaving clients and servers, a packet sniffer called ethereal (and its command-line variant tethereal) is essential for generating packet captures, breaking down protocols and sorting packets by type, and it can import and export multiple capture file formats.

  • Tracking RAM usage: The command free (or reading from /proc/meminfo) gives the status of memory in use, free or used as file buffers. Use vmstat and observe the si and so values to determine the rate at which data is being paged into and out of swap. A high rate compared with the baseline indicates insufficient RAM.

  • Unwanted services: Look at the output of ps -auxwww and identify all the processes. Any services running that you know you didn't start were probably started at boot time. Check the /etc/rc.* files and directories. Depending on your distribution, you may be able to use a run-level editor to control what starts at boot.



PAGE: 1 I 2 I 3 I FIRST PAGE
 

Best of the Web

Data deduplication: Declawing the clones

Data deduplication is emerging as a critically important new arrow in the storage administrator's quiver to answer hard questions about the increasing problem in storage growth costs.

Quick Read

Compression, Encryption, Deduplication, and Replication: Strange Bedfellows

One of the great ironies of storage technology is the inverse relationship between efficiency and security: Adding performance or reducing storage requirements almost always results in reducing the confidentiality, integrity, or availability of a system.

Quick Read

WAN Optimization Whitelists and Blacklists

Optimization is a fantastic way of saving money and creating really happy customers at the same time, but it doesn't work flawlessly for all applications.

Quick Read

WAN Optimization as a Managed Service: It's Not About the Cost

This insight examines how organizations outsourcing their WAN optimization initiatives to a third-party go about achieving their goals for application performance, reducing operational costs, and streamlining enterprise infrastructure.

Quick Read

  Sponsored Links

Premium Content

Next Generation Data Center, Delivered, November 17th
NWC


Salary

Video