From: Michał B. <mic...@co...> - 2012-03-30 11:00:04
|
Hi! We already thought about O_DIRECT some time ago but even Linus Torvalds advises against using it (citation below) and probably it would decrease the chunkserver performance. On the other hand it would quite easy to implement O_DIRECT, but we would need some strong arguments for doing this. Can you share some with us? Citations: On Thu, 11 Jan 2007, Aubrey wrote: > > Now, my question is, is there a existing way to mount a filesystem > with O_DIRECT flag? so that I don't need to change anything in my > system. If there is no option so far, What is the right way to achieve > my purpose? The right way to do it is to just not use O_DIRECT. The whole notion of "direct IO" is totally braindamaged. Just say no. This is your brain: O This is your brain on O_DIRECT: . Any questions? I should have fought back harder. There really is no valid reason for EVER using O_DIRECT. You need a buffer whatever IO you do, and it might as well be the page cache. There are better ways to control the page cache than play games and think that a page cache isn't necessary. So don't use O_DIRECT. Use things like madvise() and posix_fadvise() instead. Linus From: Linus Torvalds [email blocked] Subject: Re: O_DIRECT question Date: Wed, 10 Jan 2007 19:15:48 -0800 (PST) On Wed, 10 Jan 2007, Linus Torvalds wrote: > > So don't use O_DIRECT. Use things like madvise() and posix_fadvise() > instead. Side note: the only reason O_DIRECT exists is because database people are too used to it, because other OS's haven't had enough taste to tell them to do it right, so they've historically hacked their OS to get out of the way. As a result, our madvise and/or posix_fadvise interfaces may not be all that strong, because people sadly don't use them that much. It's a sad example of a totally broken interface (O_DIRECT) resulting in better interfaces not getting used, and then not getting as much development effort put into them. So O_DIRECT not only is a total disaster from a design standpoint (just look at all the crap it results in), it also indirectly has hurt better interfaces. For example, POSIX_FADV_NOREUSE (which _could_ be a useful and clean interface to make sure we don't pollute memory unnecessarily with cached pages after they are all done) ends up being a no-op ;/ Sad. And it's one of those self-fulfilling prophecies. Still, I hope some day we can just rip the damn disaster out. Linus Kind regards Michał Borychowski MooseFS Support Manager -----Original Message----- From: Corin Langosch [mailto:in...@co...] Sent: Monday, March 26, 2012 5:23 PM To: moo...@li... Subject: [Moosefs-users] o_direct for chunkserver Hi, is it already possible to make chunkservers (latest version of moosefs) use o_direct for all file operations? I couldn't find any configuration option for this in the man pages. Otherwise I'd like to suggest to support it in a future version :) Corin ---------------------------------------------------------------------------- -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ moosefs-users mailing list moo...@li... https://lists.sourceforge.net/lists/listinfo/moosefs-users |