<?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: Direct IO in Python</title>
	<atom:link href="http://www.alexonlinux.com/direct-io-in-python/feed" rel="self" type="application/rss+xml" />
	<link>http://www.alexonlinux.com/direct-io-in-python</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 05:08:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Alexander Sandler</title>
		<link>http://www.alexonlinux.com/direct-io-in-python/comment-page-1#comment-23832</link>
		<dc:creator>Alexander Sandler</dc:creator>
		<pubDate>Mon, 12 Apr 2010 08:14:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1684#comment-23832</guid>
		<description>&lt;a href=&#039;#comment-23822&#039; rel=&quot;nofollow&quot;&gt;@eswierk&lt;/a&gt;
I am not sure os.read does memory allocations. In any case, direct I/O requires aligned memory buffer. Otherwise, any buffer will do.&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;23832&#039;,&#039;Alexander Sandler&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;23832&#039;,&#039;Alexander Sandler&#039;,&#039;&lt;a href=\&#039;#comment-23822\&#039; rel=\&quot;nofollow\&quot;&gt;@eswierk&lt;\/a&gt;\r\nI am not sure os.read does memory allocations. In any case, direct I\/O requires aligned memory buffer. Otherwise, any buffer will do.&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p><a href="#comment-23822' rel="nofollow">@eswierk</a><br />
I am not sure os.read does memory allocations. In any case, direct I/O requires aligned memory buffer. Otherwise, any buffer will do.
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('23832','Alexander Sandler'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('23832','Alexander Sandler','&lt;a href=\'#comment-23822\' rel=\&quot;nofollow\&quot;&gt;@eswierk&lt;\/a&gt;\r\nI am not sure os.read does memory allocations. In any case, direct I\/O requires aligned memory buffer. Otherwise, any buffer will do.'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kepler Kramer</title>
		<link>http://www.alexonlinux.com/direct-io-in-python/comment-page-1#comment-23824</link>
		<dc:creator>Kepler Kramer</dc:creator>
		<pubDate>Mon, 05 Apr 2010 16:44:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1684#comment-23824</guid>
		<description>I too would like to use Python for O_DIRECT reads and could really use an example similar to your excellent write snippet.&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;23824&#039;,&#039;Kepler Kramer&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;23824&#039;,&#039;Kepler Kramer&#039;,&#039;I too would like to use Python for O_DIRECT reads and could really use an example similar to your excellent write snippet.&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p>I too would like to use Python for O_DIRECT reads and could really use an example similar to your excellent write snippet.
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('23824','Kepler Kramer'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('23824','Kepler Kramer','I too would like to use Python for O_DIRECT reads and could really use an example similar to your excellent write snippet.'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: eswierk</title>
		<link>http://www.alexonlinux.com/direct-io-in-python/comment-page-1#comment-23822</link>
		<dc:creator>eswierk</dc:creator>
		<pubDate>Sat, 03 Apr 2010 04:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1684#comment-23822</guid>
		<description>&lt;a href=&#039;#comment-23818&#039; rel=&quot;nofollow&quot;&gt;@Alexander Sandler&lt;/a&gt; - OK, I give up. How exactly does allocating an aligned buffer help you if you&#039;re calling os.read, which does its own memory allocation?&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;23822&#039;,&#039;eswierk&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;23822&#039;,&#039;eswierk&#039;,&#039;&lt;a href=\&#039;#comment-23818\&#039; rel=\&quot;nofollow\&quot;&gt;@Alexander Sandler&lt;\/a&gt; - OK, I give up. How exactly does allocating an aligned buffer help you if you\&#039;re calling os.read, which does its own memory allocation?&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p><a href="#comment-23818' rel="nofollow">@Alexander Sandler</a> &#8211; OK, I give up. How exactly does allocating an aligned buffer help you if you&#8217;re calling os.read, which does its own memory allocation?
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('23822','eswierk'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('23822','eswierk','&lt;a href=\'#comment-23818\' rel=\&quot;nofollow\&quot;&gt;@Alexander Sandler&lt;\/a&gt; - OK, I give up. How exactly does allocating an aligned buffer help you if you\'re calling os.read, which does its own memory allocation?'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander Sandler</title>
		<link>http://www.alexonlinux.com/direct-io-in-python/comment-page-1#comment-23818</link>
		<dc:creator>Alexander Sandler</dc:creator>
		<pubDate>Wed, 31 Mar 2010 06:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1684#comment-23818</guid>
		<description>&lt;a href=&#039;#comment-23816&#039; rel=&quot;nofollow&quot;&gt;@zls&lt;/a&gt;
This is exactly the problem this post addresses. Please read it more carefully.&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;23818&#039;,&#039;Alexander Sandler&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;23818&#039;,&#039;Alexander Sandler&#039;,&#039;&lt;a href=\&#039;#comment-23816\&#039; rel=\&quot;nofollow\&quot;&gt;@zls&lt;\/a&gt;\r\nThis is exactly the problem this post addresses. Please read it more carefully.&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p><a href="#comment-23816' rel="nofollow">@zls</a><br />
This is exactly the problem this post addresses. Please read it more carefully.
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('23818','Alexander Sandler'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('23818','Alexander Sandler','&lt;a href=\'#comment-23816\' rel=\&quot;nofollow\&quot;&gt;@zls&lt;\/a&gt;\r\nThis is exactly the problem this post addresses. Please read it more carefully.'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: zls</title>
		<link>http://www.alexonlinux.com/direct-io-in-python/comment-page-1#comment-23816</link>
		<dc:creator>zls</dc:creator>
		<pubDate>Tue, 30 Mar 2010 15:04:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1684#comment-23816</guid>
		<description>But there&#039;s nothing we can do for os.read where file is opened with flag O_DIRECT. Because system call &quot;read&quot; also needs memory alignment for the read buffer. But the memory is allocated in python without any memory alignment.&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;23816&#039;,&#039;zls&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;23816&#039;,&#039;zls&#039;,&#039;But there\&#039;s nothing we can do for os.read where file is opened with flag O_DIRECT. Because system call \&quot;read\&quot; also needs memory alignment for the read buffer. But the memory is allocated in python without any memory alignment.&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p>But there&#8217;s nothing we can do for os.read where file is opened with flag O_DIRECT. Because system call &#8220;read&#8221; also needs memory alignment for the read buffer. But the memory is allocated in python without any memory alignment.
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('23816','zls'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('23816','zls','But there\'s nothing we can do for os.read where file is opened with flag O_DIRECT. Because system call \&quot;read\&quot; also needs memory alignment for the read buffer. But the memory is allocated in python without any memory alignment.'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: What&#8217;s is direct I/O anyway? - Alex on Linux</title>
		<link>http://www.alexonlinux.com/direct-io-in-python/comment-page-1#comment-23738</link>
		<dc:creator>What&#8217;s is direct I/O anyway? - Alex on Linux</dc:creator>
		<pubDate>Mon, 15 Feb 2010 10:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1684#comment-23738</guid>
		<description>[...] days ago I&#8217;ve written a post explaining how to do a direct I/O in Python. But then I thought that it might be a good idea to explain what direct I/O is. So, here we [...]&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;23738&#039;,&#039;What&#8217;s is direct I\/O anyway? - Alex on Linux&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;23738&#039;,&#039;What&#8217;s is direct I\/O anyway? - Alex on Linux&#039;,&#039;&#091;...&#093; days ago I&#8217;ve written a post explaining how to do a direct I\/O in Python. But then I thought that it might be a good idea to explain what direct I\/O is. So, here we &#091;...&#093;&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p>[...] days ago I&#8217;ve written a post explaining how to do a direct I/O in Python. But then I thought that it might be a good idea to explain what direct I/O is. So, here we [...]
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('23738','What&amp;#8217;s is direct I\/O anyway? - Alex on Linux'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('23738','What&amp;#8217;s is direct I\/O anyway? - Alex on Linux','&amp;#91;...&amp;#93; days ago I&amp;#8217;ve written a post explaining how to do a direct I\/O in Python. But then I thought that it might be a good idea to explain what direct I\/O is. So, here we &amp;#91;...&amp;#93;'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander Sandler</title>
		<link>http://www.alexonlinux.com/direct-io-in-python/comment-page-1#comment-23668</link>
		<dc:creator>Alexander Sandler</dc:creator>
		<pubDate>Sat, 16 Jan 2010 21:14:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1684#comment-23668</guid>
		<description>&lt;a href=&#039;#comment-23646&#039; rel=&quot;nofollow&quot;&gt;@Ivan Novick&lt;/a&gt;
Well, first of all, fsync() isn&#039;t a solution for the problem because it is not atomic, expensive and unnecessary - operating system should give you a method to disable caching for portion of disk, instead of you trying to simulate it with fsync().

It&#039;s simple. Imagine you have a cluster with two machines that processes financial transactions. Imagine that cluster being asked to place 10000$ on your account. Server 1 handles the request and crashes right after it. Moment later, cluster receives a request to transfer 5000$ from your account to some other bank account. The question is how much money remains on your account.

This particular application would do it&#039;s own caching, as you suggested, but so would many other applications.

Don&#039;t get me wrong. I am in for caching in OS with all of mine limbs. However, there&#039;s must be a way to control it, because there are many applications that need something more delicate then OS caching.&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;23668&#039;,&#039;Alexander Sandler&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;23668&#039;,&#039;Alexander Sandler&#039;,&#039;&lt;a href=\&#039;#comment-23646\&#039; rel=\&quot;nofollow\&quot;&gt;@Ivan Novick&lt;\/a&gt;\r\nWell, first of all, fsync() isn\&#039;t a solution for the problem because it is not atomic, expensive and unnecessary - operating system should give you a method to disable caching for portion of disk, instead of you trying to simulate it with fsync().\r\n\r\nIt\&#039;s simple. Imagine you have a cluster with two machines that processes financial transactions. Imagine that cluster being asked to place 10000$ on your account. Server 1 handles the request and crashes right after it. Moment later, cluster receives a request to transfer 5000$ from your account to some other bank account. The question is how much money remains on your account.\r\n\r\nThis particular application would do it\&#039;s own caching, as you suggested, but so would many other applications.\r\n\r\nDon\&#039;t get me wrong. I am in for caching in OS with all of mine limbs. However, there\&#039;s must be a way to control it, because there are many applications that need something more delicate then OS caching.&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p><a href="#comment-23646' rel="nofollow">@Ivan Novick</a><br />
Well, first of all, fsync() isn&#8217;t a solution for the problem because it is not atomic, expensive and unnecessary &#8211; operating system should give you a method to disable caching for portion of disk, instead of you trying to simulate it with fsync().</p>
<p>It&#8217;s simple. Imagine you have a cluster with two machines that processes financial transactions. Imagine that cluster being asked to place 10000$ on your account. Server 1 handles the request and crashes right after it. Moment later, cluster receives a request to transfer 5000$ from your account to some other bank account. The question is how much money remains on your account.</p>
<p>This particular application would do it&#8217;s own caching, as you suggested, but so would many other applications.</p>
<p>Don&#8217;t get me wrong. I am in for caching in OS with all of mine limbs. However, there&#8217;s must be a way to control it, because there are many applications that need something more delicate then OS caching.
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('23668','Alexander Sandler'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('23668','Alexander Sandler','&lt;a href=\'#comment-23646\' rel=\&quot;nofollow\&quot;&gt;@Ivan Novick&lt;\/a&gt;\r\nWell, first of all, fsync() isn\'t a solution for the problem because it is not atomic, expensive and unnecessary - operating system should give you a method to disable caching for portion of disk, instead of you trying to simulate it with fsync().\r\n\r\nIt\'s simple. Imagine you have a cluster with two machines that processes financial transactions. Imagine that cluster being asked to place 10000$ on your account. Server 1 handles the request and crashes right after it. Moment later, cluster receives a request to transfer 5000$ from your account to some other bank account. The question is how much money remains on your account.\r\n\r\nThis particular application would do it\'s own caching, as you suggested, but so would many other applications.\r\n\r\nDon\'t get me wrong. I am in for caching in OS with all of mine limbs. However, there\'s must be a way to control it, because there are many applications that need something more delicate then OS caching.'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Novick</title>
		<link>http://www.alexonlinux.com/direct-io-in-python/comment-page-1#comment-23646</link>
		<dc:creator>Ivan Novick</dc:creator>
		<pubDate>Wed, 13 Jan 2010 15:41:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1684#comment-23646</guid>
		<description>Making sure your data is on disk is a separate issue from bypassing the filesystem cache.

To make sure your data is on disk the system call is fsync.  If you don&#039;t call fysnc the OS will not harden the data to disk immediately for performance reasons.  When you need to know the data is on disk then you make the fsync call.

O_DIRECT bypasses the filesystem cache and writes &quot;directly&quot; to disk.  This will be a lot slower than writing to filesystem cache so you don&#039;t want to use O_DIRECT unless your application is caching data itself. 

Linus&#039;s argument is someone has to cache the data so why not let the OS do it.  This is exactly what postgresql does, they rely on using the OS filesystem cache and dont use O_DIRECT.&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;23646&#039;,&#039;Ivan Novick&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;23646&#039;,&#039;Ivan Novick&#039;,&#039;Making sure your data is on disk is a separate issue from bypassing the filesystem cache.\r\n\r\nTo make sure your data is on disk the system call is fsync.  If you don\&#039;t call fysnc the OS will not harden the data to disk immediately for performance reasons.  When you need to know the data is on disk then you make the fsync call.\r\n\r\nO_DIRECT bypasses the filesystem cache and writes \&quot;directly\&quot; to disk.  This will be a lot slower than writing to filesystem cache so you don\&#039;t want to use O_DIRECT unless your application is caching data itself. \r\n\r\nLinus\&#039;s argument is someone has to cache the data so why not let the OS do it.  This is exactly what postgresql does, they rely on using the OS filesystem cache and dont use O_DIRECT.&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p>Making sure your data is on disk is a separate issue from bypassing the filesystem cache.</p>
<p>To make sure your data is on disk the system call is fsync.  If you don&#8217;t call fysnc the OS will not harden the data to disk immediately for performance reasons.  When you need to know the data is on disk then you make the fsync call.</p>
<p>O_DIRECT bypasses the filesystem cache and writes &#8220;directly&#8221; to disk.  This will be a lot slower than writing to filesystem cache so you don&#8217;t want to use O_DIRECT unless your application is caching data itself. </p>
<p>Linus&#8217;s argument is someone has to cache the data so why not let the OS do it.  This is exactly what postgresql does, they rely on using the OS filesystem cache and dont use O_DIRECT.
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('23646','Ivan Novick'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('23646','Ivan Novick','Making sure your data is on disk is a separate issue from bypassing the filesystem cache.\r\n\r\nTo make sure your data is on disk the system call is fsync.  If you don\'t call fysnc the OS will not harden the data to disk immediately for performance reasons.  When you need to know the data is on disk then you make the fsync call.\r\n\r\nO_DIRECT bypasses the filesystem cache and writes \&quot;directly\&quot; to disk.  This will be a lot slower than writing to filesystem cache so you don\'t want to use O_DIRECT unless your application is caching data itself. \r\n\r\nLinus\'s argument is someone has to cache the data so why not let the OS do it.  This is exactly what postgresql does, they rely on using the OS filesystem cache and dont use O_DIRECT.'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander Sandler</title>
		<link>http://www.alexonlinux.com/direct-io-in-python/comment-page-1#comment-23639</link>
		<dc:creator>Alexander Sandler</dc:creator>
		<pubDate>Wed, 13 Jan 2010 06:25:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1684#comment-23639</guid>
		<description>&lt;a href=&#039;#comment-23637&#039; rel=&quot;nofollow&quot;&gt;@Ivan Novick&lt;/a&gt;
In Linux, when write() finishes, this does not necessarily mean that the data is on media. If you want an example of this behavior, try dding 1MB to floppy disk and see what happens.
This is natural behavior considering page cache. On the other hand this is a nightmare for everyone concerned with high availability of data. Why? Because you can&#039;t build highly available system knowing that although you think your data is on disk, it may not be there if something bad happens.
So, O_DIRECT being used naturally in databases, clustered file-systems, and every other highly available system.

As for what Linus said about it... Well, Linus and other kernel developers define what Linux will look like in the future. What Linus say today will become reality in 5-10 years. But it is not a reality yet. In reality, the thread you linked to is three years old and yet POSIX_FADV_NOREUSE is still a no-op in Linux.&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;23639&#039;,&#039;Alexander Sandler&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;23639&#039;,&#039;Alexander Sandler&#039;,&#039;&lt;a href=\&#039;#comment-23637\&#039; rel=\&quot;nofollow\&quot;&gt;@Ivan Novick&lt;\/a&gt;\r\nIn Linux, when write() finishes, this does not necessarily mean that the data is on media. If you want an example of this behavior, try dding 1MB to floppy disk and see what happens.\r\nThis is natural behavior considering page cache. On the other hand this is a nightmare for everyone concerned with high availability of data. Why? Because you can\&#039;t build highly available system knowing that although you think your data is on disk, it may not be there if something bad happens.\r\nSo, O_DIRECT being used naturally in databases, clustered file-systems, and every other highly available system.\r\n\r\nAs for what Linus said about it... Well, Linus and other kernel developers define what Linux will look like in the future. What Linus say today will become reality in 5-10 years. But it is not a reality yet. In reality, the thread you linked to is three years old and yet POSIX_FADV_NOREUSE is still a no-op in Linux.&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p><a href="#comment-23637' rel="nofollow">@Ivan Novick</a><br />
In Linux, when write() finishes, this does not necessarily mean that the data is on media. If you want an example of this behavior, try dding 1MB to floppy disk and see what happens.<br />
This is natural behavior considering page cache. On the other hand this is a nightmare for everyone concerned with high availability of data. Why? Because you can&#8217;t build highly available system knowing that although you think your data is on disk, it may not be there if something bad happens.<br />
So, O_DIRECT being used naturally in databases, clustered file-systems, and every other highly available system.</p>
<p>As for what Linus said about it&#8230; Well, Linus and other kernel developers define what Linux will look like in the future. What Linus say today will become reality in 5-10 years. But it is not a reality yet. In reality, the thread you linked to is three years old and yet POSIX_FADV_NOREUSE is still a no-op in Linux.
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('23639','Alexander Sandler'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('23639','Alexander Sandler','&lt;a href=\'#comment-23637\' rel=\&quot;nofollow\&quot;&gt;@Ivan Novick&lt;\/a&gt;\r\nIn Linux, when write() finishes, this does not necessarily mean that the data is on media. If you want an example of this behavior, try dding 1MB to floppy disk and see what happens.\r\nThis is natural behavior considering page cache. On the other hand this is a nightmare for everyone concerned with high availability of data. Why? Because you can\'t build highly available system knowing that although you think your data is on disk, it may not be there if something bad happens.\r\nSo, O_DIRECT being used naturally in databases, clustered file-systems, and every other highly available system.\r\n\r\nAs for what Linus said about it... Well, Linus and other kernel developers define what Linux will look like in the future. What Linus say today will become reality in 5-10 years. But it is not a reality yet. In reality, the thread you linked to is three years old and yet POSIX_FADV_NOREUSE is still a no-op in Linux.'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Novick</title>
		<link>http://www.alexonlinux.com/direct-io-in-python/comment-page-1#comment-23637</link>
		<dc:creator>Ivan Novick</dc:creator>
		<pubDate>Tue, 12 Jan 2010 13:36:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1684#comment-23637</guid>
		<description>The real question is why would you want to do this?  I would like to hear a use case for using direct IO in python.

Databases are the best use case for direct IO and even some of them don&#039;t use it (see postgresql).

You may also find this posting by Linus regarding direct io useful.

http://lkml.org/lkml/2007/1/10/233

Cheers,
Ivan&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;23637&#039;,&#039;Ivan Novick&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;23637&#039;,&#039;Ivan Novick&#039;,&#039;The real question is why would you want to do this?  I would like to hear a use case for using direct IO in python.\r\n\r\nDatabases are the best use case for direct IO and even some of them don\&#039;t use it (see postgresql).\r\n\r\nYou may also find this posting by Linus regarding direct io useful.\r\n\r\nhttp:\/\/lkml.org\/lkml\/2007\/1\/10\/233\r\n\r\nCheers,\r\nIvan&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p>The real question is why would you want to do this?  I would like to hear a use case for using direct IO in python.</p>
<p>Databases are the best use case for direct IO and even some of them don&#8217;t use it (see postgresql).</p>
<p>You may also find this posting by Linus regarding direct io useful.</p>
<p><a href="http://lkml.org/lkml/2007/1/10/233" onclick="return TrackClick('http%3A%2F%2Flkml.org%2Flkml%2F2007%2F1%2F10%2F233','http%3A%2F%2Flkml.org%2Flkml%2F2007%2F1%2F10%2F233')" rel="nofollow">http://lkml.org/lkml/2007/1/10/233</a></p>
<p>Cheers,<br />
Ivan
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('23637','Ivan Novick'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('23637','Ivan Novick','The real question is why would you want to do this?  I would like to hear a use case for using direct IO in python.\r\n\r\nDatabases are the best use case for direct IO and even some of them don\'t use it (see postgresql).\r\n\r\nYou may also find this posting by Linus regarding direct io useful.\r\n\r\nhttp:\/\/lkml.org\/lkml\/2007\/1\/10\/233\r\n\r\nCheers,\r\nIvan'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
</channel>
</rss>
