<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MrBrown blob &#187; Benchmarks</title>
	<atom:link href="http://charles.lescampeurs.org/category/benchmarks/feed" rel="self" type="application/rss+xml" />
	<link>http://charles.lescampeurs.org</link>
	<description>random bits.</description>
	<lastBuildDate>Sat, 10 Apr 2010 09:02:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Memory usage by group of processes</title>
		<link>http://charles.lescampeurs.org/2009/03/13/memory-usage-by-group-of-processes</link>
		<comments>http://charles.lescampeurs.org/2009/03/13/memory-usage-by-group-of-processes#comments</comments>
		<pubDate>Fri, 13 Mar 2009 14:14:26 +0000</pubDate>
		<dc:creator>CharlyBr</dc:creator>
				<category><![CDATA[Benchmarks]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://charles.lescampeurs.org/?p=173</guid>
		<description><![CDATA[While monitoring a http/php server, I needed to do some statistics about php-cgi memory usage. Playing with memory_limit in PHP, we wanted to know the average memory usage per php-cgi process. This is easily calculated with our best friend awk. First, get the number of php running processes: # ps aux &#124; grep php-cgi &#124; [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcharles.lescampeurs.org%2F2009%2F03%2F13%2Fmemory-usage-by-group-of-processes"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcharles.lescampeurs.org%2F2009%2F03%2F13%2Fmemory-usage-by-group-of-processes&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>While monitoring a http/php server, I needed to do some statistics about php-cgi memory usage.</p>
<p>Playing with <em>memory_limit</em> in PHP, we wanted to know the average memory usage per php-cgi process. This is easily calculated with our best friend awk.</p>
<p>First, get the number of php running processes:</p>
<pre># ps aux | grep php-cgi | grep -v grep | wc -l
126</pre>
<p>Then, use awk to calculate the average memory usage for these processes:</p>
<pre># ps aux | grep --exclude=grep php-cgi | grep -v grep | awk 'BEGIN{s=0;}{s=s+$6;}END{print s/126;}'
33987.8</pre>
<p>The number used in the calculation is the field RSS given by ps. The ps manual page says:</p>
<blockquote><p>rss: resident set size, the non-swapped physical memory that a task has used (in kiloBytes)</p></blockquote>
<p>You can also calculate the total memory used by all php-cgi processes:</p>
<pre># ps aux | grep --exclude=grep php-cgi | grep -v grep | awk 'BEGIN{s=0;}{s=s+$6;}END{print s;}'
4302028</pre>
<p>If you need to watch the trend of this average memory usage, a little shell loop does the trick:</p>
<pre># while [ 1 ]; do ps aux | grep --exclude=grep php-cgi | grep -v grep | awk 'BEGIN{s=0;}{s=s+$6;}END{print s/126;}'; sleep 2; done
34401.3
34405.1
34408.4
34409.4
34414.2
34417</pre>
]]></content:encoded>
			<wfw:commentRss>http://charles.lescampeurs.org/2009/03/13/memory-usage-by-group-of-processes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benchmark disk IOs</title>
		<link>http://charles.lescampeurs.org/2008/10/21/benchmark-disk-ios</link>
		<comments>http://charles.lescampeurs.org/2008/10/21/benchmark-disk-ios#comments</comments>
		<pubDate>Tue, 21 Oct 2008 12:17:43 +0000</pubDate>
		<dc:creator>CharlyBr</dc:creator>
				<category><![CDATA[Benchmarks]]></category>
		<category><![CDATA[disks]]></category>
		<category><![CDATA[iostat]]></category>

		<guid isPermaLink="false">http://charles.lescampeurs.org/?p=100</guid>
		<description><![CDATA[While reading this interresting article on benchmarking disks, Benjamin Schweizer pointed out a link to a python tool he wrote: benchmark disks IOs. I made a try on different available servers. Server 1 PowerEdge 2950 &#8211; Intel(R) Xeon(R) CPU 5160  @ 3.00GHz Dell PowerEdge Expandable RAID controller 5 (LSI Logic SAS based MegaRAID driver, PERC [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcharles.lescampeurs.org%2F2008%2F10%2F21%2Fbenchmark-disk-ios"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcharles.lescampeurs.org%2F2008%2F10%2F21%2Fbenchmark-disk-ios&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>While reading this interresting article on <a title="Benchmarking disks" href="http://mysqldba.blogspot.com/2008/10/mysql-disk-benchmarks-with-sysbench.html" target="_blank">benchmarking disks</a>, <a href="http://benjamin-schweizer.de">Benjamin Schweizer</a> pointed out a link to a python tool he wrote: <a href="http://benjamin-schweizer.de/files/iotest/" target="_blank">benchmark disks IOs</a>.</p>
<p>I made a try on different available servers.</p>
<h2>Server 1</h2>
<ul>
<li>PowerEdge 2950 &#8211; Intel(R) Xeon(R) CPU 5160  @ 3.00GHz</li>
<li>Dell PowerEdge Expandable RAID controller 5 (LSI Logic SAS based MegaRAID driver, PERC 5/i Integrated)</li>
<li>6 disks RAID 10</li>
<li> uname -a Linux &#8230; 2.6.22.1 #1 SMP Wed Aug 8 11:02:15 CEST 2007 x86_64 GNU/Linux</li>
</ul>
<pre># python iotest-2008-10-15 /dev/sda4 10
/dev/sda4, 397 GB, 512B blocks: 169.8 IOs/s, 84 kB/s
/dev/sda4, 397 GB, 1024B blocks: 160.7 IOs/s, 160 kB/s
/dev/sda4, 397 GB, 2 kB blocks: 153.2 IOs/s, 306 kB/s
/dev/sda4, 397 GB, 4 kB blocks: 140.2 IOs/s, 560 kB/s
/dev/sda4, 397 GB, 8 kB blocks: 133.0 IOs/s, 1 MB/s
/dev/sda4, 397 GB, 16 kB blocks: 113.2 IOs/s, 1 MB/s
/dev/sda4, 397 GB, 32 kB blocks: 85.7 IOs/s, 2 MB/s
/dev/sda4, 397 GB, 64 kB blocks: 80.0 IOs/s, 4 MB/s
/dev/sda4, 397 GB, 128 kB blocks: 74.2 IOs/s, 9 MB/s
/dev/sda4, 397 GB, 256 kB blocks: 70.9 IOs/s, 17 MB/s
/dev/sda4, 397 GB, 512 kB blocks: 62.3 IOs/s, 31 MB/s
/dev/sda4, 397 GB, 1024 kB blocks: 53.8 IOs/s, 53 MB/s</pre>
<h2>Server 2</h2>
<ul>
<li>PowerEdge 2950 &#8211; Intel(R) Xeon(R) CPU 5130  @ 2.00GHz</li>
<li>LSI Logic SAS based MegaRAID driver</li>
<li>2 disks RAID 0</li>
<li>uname -a: Linux &#8230; 2.6.18-5-686 #1 SMP Fri Jun 1 00:47:00 UTC 2007 i686 GNU/Linux</li>
</ul>
<pre># python iotest-2008-10-15 /dev/sda4 10
/dev/sda4, 220 GB, 512B blocks: 78.7 IOs/s, 39 kB/s
/dev/sda4, 220 GB, 1024B blocks: 76.9 IOs/s, 76 kB/s
/dev/sda4, 220 GB, 2 kB blocks: 77.5 IOs/s, 154 kB/s
/dev/sda4, 220 GB, 4 kB blocks: 77.9 IOs/s, 311 kB/s
/dev/sda4, 220 GB, 8 kB blocks: 76.6 IOs/s, 613 kB/s
/dev/sda4, 220 GB, 16 kB blocks: 75.5 IOs/s, 1 MB/s
/dev/sda4, 220 GB, 32 kB blocks: 73.9 IOs/s, 2 MB/s
/dev/sda4, 220 GB, 64 kB blocks: 68.5 IOs/s, 4 MB/s
/dev/sda4, 220 GB, 128 kB blocks: 58.9 IOs/s, 7 MB/s
/dev/sda4, 220 GB, 256 kB blocks: 44.7 IOs/s, 11 MB/s
/dev/sda4, 220 GB, 512 kB blocks: 33.3 IOs/s, 16 MB/s
/dev/sda4, 220 GB, 1024 kB blocks: 23.4 IOs/s, 23 MB/s</pre>
<h2>Server 3</h2>
<ul>
<li>PowerEdge 1950</li>
<li>Intel(R) Xeon(R) CPU E5410  @ 2.33GHz</li>
<li>LSI Logic / Symbios Logic &#8211; SAS1078 PCI-X Fusion-MPT SAS</li>
<li>2 disks RAID 1</li>
<li>uname -a: Linux &#8230; 2.6.18-6-686 #1 SMP Tue Jun 17 21:31:27 UTC 2008 i686 GNU/Linux</li>
</ul>
<pre># python iotest-2008-10-15 /dev/sda4 10
/dev/sda4, 220 GB, 512B blocks: 88.6 IOs/s, 44 kB/s
/dev/sda4, 220 GB, 1024B blocks: 89.6 IOs/s, 89 kB/s
/dev/sda4, 220 GB, 2 kB blocks: 87.7 IOs/s, 175 kB/s
/dev/sda4, 220 GB, 4 kB blocks: 86.4 IOs/s, 345 kB/s
/dev/sda4, 220 GB, 8 kB blocks: 86.4 IOs/s, 690 kB/s
/dev/sda4, 220 GB, 16 kB blocks: 83.6 IOs/s, 1 MB/s
/dev/sda4, 220 GB, 32 kB blocks: 79.9 IOs/s, 2 MB/s
/dev/sda4, 220 GB, 64 kB blocks: 71.9 IOs/s, 4 MB/s
/dev/sda4, 220 GB, 128 kB blocks: 59.2 IOs/s, 7 MB/s
/dev/sda4, 220 GB, 256 kB blocks: 54.2 IOs/s, 13 MB/s
/dev/sda4, 220 GB, 512 kB blocks: 34.6 IOs/s, 17 MB/s
/dev/sda4, 220 GB, 1024 kB blocks: 22.1 IOs/s, 22 MB/s</pre>
<h2>Links</h2>
<ul>
<li><a title="MegaCli Cheat sheet" href="http://tools.rapidsoft.de/perc/perc-cheat-sheet.html" target="_blank"><span class="cmbx-12x-x-144">LSI Logic MegaRAID</span><span class="cmr-17"> – Emergency Cheat Sheet</span></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://charles.lescampeurs.org/2008/10/21/benchmark-disk-ios/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
