{"id":100,"date":"2007-09-24T12:13:22","date_gmt":"2007-09-24T20:13:22","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=100"},"modified":"2009-07-11T04:20:16","modified_gmt":"2009-07-11T04:20:16","slug":"linux-performance-tuning","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/linux-performance-tuning\/","title":{"rendered":"Linux performance tuning"},"content":{"rendered":"<p>When attempting to find and fix performance bottlenecks on a Linux system, it&#8217;s helpful to know where to start. Here are a few resources I&#8217;ve found:<\/p>\n<p>IBM&#8217;s [Linux Performance and Tuning Guidelines](http:\/\/www.redbooks.ibm.com\/abstracts\/redp4285.html), published July 2007<\/p>\n<p>> This IBM Redpaper describes the methods you can use to tune Linux,<br \/>\ntools that you can use to monitor and analyze server performance, and<br \/>\nkey tuning parameters for specific server applications. The purpose of<br \/>\nthis redpaper is to understand, analyze, and tune the Linux operating<br \/>\nsystem to yield superior performance for any type of application you<br \/>\nplan to run on these systems. ( [Read more&#8230;](http:\/\/www.redbooks.ibm.com\/abstracts\/redp4285.html) )<\/p>\n<p>This website has useful tips:<br \/>\n[http:\/\/www.performancewiki.com\/](http:\/\/www.performancewiki.com\/)<\/p>\n<p>Google has some tools that people recommend:<br \/>\n[http:\/\/code.google.com\/p\/google-perftools\/wiki\/GooglePerformanceTools](http:\/\/code.google.com\/p\/google-perftools\/wiki\/GooglePerformanceTools)<\/p>\n<p>This book seems to be recommended:<br \/>\n[Optimizing Linux Performance](http:\/\/www.amazon.com\/Optimizing-Linux-Performance-Hands-Professional\/dp\/0131486829)<\/p>\n<p>In my experience, strace and ltrace along with the &#8220;-c&#8221; and &#8220;-T&#8221; options, are extremely useful &#8212; even for Perl scripts. The &#8220;-T&#8221; option shows the timings of calls, and can help isolate what calls are the slowest.<\/p>\n<p>* `strace -o program.trace -T -p <pid>`<br \/>\n* `ltrace -o program.trace -T -p <pid>`<\/p>\n<p>The &#8220;-c&#8221; option gives a summary of the calls that used the most time:<\/p>\n<p>* `strace -c -p <pid>`<br \/>\n* `ltrace -c -p <pid>`<\/p>\n<p>I haven&#8217;t found a good way to isolate memory leaks in Perl programs &#8212; not that I&#8217;m an expert. What has worked for me is to [divide and conquer](http:\/\/en.wikipedia.org\/wiki\/Divide_and_conquer_algorithm) in order to isolate the problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When attempting to find and fix performance bottlenecks on a Linux system, it&#8217;s helpful to know where to start. Here are a few resources I&#8217;ve found: IBM&#8217;s [Linux Performance and Tuning Guidelines](http:\/\/www.redbooks.ibm.com\/abstracts\/redp4285.html), published July 2007 > This IBM Redpaper describes the methods you can use to tune Linux, tools that you can use to monitor &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/linux-performance-tuning\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Linux performance tuning&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,17,19],"tags":[],"class_list":["post-100","post","type-post","status-publish","format-standard","hentry","category-linux","category-tech","category-work"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":1,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"predecessor-version":[{"id":409,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/100\/revisions\/409"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}