<?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>Stormsail &#187; Performance</title>
	<atom:link href="http://www.stormsail.com/category/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stormsail.com</link>
	<description>The future's bright, the futures Andy Land...</description>
	<lastBuildDate>Mon, 29 Mar 2010 17:41:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Multiple Oracle instances performance issue</title>
		<link>http://www.stormsail.com/2009/08/11/multiple-oracle-instances-performance-issue/</link>
		<comments>http://www.stormsail.com/2009/08/11/multiple-oracle-instances-performance-issue/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 23:11:42 +0000</pubDate>
		<dc:creator>hippy</dc:creator>
				<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.stormsail.com/2009/08/11/multiple-oracle-instances-performance-issue/</guid>
		<description><![CDATA[Finally closed a VOS case that&#8217;s been open for over a year which was related to high system consumption caused by running multiple Oracle RDBMS&#8217;s on a single system. The observation was 80/90% system cpu consumption from mpstat 1 and the following from lockstat profiling: Profiling interrupt: 67240 events in 2.168 seconds (31017 events/sec) Count [...]]]></description>
			<content:encoded><![CDATA[<p>Finally closed a VOS case that&#8217;s been open for over a year which was related to high system consumption caused by running multiple Oracle RDBMS&#8217;s on a single system. The observation was 80/90% system cpu consumption from mpstat 1 and the following from lockstat profiling:</p>
<p>Profiling interrupt: 67240 events in 2.168 seconds (31017 events/sec)</p>
<p>Count genr cuml rcnt nsec Hottest CPU+PIL Caller<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />40920 61% &#8212;- 0.00 987 cpu[7] fop_ioctl<br />40920 61% &#8212;- 0.00 987 cpu[7] ioctl<br />40880 61% &#8212;- 0.00 986 cpu[7] read_kstat_data<br />40248 60% &#8212;- 0.00 1077 cpu[7] syscall_trap<br />38780 58% &#8212;- 0.00 947 cpu[2] mutex_vector_enter<br />32478 48% &#8212;- 0.00 947 cpu[5] kstat_hold_bykid<br />32477 48% &#8212;- 0.00 947 cpu[5] kstat_hold<br />13516 20% &#8212;- 0.00 1845 cpu[102] (usermode)<br />6466 10% &#8212;- 0.00 1904 cpu[423] syscall_trap32<br />6169 9% &#8212;- 0.00 926 cpu[3] kstat_rele<br />4738 7% &#8212;- 0.00 1626 cpu[96] thread_start<br />2420 4% &#8212;- 0.00 1359 cpu[135]+11 idle<br />2317 3% &#8212;- 0.00 1464 cpu[135]+11 disp_getwork<br />2122 3% &#8212;- 0.00 2764 cpu[101] fop_read<br />1388 2% &#8212;- 0.00 2510 cpu[101] vx_read<br />1379 2% &#8212;- 0.00 2509 cpu[101] vx_read1<br />1352 2% &#8212;- 0.00 2503 cpu[101] vx_cache_read<br />1267 2% &#8212;- 0.00 2459 cpu[418] trap<br />1215 2% &#8212;- 0.00 3059 cpu[128] fop_write<br />1082 2% &#8212;- 0.00 2339 cpu[418] utl0<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Originally I raised CR 6734910 &#8211; &quot;kstat_hold doesn&#8217;t scale well on large systems&quot; to track this but it seemed as though Oracle could do a better job of utilizing the kstat interface which then resulted in Oracle bug and Patch 8531434 &#8211; &quot;KSTAT CALLS BY MMNL/CJQ0 INCUR HIGH SYSTEM CPU WHEN RUNNING NUMEROUS INSTANCES&quot; being logged and fixed for 10.2.0.4.0. 11g doesn&#8217;t appear effected by this issue. So to avoid a performance hit whilst running multiple Oracle instances on a single host you can either use the workaround of Oracle parameter _job_queue_internal (e.g. from 5 to 30) and potentially loose granularity of performance statistics or patch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stormsail.com/2009/08/11/multiple-oracle-instances-performance-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Observability and Diagnosis Techniques are the way forward</title>
		<link>http://www.stormsail.com/2009/04/20/observability-and-diagnosis-techniques-are-the-way-forward/</link>
		<comments>http://www.stormsail.com/2009/04/20/observability-and-diagnosis-techniques-are-the-way-forward/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 02:58:05 +0000</pubDate>
		<dc:creator>hippy</dc:creator>
				<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.stormsail.com/2009/04/20/observability-and-diagnosis-techniques-are-the-way-forward/</guid>
		<description><![CDATA[I&#8217;ve just closed down another escalation involving a performance comparison of an application (Finacle in this case) running on a 6 board SunFire 6900 and a 6 board SunFire E25K. Obviously we&#8217;re not comparing apples and pears here but never the less the customer found that they noticed huge performance differences during core business hours [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just closed down another escalation involving a performance<br />
comparison of an application (<a href="http://en.wikipedia.org/wiki/Finacle">Finacle</a> in this case) running on a 6 board<br />
<a href="http://sunsolve.sun.com/handbook_pub/validateUser.do?target=Systems/E6900_R/E6900_R">SunFire 6900</a> and a 6 board <a href="http://sunsolve.sun.com/handbook_pub/validateUser.do?target=Systems/SunFireE25K_R/SunFireE25K_R">SunFire E25K</a>. Obviously we&#8217;re not comparing<br />
apples and pears here but never the less the customer found that they<br />
noticed huge performance differences during core business hours with<br />
the *same* (and I use that term loosely as nothing entirely can occupy<br />
the same physical space in time or made up of identical<br />
particles&#8230;.you know what I mean&#8230;although perhaps some clever physicists can argue against that?!). Anyhow, the customer made the<br />
argument that they were using the same application binaries on both<br />
platforms and were delivering the same&nbsp; user load (and they still<br />
couldn&#8217;t confirm that!) to both but were seeing a huge performance<br />
degradation (slow interactive response from the users perspective and<br />
high load) on the E25K domain which didn&#8217;t actually surprise me as the<br />
25K is a larger system and will have larger memory latencies due to the<br />
larger interconnect differences to the E6900. So, what we observed was<br />
multiple application processes consuming userland cpu resources and no<br />
userland lock contention via the prstat micro state accounting output.<br />
If we&#8217;d suspected a scalability issue with the application then we&#8217;d<br />
more than likely observe userland lock contention. One of the frequent<br />
flyers we see in the performance team are caused by applications using<br />
malloc in multi threaded SMP environments, see this interesting <a href="http://developers.sun.com/solaris/articles/multiproc/multiproc.html">read</a><br />
for further details.<br />
Unfortunately that wasn&#8217;t to be the case so we needed to take another<br />
direction in the observability game to prove to the customer the<br />
fundamental differences between the two customer platforms. The answer<br />
here was to use cpustat and the ability to show the difference between<br />
the two platforms using <a href="http://en.wikipedia.org/wiki/Cycles_Per_Instruction">cycles per instruction</a> calculations.</p>
<p>The following chapter from Solaris™ Performance and Tools: DTrace and<br />
MDB Techniques for Solaris 10 and OpenSolaris explains the methodology (or read from <a href="http://sunlibrary.safaribooksonline.com/0131568191">Safari</a> Books if you&#8217;ve an account or buy it from <a href="http://www.amazon.co.uk/Solaris-Performance-Tools-Techniques-OpenSolaris/dp/0131568191/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1240223624&amp;sr=8-1">Amazon</a> as the entire book is well worth a read).</p>
<p><b><br />
8.2.7. Cycles per Instruction</b></p>
<p>The CPC events can monitor more than just the CPU caches. The following<br />
example demonstrates the use of the cycle count and instruction count<br />
on an Ultra-SPARC IIi to calculate the average number of cycles per<br />
instruction, printed last.</p>
<p># cpustat -nc pic0=Cycle_cnt,pic1=Instr_cnt 10 1 | \<br />
awk &#8216;{ printf &quot;%s %.2f cpi\n&quot;,$0,$4/$5; }&#8217;<br />
10.034 0 tick 3554903403 3279712368 1.08 cpi<br />
10.034 1 total 3554903403 3279712368 1.08 cpi</p>
<p>
This single 10-second sample averaged 1.08 cycles per instruction.<br />
During this test, the CPU was busy running an infinite loop program.<br />
Since the same simple instructions are run over and over, the<br />
instructions and data are found in the Level-1 cache, resulting in fast<br />
instructions.</p>
<p>Now the same test is performed while the CPU is busy with heavy random memory access:</p>
<p># cpustat -nc pic0=Cycle_cnt,pic1=Instr_cnt 10 1 | \<br />
awk &#8216;{ printf &quot;%s %.2f cpi\n&quot;,$0,$4/$5; }&#8217;<br />
10.036 0 tick 205607856 34023849 6.04 cpi<br />
10.036 1 total 205607856 34023849 6.04 cpi</p>
<p>
Since accessing main memory is much slower, the cycles per instruction have increased to an average of 6.04.</p>
<p>&#8211; </p>
<p>So, looking at the customer&#8217;s data:</p>
<p>[andharr@node25k]$ grep total cpu*<br />
cpu2.out: 30.429 48 total 1453222115333 358247394908 4.06 cpi<br />
cpu22.out: 30.523 48 total 1463632215285 347056691816 4.22 cpi<br />
cpu222.out: 30.367 48 total 1395799585592 423393952271 3.30 cpi</p>
<p>[andharr@node6900]$ grep total cpu*<br />
cpu1.out: 31.038 48 total 1209418147610 522125013039 2.32 cpi<br />
cpu11.out: 30.311 48 total 1194302525311 573624473405 2.08 cpi<br />
cpu111.out: 30.408 48 total 1105516225829 552190193006 2.00 cpi</p>
<p>So the 25k is showing a higher cycles per instruction average than the<br />
6900, so it does show a difference in performance between the two<br />
systems. This is more than likely due to memory latency difference on<br />
the 25k. If we actually look at the raw data for the busy times sorted<br />
by size for the sample period then you can see some very big<br />
differences in the largest cpi value between the systems:</p>
<p>[andharr@node6900]$ cat cpu1.out | awk &#8216;{print $6}&#8217; |sort -n | tail<br />
6.30<br />
6.37<br />
7.14<br />
7.16<br />
7.26<br />
7.35<br />
8.17<br />
8.27<br />
8.36<br />
8.91<br />
[andharr@node6900]$ cat cpu11.out | awk &#8216;{print $6}&#8217; |sort -n | tail<br />
6.67<br />
6.71<br />
6.77<br />
6.80<br />
7.21<br />
7.70<br />
7.72<br />
8.40<br />
9.21<br />
11.92<br />
[andharr@node6900]$ cat cpu111.out | awk &#8216;{print $6}&#8217; |sort -n | tail<br />
6.26<br />
6.39<br />
6.65<br />
6.93<br />
6.99<br />
7.25<br />
7.81<br />
8.65<br />
8.81<br />
9.32</p>
<p>[andharr@node25k]$ cat cpu2.out | awk &#8216;{print $6}&#8217; |sort -n |tail<br />
26.65<br />
26.86<br />
26.99<br />
28.71<br />
29.48<br />
30.06<br />
30.87<br />
32.93<br />
34.05<br />
34.36<br />
[andharr@node25k]$ cat cpu22.out | awk &#8216;{print $6}&#8217; |sort -n |tail<br />
31.35<br />
31.82<br />
32.32<br />
33.16<br />
34.03<br />
35.00<br />
38.51<br />
47.69<br />
50.19<br />
51.04<br />
[andharr@node25k]$ cat cpu222.out | awk &#8216;{print $6}&#8217; |sort -n |tail<br />
26.03<br />
26.71<br />
26.90<br />
27.31<br />
27.45<br />
28.29<br />
28.42<br />
29.28<br />
32.30<br />
35.40</p>
<p> <b>Conclusion</b></p>
<p>So the fact that the E25k showed higher numbers didn&#8217;t really indicate<br />
a good match with the Finacle application running on it. It would seem<br />
to suggest that Finacle is generating a memory latency sensitive<br />
workload which might not be entirely suited to the 25k platform.<br />
pbinding the Finacle application into specific processor sets might<br />
alleviate thread migration and some non-local memory accesses which may<br />
improve some performance but not entirely eradicate the memory latency<br />
issue from happening. The reason it&#8217;s more noticeable on the E25K<br />
platform than the E6900 is that there is a greater distance to travel<br />
across the E25K interconnect than the E6900 ie a greater distance in<br />
terms of copper for the electrical signals to travel. MPO (Memory<br />
Placement Optimization) was introduced in Solaris 9 to help elevate<br />
latency in large scale NUMA configurations by attempting to keep LWP&#8217;s<br />
local to it&#8217;s &quot;home&quot; cpu/memory board, but in some cases cannot<br />
eliminate it for all workloads (in this case).</p>
<p>See the following documents for background information on MPO:</p>
<p><a href="http://sunsolve.sun.com/search/document.do?assetkey=1-61-214954-1&amp;searchclause=214954"><br />
Solution 214954 : Sun Fire[TM] Servers: Memory Placement Optimization<br />
(MPO)</a> and <a href="http://sunsolve.sun.com/search/document.do?assetkey=1-61-216813-1&amp;searchclause=216813">Solution 216813 : Sun Fire[TM] Servers: Memory Placement<br />
Optimization (MPO) Frequently Asked Questions (FAQ)</a></p>
<p>As my esteemed colleague <a href="http://blogs.sun.com/clive/">Clive</a> said,<br />
&quot;<i><b>Applications drive system behaviour</b></i>&quot; so we need to look at the<br />
application and how it interacts with the system rather than the other<br />
way round which always points me back to one of my first blog <a href="http://blogs.sun.com/hippy/entry/what_s_the_answer_to">entries</a> on the importance<br />
of understanding the application architecture and starting a top down<br />
approach. <img src='http://www.stormsail.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.stormsail.com/2009/04/20/observability-and-diagnosis-techniques-are-the-way-forward/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance considerations when upgrading Solaris</title>
		<link>http://www.stormsail.com/2009/01/19/performance-considerations-when-upgrading-solaris/</link>
		<comments>http://www.stormsail.com/2009/01/19/performance-considerations-when-upgrading-solaris/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 09:05:32 +0000</pubDate>
		<dc:creator>hippy</dc:creator>
				<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.stormsail.com/2009/01/19/performance-considerations-when-upgrading-solaris/</guid>
		<description><![CDATA[The biggest piece of advice I can give you about those of you about to upgrade with lots of custom tunables in /etc/system&#8230;&#8230;..read the manual (FTFM if you&#8217;re feeling particularly vocal), no seriously, I mean it! You only have to read the Solaris tunables reference manual as it actually discusses upgrading to newer releases with [...]]]></description>
			<content:encoded><![CDATA[<p>The biggest piece of advice I can give you about those of you about to upgrade with lots of custom tunables in /etc/system&#8230;&#8230;..read the manual (FTFM if you&#8217;re feeling particularly vocal), no seriously, I mean it! <img src='http://www.stormsail.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You only have to read the <a href="http://docs.sun.com/app/docs/doc/817-0404">Solaris tunables</a> reference manual as it actually discusses upgrading to newer releases with older /etc/system tunables:</p>
<p><i>&quot;We recommend that you start with an empty /etc/system file when moving to a new Solaris<br />release. As a first step, add only those tunables that are required by in-house or third-party<br />applications. Any tunables that involve System V IPC (semaphores, shared memory, and<br />message queues) have been modified in the Solaris 10 release and should be changed in your<br />environment. For more information, see “System V IPC Configuration” on page 21. After<br />baseline testing has been established, evaluate system performance to determine if additional<br />tunable settings are required.&quot; </i></p>
<p>So, that&#8217;s a move it out of the way and start from scratch. <img src='http://www.stormsail.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Obviously speak to your application vendors about anything that is required to run the application but other than that, see how things go and only change when and where necessary otherwise you could run into other problems.</p>
<p>The only application which I&#8217;ll make specific points about is Oracle as with Solaris 10 we&#8217;ve introduced resource controls so the shared memory / semaphore settings no longer need to be defined in /etc/system. See the <a href="http://download.oracle.com/docs/cd/B19306_01/install.102/b15690/pre_install.htm#sthref259">Oracle installation guide</a>&nbsp; or&nbsp; <a href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-71582-1">Solution&nbsp; 208623 :&nbsp;&nbsp; Solaris[TM] 10 Operating System: System V Inter-Process Communication (IPC) resource controls</a> for further details.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stormsail.com/2009/01/19/performance-considerations-when-upgrading-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diagnosing a VxFS filesystem performance issue</title>
		<link>http://www.stormsail.com/2008/12/22/diagnosing-a-vxfs-filesystem-performance-issue/</link>
		<comments>http://www.stormsail.com/2008/12/22/diagnosing-a-vxfs-filesystem-performance-issue/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 07:23:51 +0000</pubDate>
		<dc:creator>hippy</dc:creator>
				<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.stormsail.com/2008/12/22/diagnosing-a-vxfs-filesystem-performance-issue/</guid>
		<description><![CDATA[I recently got involved in an interesting performance problem in which the customer was experiencing differences in copying a 500mb file to 2 different VxFS filesystems on the same box by up to a factor of 4 in some cases ie &#34;timex cp &#60;500mb file&#62; /vxfs_filesystem&#34;. The only thing which had changed (I&#8217;m actually smiling [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got involved in an interesting performance problem in which the customer was experiencing differences in copying a 500mb file to 2 different VxFS filesystems on the same box by up to a factor of 4 in some cases ie &quot;timex cp &lt;500mb file&gt; /vxfs_filesystem&quot;. The only thing which had changed (I&#8217;m actually smiling at the word *only*) between 2 dates were:</p>
<p>* Various OS Patches<br />* Symantec Veritas Volume Manager Patch<br />* Upgraded LPFC Driver Servers<br />* Upgraded firmware<br />* Upgraded Power Path Servers<br />* Upgraded SYMCLI</p>
<p>which doesn&#8217;t help immediately in thinking about probable or possible causes due to far too many things changing! So how does one actually track down what&#8217;s happening in the lifecycle of the &quot;cp&quot; on a Solaris 9 box&#8230;&#8230; TNF to the rescue again. Using the TNF wrapper script from one of my previous <a href="http://blogs.sun.com/hippy/entry/oracle_redo_logs_and_dd">post</a>, we could enable and disable TNF whilst the cp was happening. So once we&#8217;d got that data from the customer and extracted / processed the TNF buffers I first looked at the TNF truss outputs:</p>
<p>[andharr@exdev:~/tnf/tnf/notworking]$ more tnf.truss <br />looking for pid&nbsp; 12045<br />Now(ms)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; duration(ms)&nbsp;&nbsp; pid&nbsp;&nbsp;&nbsp;&nbsp; thread&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errno<br />48335.67488000&nbsp;&nbsp; 15.83081400&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />48351.53089800&nbsp;&nbsp; 254.21403800&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />48605.75773800&nbsp;&nbsp; 16.39489300&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />48622.17487400&nbsp;&nbsp; 244.79986500&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />48866.98866100&nbsp;&nbsp; 16.51242700&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />48883.52309100&nbsp;&nbsp; 263.08493800&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />49146.62003100&nbsp;&nbsp; 16.96265000&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />49163.60188400&nbsp;&nbsp; 262.34315500&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />49425.95560000&nbsp;&nbsp; 13.35143400&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />49439.32559600&nbsp;&nbsp; 256.47619000&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />49695.81298800&nbsp;&nbsp; 13.16556800&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />49708.99975900&nbsp;&nbsp; 246.71828900&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />49955.73060900&nbsp;&nbsp; 15.93346900&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />49971.68440100&nbsp;&nbsp; 254.45911200&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />50226.15543500&nbsp;&nbsp; 16.82535100&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />50242.98686700&nbsp;&nbsp; 262.94091700&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />50505.93946600&nbsp;&nbsp; 15.95571100&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />50521.91406000&nbsp;&nbsp; 254.57880900&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />50776.50887100&nbsp;&nbsp; 16.54139300&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />50793.06922600&nbsp;&nbsp; 263.14118400&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />51056.22369200&nbsp;&nbsp; 13.62531200&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />51069.86692700&nbsp;&nbsp; 265.74658200&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />51335.62423100&nbsp;&nbsp; 14.17114700&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />51349.81458000&nbsp;&nbsp; 266.32114200&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />51616.14980400&nbsp;&nbsp; 14.28020100&nbsp;&nbsp;&nbsp; 12045&nbsp;&nbsp;&nbsp; 0x30101ab09a0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />&lt;snip&gt;</p>
<p>[andharr@exdev:~/tnf/tnf/working]$ more tnf.truss<br />looking for pid&nbsp; 16545<br />&lt;snip&gt;<br />Now(ms)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; duration(ms)&nbsp;&nbsp; pid&nbsp;&nbsp;&nbsp;&nbsp; thread&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errno<br />74.48367000&nbsp;&nbsp; 0.09929400&nbsp;&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />74.60224600&nbsp;&nbsp; 145.95268900&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />220.56909700&nbsp;&nbsp; 15.92858800&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />236.51624700&nbsp;&nbsp; 145.57631700&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#038;nbs<br />
p; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />382.11048600&nbsp;&nbsp; 17.13331300&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />399.25084000&nbsp;&nbsp; 148.40430500&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />547.67306700&nbsp;&nbsp; 15.89682400&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />563.59125400&nbsp;&nbsp; 143.89640600&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />707.50126200&nbsp;&nbsp; 16.40793300&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />723.91583600&nbsp;&nbsp; 144.97527400&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />868.90455200&nbsp;&nbsp; 15.84185600&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />884.76377000&nbsp;&nbsp; 145.10353100&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1029.88114300&nbsp;&nbsp; 15.60142300&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1045.50632900&nbsp;&nbsp; 145.67129000&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1191.19362100&nbsp;&nbsp; 16.41825600&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1207.63660000&nbsp;&nbsp; 144.74260200&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1352.39696400&nbsp;&nbsp; 17.08674700&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1369.49027200&nbsp;&nbsp; 143.29896300&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1512.80107700&nbsp;&nbsp; 14.10729700&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1526.91309500&nbsp;&nbsp; 144.05898900&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1670.98672600&nbsp;&nbsp; 16.63788500&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1687.63237200&nbsp;&nbsp; 141.60897100&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1829.25798500&nbsp;&nbsp; 15.96867300&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1845.23249900&nbsp;&nbsp; 144.46080400&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;800000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />1989.70738500&nbsp;&nbsp; 15.94683000&nbsp;&nbsp;&nbsp; 16545&nbsp;&nbsp;&nbsp; 0x30129365ce0&nbsp;&nbsp;&nbsp; mmap64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x7fffffff&nbsp;&nbsp;&nbsp;&nbsp; 0<br />&lt;snip&gt;</p>
<p>Now, that&#8217;s interesting, in that we see a difference in the time taken for write(), so what&#8217;s happening in the write() lifecycle?</p>
<p>&lt;not working&gt;<br />&nbsp;&nbsp;&nbsp; 48545.230384&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.006560 12045&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30101ab09a0 224 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0x11100000faf&nbsp; block: 39690624&nbsp; size: 0&#215;10000&nbsp; buf: 0x3004185e058&nbsp; flags: 558353 0,0<br />&nbsp;&nbsp;&nbsp; 48545.277271&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.000080 12045&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30101ab09a0 224 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0x1240000007a&nbsp; block: 39692928&nbsp; size: 0&#215;10000&nbsp; buf: 0x312eec85688&nbsp; flags: 1289 0,0<br />&nbsp;&nbsp;&nbsp; 48545.416170&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.000800 12045&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30101ab09a0 224 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0x11100000faf&nbsp; block: 39690752&nbsp; size: 0&#215;10000&nbsp; buf: 0x327286721b0&nbsp; flags: 558353 0,0<br />&nbsp;&nbsp;&nbsp; 48545.454655&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.002640 12045&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30101ab09a0 224 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0x1240000007a&nbsp; block: 39693056&nbsp; size: 0&#215;10000&nbsp; buf: 0x506b36947c8&nbsp; flags: 1289 0,0<br />&nbsp;&nbsp;&nbsp; 48545.544348&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.008562 12045&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30101ab09a0 224 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0x11100000faf&nbsp; block: 39690880&nbsp; size: 0&#215;10000&nbsp; buf: 0x3004185f458&nbsp; flags: 558353 0,0<br />&nbsp;&nbsp;&nbsp; 48545.580753&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.012962 12045&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30101ab09a0 224 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0x1240000007a&nbsp; block: 39693184&nbsp; size: 0&#215;10000&nbsp; buf: 0x312ead7be08&nbsp; flags: 1289 0,0<br />&nbsp;&nbsp;&nbsp; 48545.642601&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.004721 12045&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30101ab09a0 224 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0x11100000faf&nbsp; block: 39691008&nbsp; size: 0&#215;10000&nbsp; buf: 0x30070b4af30&nbsp; flags: 558353 0,0<br />&nbsp;&nbsp;&nbsp; 48545.676366&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.003361 12045&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30101ab09a0 224 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0x1240000007a&nbsp; block: 39693312&nbsp; size: 0&#215;10000&nbsp; buf: 0x3006ca9bb20&nbsp; flags: 1289 0,0<br />&nbsp;&nbsp;&nbsp; 48545.735814&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.003681 12045&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30101ab09a0 224 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0x11100000faf&nbsp; block: 39691136&nbsp; size: 0&#215;10000&nbsp; buf: 0x327cd4835c8&nbsp; flags: 558353 0,0<br />&lt;snip&gt;</p>
<p>So our I/O appears to be in 65k chunks but how long did 1 I/O actually take?<br /><<br />
br />48545.230384&nbsp; -&nbsp; 12045 1 0x30101ab09a0 224 strategy device: 273,4015&nbsp; block: 39690624 size: 0&#215;10000 buf: 0x3004185e058 flags: 0&#215;88511<br />48549.243496&nbsp; -&nbsp; 0 0 0x2a100477d20 64 biodone device: 273,4015&nbsp; block: 39690624 buf: 0x3004185e058</p>
<p>4.013112ms</p>
<p>&lt;working&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 236.516247&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.000720 16545&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30129365ce0&nbsp; 65 syscall_start&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sysnum: 4 write<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 236.972870&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.004481 16545&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30129365ce0&nbsp; 65 address_fault&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address: 0xfe800000&nbsp; fault_type: 2&nbsp; access: 1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 238.215601&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.068810 16545&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30129365ce0&nbsp; 65 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0x11100000fa9&nbsp; block: 24838144&nbsp; size: 0&#215;100000&nbsp; buf: 0x300359fa3a8&nbsp; flags: 289 0,0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 238.247765&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.002240 16545&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30129365ce0&nbsp; 65 strategy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device: 0&#215;12400000022&nbsp; block: 24840448&nbsp; size: 0&#215;100000&nbsp; buf: 0x30038cd24a0&nbsp; flags: 297 0,0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 238.461314&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.002240 16545&nbsp;&nbsp;&nbsp;&nbsp; 1 0x30129365ce0&nbsp; 65 thread_block&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reason: 0x300359fa468&nbsp; stack:&nbsp; 4 0x114190801048bb0 0x10f28ec01080b30 0x78a4d834789aa770 0&#215;78<br />a7dd6078a798b0<br />&lt;snip&gt;</p>
<p>238.215601&nbsp; -&nbsp; 16545 1 0x30129365ce0 65 strategy device: 273,4009&nbsp; block: 24838144 size: 0&#215;100000 buf: 0x300359fa3a8 flags: 0&#215;121<br />254.402304&nbsp; -&nbsp; 0 0 0x2a100471d20 64 biodone device: 273,4009&nbsp; block: 24838144 buf: 0x300359fa3a8</p>
<p>16.186703ms</p>
<p>So time for 8m in 1m chunks:</p>
<p>16.18 * 8 = 129.493624 </p>
<p>and 8m in 65k chunks:</p>
<p>4.013112 * 128 = 513.678336 (it&#8217;s going to be less anyway due to fact that we can queue iops and be completed in parallel)</p>
<p>So it would seem that the difference in time can be explained by the way that the I/O is broken up on each filesystem. Perhaps the way in which the filesystem has been configured can explain the difference? Unforuntately, I didn&#8217;t see differences between the filesystems themselves but some of the configuration details did match some of our physical write sizes:</p>
<p>Filesystem i/o parameters for /filesystem<br />read_pref_io = 65536<br />read_nstream = 1<br />read_unit_io = 65536<br />write_pref_io = 65536<br />write_nstream = 1<br />write_unit_io = 65536<br />pref_strength = 10<br />buf_breakup_size = 1048576<br />discovered_direct_iosz = 262144<br />max_direct_iosz = 1048576<br />default_indir_size = 8192<br />qio_cache_enable = 0<br />write_throttle = 0<br />max_diskq = 1048576<br />initial_extent_size = 1<br />max_seqio_extent_size = 2048<br />max_buf_data_size = 8192<br />hsm_write_prealloc = 0<br />read_ahead = 1<br />inode_aging_size = 0<br />inode_aging_count = 0<br />fcl_maxalloc = 8130396160<br />fcl_keeptime = 0<br />fcl_winterval = 3600<br />oltp_load = 0</p>
<p>Now our write pattern ties in for our non-working cp in that our prefered write size is 65536 (as above) but for the working one we&#8217;re using 1048576 which could be due to discovered direct I/O. Now write() is trying to complete a size of 8388608 (8mb) which we can see from the truss:</p>
<p>29986:&nbsp;&nbsp; 0.0146 mmap64(0xFE800000, 8388608, PROT_READ, MAP_SHARED|MAP_FIXED, 3, 0&#215;07000000) = 0xFE800000<br />29986:&nbsp;&nbsp; 0.2394 write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0&quot;.., 8388608) = 8388608<br />29986:&nbsp;&nbsp; 0.0107 mmap64(0xFE800000, 8388608, PROT_READ, MAP_SHARED|MAP_FIXED, 3, 0&#215;07800000) = 0xFE800000<br />29986:&nbsp;&nbsp; 0.2599 write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0&quot;.., 8388608) = 8388608</p>
<p>so why is our I/O being broken into smaller chunks for one filesystem and not on the other? Ah, what if one of the filesystems was fragmented more than the other? Yes, that could explain the difference if VxFS internally make the choice of using one other the other depending on the state of the filesystem. It&#8217;s interesting reading the VxFS administration guide as it clearly documents the possible performance implications due to fragmentation (yes, RTFM is applicable here):</p>
<p>Fragmentation reduces performance and availability. Regular use of fsadm’s fragmentation reporting and reorganization facilities is therefore advisable. The easiest way to ensure that fragmentation does not become a problem is to schedule regular defragmentation runs using the cron command. Defragmentation scheduling should range from weekly (for frequently used file systems) to monthly (for infrequently used file systems). Extent fragmentation should be monitored with fsadm or the df&nbsp; o s commands. There are three factors which can be used to determine the degree of fragmentation:</p>
<p>&nbsp;&nbsp; &nbsp;* Percentage of free space in extents of less than eight blocks in length<br />&nbsp;&nbsp; &nbsp;* Percentage of free space in extents of less than 64 blocks in length<br />&nbsp;&nbsp; &nbsp;* Percentage of free space in extents of length 64 blocks or greater</p>
<p>An unfragmented file system will have the following characteristics:</p>
<p>&nbsp;&nbsp; &nbsp;* Less than 1 percent of free space in extents of less than eight blocks in length<br />&nbsp;&nbsp; &nbsp;* Less than 5 percent of free space in extents of less than 64 blocks in length<br />&nbsp;&nbsp; &nbsp;* More than 5 percent of the total file system size available as free extents in lengths of 64 or more blocks</p>
<p>A badly fragmented file system will have one or more of the following characteristics:</p>
<p>&nbsp;&nbsp; &nbsp;* Greater than 5 percent of free space in extents of less than 8 blocks in length<br />&nbsp;&nbsp; &nbsp;* More than 50 percent of free space in extents of less than 64 blocks in length<br />&nbsp;&nbsp; &nbsp;* Less than 5 percent of the total file system size available as free extents in lengths of 64 or more blocks</p>
<p>The optimal period for scheduling of extent reorganization runs can be determined by choosing a reasonable interval, scheduling fsadm runs at the initial interval, and running the extent fragmentation report feature of fsadm before and after the reorganization. The “before” result is the degree of fragmentation prior to the reorganization. If the degree of fragmentation is approaching the figures for bad fragmentation, reduce the interval between fsadm runs. If the degree of fragmentation is low, increase the interval between fsadm runs. The “after” result is an indication of how well the reorganizer has performed. The degree of fragmentation should be close to the characteristics of an unfragmented file system. If not, it may be a good idea to resize the file system; full file systems tend to fragment and are difficult to defragment. It is also possible that the reorganization is not being performed at a time during which the file system in question is relatively idle.</p>
<p>&#8212;</p>
<h4>Conclusion</h4>
<p>As in all performance related issues, you really need to understand the lifecycle of what you&#8217;re interested it so you can ideally observe what&#8217;s happening or not happening! In this case I used mainly truss and TNF to drill down to see whats happening. However what should happen way before that is to actually understand what the impact is otherwise who actually cares if there is a difference if it&#8217;s not causing a problem. In this case it was the DBA&#8217;s who noticed the difference but in all honesty it wasn&#8217;t actually causing a business impact! <img src='http://www.stormsail.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Typical! Still, it&#8217;s been another learning curve in using TNF in the odd case where Dtrace (and in this case <a href="http://www.stormsail.com/chrisg/tags/scsi.d">scsi.d</a>) might have also helped if the system was running Solaris 10. </p>
<p>If you are using VxFS then you might want to look at this <a href="http://www.eng.auburn.edu/pub/mail-lists/ssastuff/vxdefrag-pl.html">script</a> to automatically check if a filesystem is fragmented or not. If it is then it&#8217;ll automatically kick off a defrag&#8230;&#8230;.. aren&#8217;t automatic scripts great! <img src='http://www.stormsail.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.stormsail.com/2008/12/22/diagnosing-a-vxfs-filesystem-performance-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s the answer to life the universe and everything?</title>
		<link>http://www.stormsail.com/2008/04/29/whats-the-answer-to-life-the-universe-and-everything/</link>
		<comments>http://www.stormsail.com/2008/04/29/whats-the-answer-to-life-the-universe-and-everything/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 03:45:28 +0000</pubDate>
		<dc:creator>hippy</dc:creator>
				<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.stormsail.com/2008/04/29/whats-the-answer-to-life-the-universe-and-everything/</guid>
		<description><![CDATA[&#34;42&#34; For those of you that had read or listened to the Hitchhikers Guide to the Galaxy the above question and answer will have more meaning to you than those of you that haven&#8217;t. Essentially, how can you have a literal answer to such an undefined question which suggests on an allegorical level that it [...]]]></description>
			<content:encoded><![CDATA[<p><P ALIGN=CENTER><FONT SIZE=4 STYLE="font-size: 16pt">&quot;<B>42</B>&quot;</FONT></P><br />
<P>For those of you that had read or listened to the <A HREF="http://en.wikipedia.org/wiki/The_Hitchhiker's_Guide_to_the_Galaxy">Hitchhikers<br />
Guide to the Galaxy</A> the above question and answer will have more<br />
meaning to you than those of you that haven&#8217;t. Essentially, how can<br />
you have a literal answer to such an undefined question which<br />
suggests on an allegorical level that it is more important to ask the<br />
right questions than to seek definite answers.</P><br />
<P>I sometimes think of just saying &quot;42&quot; to the question of<br />
&quot;<I>What&#8217;s the answer to our performance problem?</I>&quot;<br />
which is usually supplied with some kind of data either in the form<br />
of GUDS (a script which collects a whole bunch of Solaris OS output)<br />
or some other spreadsheet or application output. This data usually<br />
has no context or supplied with anything other than &quot;the<br />
customer has a performance problem&quot; which of course makes things<br />
slightly difficult for us to answer unless the customer will accept<br />
&quot;<I><B>42</B></I>&quot;.<br />
</P><br />
<P>So investigating performance related issues is usually very time<br />
consuming due to difficulty in defining a problem. So it would seem<br />
to reason that it&#8217;s probably a good idea to approach these type of<br />
problems in a structured method. Sun has been using an effective<br />
troubleshooting process by <A HREF="http://www.kepner-tregoe.com/">Kepner<br />
Trego</A> for a number of years of which defines a problem as<br />
follows:<br />
</P><br />
<P>&quot;<I>Something has deviated from the normal (what you should<br />
expect) for which you don&#8217;t know the reason and would like to know<br />
the reason</I>&quot;<br />
</P><br />
<P>Still don&#8217;t get it? Well, what if you&#8217;re driving, walking,<br />
running, hopping (you get my point) etc from point A to B and have<br />
somehow ended up at X21 and you don&#8217;t know why you&#8217;ve ended up, you&#8217;d<br />
probably want to know why and thus you&#8217;d have a problem because you&#8217;d<br />
be expecting to end up at point B but have ended up at point X21.<br />
</P><br />
<P>Ok, so how does this related to resolving performance issues then?<br />
Well, in order for Sun engineers to progress performance related<br />
issues within the services organization we need to understand a<br />
problem, the concerns around it and how that fits into the bigger<br />
picture. By this I mean looking at an entire application<br />
infrastructure (top down approach) rather than examining specific<br />
system or application statistics (bottom up approach). This can then<br />
help us identify a possible bottleneck or specific area of interest<br />
to which we can use any number of OS or application tools to focus in<br />
on and identify root cause.<br />
</P><br />
<P>So perhaps we should start by informing people what performance<br />
engineers <B>CAN</B> do:</P><br />
<P>1/ We can make &quot;observations&quot; from static collected data<br />
or via an interactive window into customer&#8217;s system (Shared Shell).<br />
Yes, that doesn&#8217;t mean we can provide root cause from this but<br />
comment on what we see. Observations mean NOTHING without context.</P><br />
<P>2/ We can make suggestions based on above information which might<br />
progress to further data collection but again mean NOTHING without<br />
context.</P><br />
<P>Wow, that&#8217;s not much is it&#8230;.so what <B>CAN&#8217;T</B> we do?</P><br />
<P>1/ We can&#8217;t mind read &#8211; Sorry, we can&#8217;t possibly understand you&#8217;re<br />
concerns, application, business, users without providing USEFUL<br />
information. So would is useful information? Well answers to these<br />
might help get the ball rolling:</P><br />
<P>* What tells you that you have a performance issue on your system?<br />
i.e Users complaining that the &quot;XYZ&quot; application is taking<br />
longer than expected to return data/report,  batch job taking longer<br />
to complete, etc.</P><br />
<P>* When did this issue start happening? This should be the exact<br />
date &amp; time the problem started or was first noticed.<br />
</P><br />
<P>* When have you noticed the issue since? Again the exact date(s)<br />
and time(s).<br />
</P><br />
<P>* How long should you expect the job/application to take to<br />
run/complete. This needs to be based on previous data runs or when<br />
the system was specified.<br />
</P><br />
<P>* What other systems also run the job/application but aren&#8217;t<br />
effected?<br />
</P><br />
<P>* Supply an architecture diagram if applicable, describing how the<br />
application interfaces into the system. i.e<br />
</P><br />
<P><I><B>user -&gt; application X on client -webquery-&gt;<br />
application server -sqlquery-&gt; Oracle database backend server</B></I></P><br />
<P>2/ We can&#8217;t rub a bottle and get the answer from a genie nor wave<br />
a magic wand for the answer &#8211; Yes, again it&#8217;s not just as simple as<br />
supplying a couple of OS outputs and getting an answer from us. We&#8217;ll<br />
need to understand the &quot;bigger&quot; picture or make<br />
observations before suggestions can be advised.</P><br />
<P>3/ We can&#8217;t fix the problem in a split second nor can applying<br />
pressure help speed up the process &#8211; Again we need to UNDERSTAND the<br />
bigger picture before suggestions and action plans can be advised.</P><br />
<P><B>So what kind of data stuff can we collect to observe?</B></P><br />
<P>Probably one of the quickest ways of allowing us to observe is via<br />
<A HREF="http://www.sun.com/123">Shared Shell</A>. This allows us a<br />
direct view onto a system and allows us to see what the customer<br />
actually see&#8217;s. Again, we&#8217;ll need to discuss with the customer what<br />
we&#8217;re looking at and UNDERSTAND the &quot;bigger&quot; picture to<br />
make suggestions or action plans moving forward. If shared shell<br />
isn&#8217;t available then we&#8217;ll need to collect GUDS data usually in the<br />
form of the extended mode. This collects various Solaris outputs in<br />
various time snapshots which we can view offline, however we do need<br />
baseline data along with bad data to make any useful observations.<br />
Yes, one snapshot isn&#8217;t much help as high values could be normal!<br />
Yes, just because you see high user land utilization it doesn&#8217;t<br />
necessarily mean its bad or shows a performance problem. It could<br />
just be the system being utilized well processing those &quot;funny&quot;<br />
accounting beans for the business. Again and I&#8217;ve said this a few<br />
times&#8230;..data is USELESS without CONTEXT.</P><br />
<P>If <A HREF="http://www.oracle.com/">Oracle</A> is involved then<br />
you could get the Oracle DBA to provide <A HREF="http://www.akadia.com/services/ora_statspack_survival_guide.html">statspack</A><br />
data or AWR reports for when you see the problem and when you don&#8217;t<br />
as that might give an indication of Oracle being a bottleneck in the<br />
application environment.</P><br />
<P>Other application vendors might have similar statistic generating<br />
reports which show what they are waiting for which might help<br />
identify a potential bottleneck.<br />
</P><br />
<P><B>The &quot;Grey&quot; area</B></P><br />
<P>The grey area is a term used by many as an issue which breaks the<br />
mold of conventional break fix issues and starts entering the<br />
performance tuning arena. Break fix is usually an indication that<br />
something is clearly broken such as a customer experiencing a bug in<br />
Solaris or helping a customer bring a system up which as crashed or<br />
needs to be rebuilt and requires Sun&#8217;s assistance and expertise to<br />
resolve. Performance tuning usually happens because a customer&#8217;s<br />
business has expanded and their application architecture can&#8217;t cope<br />
with the growth for example. It&#8217;s a little difficult to gauge when a<br />
situation starts to go down that path when most application<br />
architectures are very complex and involve lots of vendors. I also<br />
happen to work in the VOSJEC (Veritas Oracle Sun Joint Escalation<br />
Centre) and deal with quite a few interoperability issues so know<br />
things can get pretty complex with trying to find the problematic<br />
area of interest. For some reason some people term this as the blame<br />
game or finger pointing which I personally hate to use. In fact I&#8217;d<br />
rather it be a Sun issue from my perspective as we get then take the<br />
necessary action in raising bugs and getting engineering involved to<br />
provide a fix and ultimately resolve the customer&#8217;s issue. Thankfully<br />
my <A HREF="http://www.symantec.com/">Symantec</A> and <A HREF="http://www.oracle.com/">Oracle</A><br />
counterparts also take this approach which makes things a little<br />
easier in problem resolution.</P><br />
<P><B>Conclusion</B><br />
</P><br />
<P>I think real point of this is that you should really grasp a<br />
problem before asking for assistance, as if you understand the<br />
problem, then you&#8217;re colleagues  understand the problem and more<br />
importantly we (Sun) or I understand the problem and that&#8217;s half the<br />
battle. The rest is so much easier&#8230;&#8230; <img src='http://www.stormsail.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </P></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stormsail.com/2008/04/29/whats-the-answer-to-life-the-universe-and-everything/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
