Performance Tuning for Linux Servers 121
swsuehr writes "Performance Tuning for Linux Servers provides information and resources for Linux administrators looking for a guide to the background, options, and commands available for enhancing the performance of a Linux server." Clear enough -- but read on for Suering's review of the book to see if it might help you at that task.
Performance Tuning for Linux Servers | |
author | Johnson, Huizenga, Pulavarty, et al |
pages | 547 |
publisher | IBM Press/Pearson |
rating | 8 |
reviewer | Steve Suehring |
ISBN | 013144753X |
summary | Information and techniques for performance enhancement of Linux servers. |
The Particulars
The book is 547 pages. Of that total, 507 are the content of the book while 13 pages are used for an Appendix. The Appendix is provides a look at some of the tunable parameters in the Linux kernel through interfaces such as sysctl and /proc. This appendix alone makes the book good reference material. The book is divided into five sections including an overview of Linux, performance analysis tools, system tuning, performance characterization, and case studies. The book covers the 2.6 kernel series and the 2.4 series where appropriate.
The book is published under the IBM Press brand but is most definitely not an IBM-centric book. The book is largely, though not completely, distribution neutral. Distribution neutrality means that you don't have to be running any certain flavor of Linux in order to follow the examples in the book. The book covers Red Hat Enterprise and Novell SuSE Linux Enterprise but does so in a non-intrusive manner such that most of the references are simply used to illustrate a certain point rather than requiring the reader to follow a step-by-step process. For instance, BSD and System V initialization processes are both covered in Chapter 1.
The book wasn't written by a single author. In fact, it appears to be the work of numerous authors, each contributing certain sections or chapters. With this type of format it's very easy for a book to lack cohesiveness. This isn't the case with Performance Tuning for Linux Servers where the material shares the same tone throughout. Truthfully, I didn't know that there were so many contributors until I was writing the review, that's how well the material flows together.
A Look Inside
Performance Tuning for Linux Servers combines both theory and practice. The essential background information is given for each subject but interwoven with practical knowledge. For example, Chapter 8 describes tuning of the scheduler including a list of tunable parameters with both a description and an effect. From p. 193:
"MAX_SLEEP_AVG"
"Description: The value of this parameter is the maximum sleep average a task can accumulate for the purposes of calculating the scheduling bonus. A task with this sleep average gets the maximum bonus as indicated by PRIO_BONUS_RATIO." "Effect: If the value of this parameter is increased, tasks need to accumulate a larger sleep average to get the same priority bonus. Decreasing the value has the opposite effect."
Several performance analysis tools are covered in some detail. These can be invaluable when trying to track down performance problems with a Linux server. One of the advantages to Linux is that it doesn't need to be rebooted in order to "clean up" as other operating systems need from time to time. Using these performance analysis tools, the administrator can track down exactly what is causing a bottleneck or resource issue on the server.
The performance analysis tools are mainly discussed in chapter 4, "System Performance Monitoring." The chapter is broken down into sections based on the type of resource to be analyzed. The sections include CPU Utilization where general tips such as `cat /proc/cpuinfo` are given in addition to detailed discussion of vmstat, top, gtop, and sar (part of the sysstat package). The next section discusses Memory Utilization which looks at some of the information available through /proc before detailing ps and vmstat. I/O Utilization is the next section where iostat is discussed along with another look at sar. Finally, Network Utilization rounds out this chapter with brief discussion of commands such as arp, ifconfig, and other basic network commands before detailing netstat. Throughout this chapter examples of output are given for many commands.
The authors do a great job at not only condensing the material but, more importantly, they also bring some highly technical concepts down to the reader's level. Take for example chapter 2, "Kernel Overview" where a detailed discussion of the architecture of the Linux kernel is given.
Part III of the book is devoted to system tuning (it's aptly titled "System Tuning"). This section of the book provides detailed background information so that the administrator can make educated decisions about what to tune. For example, chapter 9 is devoted to the Linux virtual memory subsystem and includes a discussion of not only how virtual memory is handled in the kernel (including new features for the 2.6 series) but also the tunable parameters for virtual memory.
Within Part III are chapters on the aforementioned virtual memory subsystem, the scheduler, I/O subsystems, file systems, network, IPC, and code tuning. Chapter 11, "File System Tuning", opens with a discussion of the basic terms in file systems before continuing on with discussion of specific file systems including ext2, ext3, ReiserFS, JFS, and XFS.
Part IV of the book looks at characteristics of Linux server applications. Doing so helps to frame the discussion of the different attributes important to tuning the server for each of these applications. The last section of the book, beginning of page 405, is devoted to case studies.
One final highlight for the book is that most chapters include a detailed references section with pointers to relevant information for that chapter. Some chapters have more references than others. The references might be anything from a man page to a magazine article to a book and a few other resources.
The combination of both detailed background information along with practical techniques, all of which are explained clearly, makes Performance Tuning for Linux Servers a great resource for Linux administrators who want to squeeze optimal performance from their server. I believe the book has a good shelf life that will keep it on my bookshelf for quite a long time.
You can purchase Performance Tuning for Linux Servers from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Performance tuning for Linux servers. (Score:3, Funny)
a) Install FreeBSD.
b) Reboot.
Re:Wrong (Score:3, Informative)
Re:Wrong (Score:2)
Wasn't it argued that the test itself was quite foobared due to the memory restrictions. In many cases, wasn't it really just benchmarking the swap file? I really don't know how well chipset support was arranged at the time. Don't get me wrong, I'm a huge fan of Linux... but that was not exactly a benchmark you want to toss around like it's gold.
That's if I recall correctly...
Re:Wrong (Score:5, Insightful)
for older linux kernels, and some hardware, freebsd has better throughput (and more importantly, won't crash under high load). but it fails behind in LATENCY under lower load. it always will because of the design choice they made. easier to implement, bit more latency under low load
with recent linux kernels, NAPI (New Api, more appropriately named "Rx Polling") was introduced, and some of the drivers were converted to use that, bringing linux up to scratch FOR THAT HARDWARE. due to the above mentioned design choice, in linux each drivers must be converted individually. the upside is that they don't suffer a latency hit under low load.
unfortunately for me, the driver i need still lacks NAPI support.
while we're on the subject of "freebsd has better performance", that's not actually true. while doing real-world tests for a rather large website in a mixed environment (freebsd, debian, redhat) i found that the reason freebsd SEEMED to perform better is that it was more aggresive in killing processes when it is under memory pressure, relieving stress on the swap area and as such, freeing up the cpu from doing the swapping work (that was before 2.6, which has some tuneables to help now)
Re:Performance tuning for Linux servers. (Score:4, Funny)
Re:Performance tuning for Linux servers. (Score:1)
Re:Performance tuning for Linux servers. (Score:5, Funny)
Re:Performance tuning for Linux servers. (Score:1)
Re:Performance tuning for Linux servers. (Score:1)
you forgot (Score:1)
Re:Performance tuning for Linux servers. (Score:1)
In a pinch, I set my desktop linux box up to run OpenVPN and changed the office router to point to the linux box, and it works fine.
So we're preparing to raze 2k3 and put linux on it (so I can mess around with my linux box and not worry about kicking everyone in the office off the VPN). Samba and OpenVPN are pretty muc
Very quick version... (Score:5, Informative)
Re:Very quick version... (Score:5, Informative)
--------------
# elvtune
ioctl get: Invalid argument
elvtune is only useful on older kernels;
for 2.6 use IO scheduler sysfs tunables instead..
--------------
You can find out more by tuning into "/sys/block/hda/queue" (where hda is the device you want to tune).
Enjoy.
Re:Very quick version... (Score:3, Informative)
Re:Very quick version... (Score:1)
CONFIG_IOSCHED_NOOP
CONFIG_IOSCHED_AS
CONFIG_IOSCHED_DEADLINE
CONFIG_IOSCHED_CFQ
By default, all 4 should be compiled, but primarily CFQ I/O scheduler is picked as the default (maybe i'm wrong on this). This can be changed by passing kernel pa
Re:Very quick version... (Score:1)
I went to a talk from the author (Score:5, Informative)
Re:I went to a talk from the author (Score:2)
Accuracy Problems on htop (Score:1)
Re:I went to a talk from the author (Score:3, Funny)
1) Don't buy the book and save your $55.
2) Configure the server you want on ibm.com. Go to dell.com and configure a similar server, note the amount saved on dell.com
3) buy a dell server and use your extra money from 1) and 2) to get the cpu upgrade and the free double ram.
4) Presto! Instant Linux Tuning! It even works with Windows at no extra charge!
Re:I went to a talk from the author (Score:2)
Re:I went to a talk from the author (Score:3, Insightful)
we have a bunch of dell rackmount servers here (poweredge 2650 and 750) and i've never had ANY problem with them. compare that to our hp server (now relegated to being a backup of a backup because of unreliability) or sun (running, can't update anything on it lest it crash) or ibm (8U, slow as a duck, but built like a tank), i'll take a dell anyday. i just wish they had a line with opterons in them
Re:I went to a talk from the author (Score:2, Informative)
Right back at you. We tried out a Dell server at work (2650 iirc). It crashed 3 times during the install (kickstart), and then within an hour of putting any load on it. Needless to say, the server only stayed in the rack for about 2 days before we shipped it back.
The IBM xSeries, OTOH, perform flawlessly for us.
So from my POV, the Dells are cheaper, but they're also less expensive. :)
IMO, get the vendors to give you a test box and play with them. Go from there.
Re:I went to a talk from the author (Score:3, Insightful)
Of course you should have shipped it back--you obviously got one that was damaged in shipping. Do you really believe that it's normal for dell servers to crash during an installation routine? I'm sure you can make some snippy response and get moder
Re:I went to a talk from the author (Score:3, Insightful)
2) Save cost on new server. Don't buy Dell (for servers or laptops).
3) Be happy.
4) ???
5) This is getting old.
Re:I went to a talk from the author (Score:2)
This is htop, an interactive process viewer for Linux.
Huh, nothing deeper than that.
What are you trying to solve with this tool and why should I use it. Give me a better sales blurb.
Re:I went to a talk from the author (Score:2)
Any other suggestions?
Thanks,
Re:I went to a talk from the author (Score:1)
What does it tune?!? (Score:5, Interesting)
Does the book go into details with database servers, file servers, web servers, and/or specific application servers.
What type of linux servers does it teach you to tune?
Re:What does it tune?!? (Score:3, Insightful)
Re:What does it tune?!? (Score:1)
Re:What does it tune?!? (Score:2)
Re:What does it tune?!? (Score:1)
What type of linux servers does it teach you to tune?
From TFA:
That is, it should be generic enough to apply to nearly all Linux distros.
Re:What does it tune?!? (Score:2)
From TFA:
"The book is largely, though not completely, distribution neutral."
That is, it should be generic enough to apply to nearly all Linux distros.
That's nice but it does't answer the question. If I wanted a book on Linux Operating System Tuning I would ask which distribution. However, I want to know what "type of server" it tunes... (db, www, file, etc...)
Re:What does it tune?!? (Score:1)
The user reviews are pretty decent, it seems; I suppose they'll answer more of your questions.
Re:What does it tune?!? (Score:3, Insightful)
Again, it'll also be distro independant, Red Hat is just the same as Suse as Debian when you're discussing the merits of one filesystem over another.
Re:What does it tune?!? (Score:3, Insightful)
This book teaches people how to tune the things that they see are bottlenecking via monitoring software.
From your posts, you just want a list of items to set for a given "type" of server, completely overlooking the fact that tuning is much more related to the workload of a given box than just what broad type of workload it fits in to.
Re:What does it tune?!? (Score:2)
It says right there in the title: "Linux". I understand that this sounds flippant, but the distinction between www, db, file, and other servers is entirely artificial. There's no such thing as a "www server" - It's a linux server running an http server application.
The book isn't a list of recipies for different server roles, along the lines of "Set the max number of shared memory segments to X for mysql, and Y for oracle". It's a de
Gerrit Huizenga, another of the authors... (Score:5, Informative)
performance tuning? (Score:5, Funny)
Type R (Score:2)
Re:Type R (Score:1, Offtopic)
And the spinner hubs. Gotta have the spinner hubs.
noobs! (Score:1)
Re:Type R (Score:1)
"Pimp my Linux Server"...
Re:Type R (Score:1)
Re:performance tuning? (Score:2)
Re:performance tuning? (Score:2)
You can tune a file server... (Score:1, Funny)
Re:You can tune a file server... (Score:3, Informative)
547 pages = 507 content + 13 appendix (Score:3, Funny)
The book is 547 pages. Of that total, 507 are the content of the book while 13 pages are used for an Appendix.
Is that the best opening for a review you could come up with? Sweet Jeebus!
Re:547 pages = 507 content + 13 appendix (Score:1)
Re:547 pages = 507 content + 13 appendix (Score:2)
Re:547 pages = 507 content + 13 appendix (Score:2)
Re:547 pages = 507 content + 13 appendix (Score:1)
Some of you must score really bad on a IQ test.
"507 are the content of the book while 13 pages are used for an Appendix."
Doesnt exclude that there is a glossary or whatever...
Question (Score:1)
Re:Question (Score:2)
Re:Question (Score:3)
eg. If you're running a database server, what can you do to improve its performance (maybe buy MySQL Performance tuning), if you're running a web server what can you do (erm, buy Apache performance tuning), and err.. if you're running a file server.. then. erm.. I'll get my coat.
Re:Question (Score:2)
Re:Question (Score:2)
I really don't think you'd achieve much. Fundamentally, a Linux system is a bunch of programs running on a Linux kernel. A distribution dictates to a greater or lesser extent how those programs are installed and how the system as a whole is configured and managed, and may include some GUI-based tool to make it easier but is unlikely to have any special black magic to make it run much faster.
IMO, you'd be
Contains a chapter by Steve French (Score:5, Interesting)
21 June 2005 Performance Tuning for Linux Servers The new book Performance Tuning for Linux Servers from IBM Press contains a chapter on File and Print Server performance written by Samba Team member Steve French. The chapter discusses Samba and NFS performance concepts. Other chapters, especially those on networking and filesystem performance tuning for Linux, also could be helpful for Samba administrators.
easier way (Score:4, Funny)
Re:easier way (Score:2)
Distro neutral ... Yes! (Score:3, Interesting)
Of course, Joe user shouldn't have to be able to cope with the command line and for such people, there's always the pointy-clicky way but that also has a learning curve. The gui way to do things is different from distro to distro so instead of a sharp learning curve to do something on the command line, you have a lot of little learning curves as you move between systems.
Re: (Score:1)
Re: (Score:1)
Re:What commands quit working? (Score:2)
Re:Distro neutral ... Yes! (Score:1)
Re:Distro neutral ... Yes! (Score:2)
They did when DOS was around.
Good point! Back then people -- that's users, not just admins -- treated software like tools: if they wanted to use them, they learned how to use them. They didn't complain about the difficulty of the command line, even though it was worse than today's unix equivalents.
Nowadays it seems people refuse to learn things. They expect computers to read their minds. It's like each user interfac
Also... (Score:1)
Just adding to your point.
Re:Distro neutral ... Yes! (Score:2)
Re:Hardware is cheap. Tuning is tricky. (Score:2)
Fact: RedHat EL3's default httpd configuration is AWFUL for busy websites on high end machines, compared to say Windows/IIS defaults, though on cheap/low powered hardware running with a 300M
its ok (Score:2)
If you run Oracle you shoould buy it on expenses.
Freebsd 5 Tuning? (Score:1)
Re:Linux needs it more (Score:1)