<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Windows Sucks At Memory-Mapped IO During Startup</title>
	<atom:link href="http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/</link>
	<description>Taras&#039; blog on Snappy, Startup, Telemetry and other Firefox peroformance matters</description>
	<lastBuildDate>Tue, 27 Nov 2012 16:50:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Spudd86</title>
		<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/comment-page-1/#comment-28555</link>
		<dc:creator>Spudd86</dc:creator>
		<pubDate>Sat, 31 Jul 2010 20:57:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=294#comment-28555</guid>
		<description><![CDATA[@RobM this isn&#039;t even getting in to loading the XUL and all that other stuff, this is purely loading native compiled code (which if you toss out XUL and js is only going to be BIGGER and so slower to load than it is now since you still need pretty much all of xul.dll since it&#039;s got the layout engine in it, and it does HTML too so without that firefox wouldn&#039;t be very useful... using XUL and js for app code is just re-using stuff they have to build anyway to support web pages for broweser UI and that means less native code to load and that means less of the kind of IO being profiled here)]]></description>
		<content:encoded><![CDATA[<p>@RobM this isn&#8217;t even getting in to loading the XUL and all that other stuff, this is purely loading native compiled code (which if you toss out XUL and js is only going to be BIGGER and so slower to load than it is now since you still need pretty much all of xul.dll since it&#8217;s got the layout engine in it, and it does HTML too so without that firefox wouldn&#8217;t be very useful&#8230; using XUL and js for app code is just re-using stuff they have to build anyway to support web pages for broweser UI and that means less native code to load and that means less of the kind of IO being profiled here)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Photodeus</title>
		<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/comment-page-1/#comment-28043</link>
		<dc:creator>Photodeus</dc:creator>
		<pubDate>Sat, 12 Jun 2010 11:24:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=294#comment-28043</guid>
		<description><![CDATA[Although not helpful in itself, RobM&#039;s comment is just the common sense reaction of most readers. &quot;Sounds like there&#039;s too much in there, maybe many things can be optimized away.&quot;

Thanks for providing an interesting reply with good links so we all can gain more insight into all the things the mozilla developers have to take into account.]]></description>
		<content:encoded><![CDATA[<p>Although not helpful in itself, RobM&#8217;s comment is just the common sense reaction of most readers. &#8220;Sounds like there&#8217;s too much in there, maybe many things can be optimized away.&#8221;</p>
<p>Thanks for providing an interesting reply with good links so we all can gain more insight into all the things the mozilla developers have to take into account.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted Mielczarek</title>
		<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/comment-page-1/#comment-27667</link>
		<dc:creator>Ted Mielczarek</dc:creator>
		<pubDate>Tue, 11 May 2010 14:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=294#comment-27667</guid>
		<description><![CDATA[Taras, Visual C++&#039;s PGO certainly does do block separation, see:
http://msdn.microsoft.com/en-us/library/e7k32f4k%28VS.80%29.aspx
&quot;* Basic Block Optimization – Basic block optimization allows commonly executed basic blocks that temporally execute within a given frame to be placed in the same set of pages (locality). This minimizes the number of pages used, thus minimizing memory overhead.
* Function Layout – Based on the call graph and profiled caller/callee behavior, functions that tend to be along the same execution path are placed in the same section.
* Dead Code Separation – Code that is not called during profiling is moved to a special section that is appended to the end of the set of sections. This effectively keeps this section out of the often-used pages.&quot;

I know for sure that our binaries have at least some of these optimizations applied, I&#039;ve seen the results when looking at the debug symbols we produce.]]></description>
		<content:encoded><![CDATA[<p>Taras, Visual C++&#8217;s PGO certainly does do block separation, see:<br />
<a href="http://msdn.microsoft.com/en-us/library/e7k32f4k%28VS.80%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/e7k32f4k%28VS.80%29.aspx</a><br />
&#8220;* Basic Block Optimization – Basic block optimization allows commonly executed basic blocks that temporally execute within a given frame to be placed in the same set of pages (locality). This minimizes the number of pages used, thus minimizing memory overhead.<br />
* Function Layout – Based on the call graph and profiled caller/callee behavior, functions that tend to be along the same execution path are placed in the same section.<br />
* Dead Code Separation – Code that is not called during profiling is moved to a special section that is appended to the end of the set of sections. This effectively keeps this section out of the often-used pages.&#8221;</p>
<p>I know for sure that our binaries have at least some of these optimizations applied, I&#8217;ve seen the results when looking at the debug symbols we produce.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sid</title>
		<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/comment-page-1/#comment-27428</link>
		<dc:creator>Sid</dc:creator>
		<pubDate>Sun, 25 Apr 2010 22:31:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=294#comment-27428</guid>
		<description><![CDATA[Oh, I see re the cache manager vs mmap. Wow, that&#039;s just plain idiotic.]]></description>
		<content:encoded><![CDATA[<p>Oh, I see re the cache manager vs mmap. Wow, that&#8217;s just plain idiotic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tglek</title>
		<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/comment-page-1/#comment-27388</link>
		<dc:creator>tglek</dc:creator>
		<pubDate>Wed, 21 Apr 2010 23:40:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=294#comment-27388</guid>
		<description><![CDATA[@RobM and @Says If you have nothing helpful to say, then don&#039;t say it.

Firefox was never been leaner(in terms of performance and memory footprint) than it is now. 

Unfortunately in order to implement a web browser you have to write an application bigger than calc.exe. Large apps are a pain(to different degrees) to load on most OSes.

All I&#039;m doing is teaching it to play nice with specific OSes that it runs on so it can continue doing what it does, more efficiently.

As far as removing bloat goes, I believe Mozilla is on the cutting edge of software development for that. See http://ehren.wordpress.com/ for how we are getting rid of unneeded bloat.

@Paul thanks for your help.]]></description>
		<content:encoded><![CDATA[<p>@RobM and @Says If you have nothing helpful to say, then don&#8217;t say it.</p>
<p>Firefox was never been leaner(in terms of performance and memory footprint) than it is now. </p>
<p>Unfortunately in order to implement a web browser you have to write an application bigger than calc.exe. Large apps are a pain(to different degrees) to load on most OSes.</p>
<p>All I&#8217;m doing is teaching it to play nice with specific OSes that it runs on so it can continue doing what it does, more efficiently.</p>
<p>As far as removing bloat goes, I believe Mozilla is on the cutting edge of software development for that. See <a href="http://ehren.wordpress.com/" rel="nofollow">http://ehren.wordpress.com/</a> for how we are getting rid of unneeded bloat.</p>
<p>@Paul thanks for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Betts</title>
		<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/comment-page-1/#comment-27386</link>
		<dc:creator>Paul Betts</dc:creator>
		<pubDate>Wed, 21 Apr 2010 22:11:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=294#comment-27386</guid>
		<description><![CDATA[Actually, Mac OS X has what you&#039;re describing wrt Mm and Cm using the same cache called Unified Buffer...something (it&#039;s been awhile), and it ends up being really bad for certain scenarios, because you&#039;ll end up paging stuff to disk in order to free up disk cache space. 

So imagine a VM booting up - it&#039;s doing tons of reads, so lots of memory gets used for disk cache. Well, where do those reads go? To memory, so now all of the memory you&#039;ve allocated that got paged out to service the disk cache, gets paged back in. The two systems end up fighting with each other, rather than in Windows where disk cache memory is free to be converted to allocated memory.

Also, don&#039;t use large pages, they require the kernel to find large contiguous sections of memory to back the page, which under some systems will just fail. 

If you want to fool Superfetch, it&#039;s simple - start up a thread in the background that simply reads over the module in memory. That&#039;ll cause the prefetcher to record that the entire module will be paged in. 

However, are you *sure* you really need the entire thing? Imagine if every app considered itself important enough that it never wanted to get page faults, you&#039;d end up with a far *slower* system overall. Superfetch is smart, it knows when your disk isn&#039;t in use so it can page in stuff in the background.]]></description>
		<content:encoded><![CDATA[<p>Actually, Mac OS X has what you&#8217;re describing wrt Mm and Cm using the same cache called Unified Buffer&#8230;something (it&#8217;s been awhile), and it ends up being really bad for certain scenarios, because you&#8217;ll end up paging stuff to disk in order to free up disk cache space. </p>
<p>So imagine a VM booting up &#8211; it&#8217;s doing tons of reads, so lots of memory gets used for disk cache. Well, where do those reads go? To memory, so now all of the memory you&#8217;ve allocated that got paged out to service the disk cache, gets paged back in. The two systems end up fighting with each other, rather than in Windows where disk cache memory is free to be converted to allocated memory.</p>
<p>Also, don&#8217;t use large pages, they require the kernel to find large contiguous sections of memory to back the page, which under some systems will just fail. </p>
<p>If you want to fool Superfetch, it&#8217;s simple &#8211; start up a thread in the background that simply reads over the module in memory. That&#8217;ll cause the prefetcher to record that the entire module will be paged in. </p>
<p>However, are you *sure* you really need the entire thing? Imagine if every app considered itself important enough that it never wanted to get page faults, you&#8217;d end up with a far *slower* system overall. Superfetch is smart, it knows when your disk isn&#8217;t in use so it can page in stuff in the background.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ulrich</title>
		<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/comment-page-1/#comment-27381</link>
		<dc:creator>Ulrich</dc:creator>
		<pubDate>Wed, 21 Apr 2010 17:31:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=294#comment-27381</guid>
		<description><![CDATA[Wow, yet Thunderbird loads WAY faster on my Fedora netbook than on my XP quad-core (Intel i-5) workstation at work with a &quot;real&quot; hard disk, not a slow netbook one.

I/O on Windows sucks SO much, it&#039;s incredible.]]></description>
		<content:encoded><![CDATA[<p>Wow, yet Thunderbird loads WAY faster on my Fedora netbook than on my XP quad-core (Intel i-5) workstation at work with a &#8220;real&#8221; hard disk, not a slow netbook one.</p>
<p>I/O on Windows sucks SO much, it&#8217;s incredible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: .</title>
		<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/comment-page-1/#comment-27380</link>
		<dc:creator>.</dc:creator>
		<pubDate>Wed, 21 Apr 2010 17:00:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=294#comment-27380</guid>
		<description><![CDATA[Rather than Windows&#039; reads being too small, have you considered that perhaps your application is too big? Perhaps Firefox startup is slow due to wanting to load a XML-based javascript GUI framework when it starts up rather than being a slim, fast native application? 

There are a lot of applications that load way faster than Firefox, so that should serve as an existence proof regarding where the fault lies.]]></description>
		<content:encoded><![CDATA[<p>Rather than Windows&#8217; reads being too small, have you considered that perhaps your application is too big? Perhaps Firefox startup is slow due to wanting to load a XML-based javascript GUI framework when it starts up rather than being a slim, fast native application? </p>
<p>There are a lot of applications that load way faster than Firefox, so that should serve as an existence proof regarding where the fault lies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RobM</title>
		<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/comment-page-1/#comment-27379</link>
		<dc:creator>RobM</dc:creator>
		<pubDate>Wed, 21 Apr 2010 16:49:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=294#comment-27379</guid>
		<description><![CDATA[Maybe the answer is to stop trying to load 11mb of pointless bloatware rubbish?

I remember when firefox was a lean, mean and *fast* browser. I miss those days.]]></description>
		<content:encoded><![CDATA[<p>Maybe the answer is to stop trying to load 11mb of pointless bloatware rubbish?</p>
<p>I remember when firefox was a lean, mean and *fast* browser. I miss those days.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paolo Bonzini</title>
		<link>http://blog.mozilla.org/tglek/2010/04/19/windows-sucks-at-memory-mapped-io-during-startup/comment-page-1/#comment-27377</link>
		<dc:creator>Paolo Bonzini</dc:creator>
		<pubDate>Wed, 21 Apr 2010 13:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=294#comment-27377</guid>
		<description><![CDATA[@Rem

Even then, open+read+close would be one copy instead of zero.  Theoretically (i.e. if it wasn&#039;t for the cost of page faults) mmap-ed read-only files would be faster because the pages would be backed by the OS caches, with absolutely no memory-to-memory traffic.]]></description>
		<content:encoded><![CDATA[<p>@Rem</p>
<p>Even then, open+read+close would be one copy instead of zero.  Theoretically (i.e. if it wasn&#8217;t for the cost of page faults) mmap-ed read-only files would be faster because the pages would be backed by the OS caches, with absolutely no memory-to-memory traffic.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
