Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Networking Books Media Operating Systems Software Book Reviews Linux

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.
This discussion has been archived. No new comments can be posted.

Performance Tuning for Linux Servers

Comments Filter:
  • by grub ( 11606 ) <slashdot@grub.net> on Tuesday August 09, 2005 @04:29PM (#13281624) Homepage Journal

    a) Install FreeBSD.
    b) Reboot.
    • by Otter ( 3800 ) on Tuesday August 09, 2005 @04:40PM (#13281697) Journal
      Hah! Just set the appropriate USE flags and make.conf (I prefer -O8 -- just remember it's a capital o, not a zero!) and no need for tuning!
    • c) switch off SETI@HOME
    • Don't install FreeBSD if you want stable 64-bit support. Really don't install FreeBSD if you write in Java and use threads.
    • c) Profit!
  • by jjeffrey ( 558890 ) * <slash AT jamesjeffrey DOT co DOT uk> on Tuesday August 09, 2005 @04:32PM (#13281640) Homepage
    In my experience, the number one tip for linux performance tuning is "man elvtune". I've seen it work miracles.
    • by GweeDo ( 127172 ) on Tuesday August 09, 2005 @04:44PM (#13281719) Homepage
      Well, unless you use 2.6....

      --------------
      # elvtune /dev/hda
      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.
      • Good point - though in the case of 2.6 you are still doing the same thing for the same results, just with a different interface.
      • Linux kernel 2.4 uses I/O elevator utility, elvtune (which tunes I/O queue time), in order to control request time in I/O queue. This used to be time consuming task. Since 2.6, 4 customized I/O schedulers has been introduced to further tune up queuing faster and easier.

        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
    • Unfortunately, it's obsolete in 2.6 kernels
  • by HishamMuhammad ( 553916 ) on Tuesday August 09, 2005 @04:32PM (#13281645) Homepage Journal
    IIRC, she [Sandra Johnson] is the head of one of IBM's Linux Technology Centers. It was pretty interesting and I got to skim the book for a while. Looked good, but I always have the fear that books like this get outdated fast. It had half a page on top -- I told her to include htop [sf.net] in the next edition. No plug is as shameless as when you do it in person. ;)

    • I just installed htop on my debian based web server, it's pretty nifty. Not that I need top that often, the computer runs at practically no load.
      • Unfortunately, I've seen that htop is wrong half the time on it's CPU usage. If you run X (of course, you wouldn't on a server, but whatever...) get gkrellm. It's got a much more accurate counter.
    • I looked at the xSeries prices on IBM.com, and here is my recommendation for 'Linux Tuning'. ;)

      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!
      • 5) Buy a support contract from dell that guarentees your call doesn't get routed to india. 6) buy an extended service coverage plan for all your servers because you KNOW they're going to break, I mean lets get real, it is a Dell. 7) give the whole thing a miss and buy something other than a Dell.
        • don't knock em till you try em.

          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
          • don't knock em till you try em.

            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.

            • 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.

              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

      • 1) Tune your old server.
        2) Save cost on new server. Don't buy Dell (for servers or laptops).
        3) Be happy.
        4) ???
        5) This is getting old.
    • You could start by changing your web page:

      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.
    • Also a lot of this info is probably contained in IBM's Red Books: http://www.redbooks.ibm.com/cgi-bin/searchsite.cgi ?query=linux+performance [ibm.com]
  • What does it tune?!? (Score:5, Interesting)

    by stretch0611 ( 603238 ) on Tuesday August 09, 2005 @04:34PM (#13281664) Journal
    While the reviewer mentions file systems he does not mention which servers the book tunes?

    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?

    • It seems like this book is meant for more general purpose tuning, which is in itself quite useful and important. I've seen books before for tuning specific server types. Perhaps having these both would make a good combo reference.
    • Tunarez sounds like a 0-day fish website. Better not look at that from work.
    • What type of linux servers does it teach you to tune?

      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.

      • What type of linux servers does it teach you to tune?
        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...)

        • According to an amazon lookup [amazon.com], "Tune web, file, database, and application servers running commercial workloads."

          The user reviews are pretty decent, it seems; I suppose they'll answer more of your questions.

        • Surely it gives you enough information to understand how to tune each of the types of server. That's surely what you want, not a 'how-to tune a database server running mysql on the 2.6 kernel with the ReiserFS filesystem'

          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.
        • You're not the intended market for this book.

          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.
        • I want to know what "type of server" it tunes... (db, www, file, etc...)

          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
  • ...is a pretty savvy fellow; he's a frequent [kerneltrap.org] LKML poster and has gotten some mentions on Kernel Traffic [kerneltraffic.org].
  • by h4rr4r ( 612664 ) on Tuesday August 09, 2005 @04:43PM (#13281712)
    That's easy it's just like your car. Put some huge fans in it, a window kit,some cold cathode lights and stickers, lots of stickers. That will easily double the performance. If you turn the box on its side thats good too, it gets the motherboard closer to the ground. Then some humongous plastic trim to round it all out. Don't forget to get neon heat spreaders for your ram, that lowers the latency a whole bunch.
  • by Anonymous Coward
    ...but you can't tuna fish.

  • by Jamu ( 852752 ) on Tuesday August 09, 2005 @04:48PM (#13281747)

    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!

  • TFA makes it sound like the book focuses primarily on kernel tuning. Can someone who knows more about the subject than I comment on the usefulness of distro specific tuning? I'm just curious if the tuning capabilities of the different products vary greatly. (I'd imagine they would but I'm not sure to what extent....)
    • There's very little aside from the kernel to tune on a linux box, and its almost entirely vendor neutral. Thats one of the really nice aspects of linux, that you can tune a SuSe box virtually identically to a RedHat box. This is in direct contrast to the proprietary world were a Sun box has utterly different tools from an AIX box.
      • Not really. Tuning the kernel is fine, but really doesn't give you much (IMHO) compared to tuning the applications you're using.

        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.
        • That really depends on the applications you're running. As an example, at the shop I'm at the applications we run are all custom in house apps, and there's no tuning to perform on them. We have gotten some pretty significant performance out of tuning things like bdflush and some other paramters. I agree though that for some applications its not really worthwhile to spend much time tuning the kernel when the bulk of your performance can be picked up in the application. I've picked up some pretty immense perf
    • Can someone who knows more about the subject than I comment on the usefulness of distro specific tuning?

      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
  • by GillBates0 ( 664202 ) on Tuesday August 09, 2005 @04:50PM (#13281759) Homepage Journal
    This wasn't mentioned in the summary/review, but the book appeared in a news posting on samba.org in June [samba.org]. It contains a chapter on File and Print Server performance written by Samba team member Steve French, and the fine folks at samba.org appear to recommend the book too.

    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)

    by ebatsky ( 582457 ) on Tuesday August 09, 2005 @04:51PM (#13281763) Journal
    just use some wi-fi spray [ebay.com] to speed up your data transfer rates and youre all set. i plan on completely soaking my ethernet router in this stuff permantenly
  • by Anonymous Coward on Tuesday August 09, 2005 @04:59PM (#13281827)
    If there's one thing that will keep this book from getting out of date it is being distro neutral. Of course that also implies being on the command line. Once you've learned to do something on the command line, you pretty much don't care what distro is on the box you're working on.

    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.
    • "Of course, Joe user shouldn't have to be able to cope with the command line... "
      They did when DOS was around. And "Joe user"--who is too lazy to deal with the CLI--should not be administering a server, let alone trying to tune it for performance gains.
      • "Of course, Joe user shouldn't have to be able to cope with the command line... "

        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

    • ...may I add, Joe user does not tune performance. So that's actually a non-issue.

      Just adding to your point.
    • Joe User isn't performance tuning a cluster of corporate web servers, either. He's using a desktop system that won't see much if any difference from adjusting most of the stuff in /proc.
  • by jpc ( 33615 )
    But there isnt a lot in it that you probably dont already know if you have any performance concerns. It is very dominated (unsurprisingly) by database workloads. Its ok, but doesnt say anything that important about tuning - it assumes you dont have source code access so it doesnt address the intersting questions like should I rewrite my application to use AIO.

    If you run Oracle you shoould buy it on expenses.
  • Anyone seen a good webpage or book on Freebsd 5 tuning? Sendmail is kicking the sh*t out of my Freebsd 5 boxes where on lunix it runs fine.

Understanding is always the understanding of a smaller problem in relation to a bigger problem. -- P.D. Ouspensky

Working...