Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
libuv - posix_fadvise() on windows
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Liam  
View profile  
 More options Nov 27 2011, 5:30 pm
From: Liam <networkimp...@gmail.com>
Date: Sun, 27 Nov 2011 14:30:25 -0800 (PST)
Local: Sun, Nov 27 2011 5:30 pm
Subject: libuv - posix_fadvise() on windows
posix_fadvise(fd, start, end, advice) allows one to specify that a
file should be omitted from the filesystem cache after a read(), among
other things.

http://www.kernel.org/doc/man-pages/online/pages/man2/posix_fadvise.2...

I've added a libuv issue: https://github.com/joyent/libuv/issues/256

Anyone have insights on Windows APIs for these features?

Should libuv provide an fadvise() api with the posix semantics, or
distinct functions with descriptive names?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "libuv issue ignored & closed (was: libuv - posix_fadvise() on windows)" by Liam
Liam  
View profile  
 More options Nov 29 2011, 5:29 pm
From: Liam <networkimp...@gmail.com>
Date: Tue, 29 Nov 2011 14:29:47 -0800 (PST)
Local: Tues, Nov 29 2011 5:29 pm
Subject: libuv issue ignored & closed (was: libuv - posix_fadvise() on windows)
I filed a libuv issue for posix_fadvise (which probably should have
been titled "enable omitting pages from filesystem cache on/after
read"), and someone labeled it API & Unix, and then Bert closed it
without comment. I don't get it.

Reading a large collection of files once each (as for backup,
indexing, synchronization) will wipe out the filesystem cache,
impacting performance. I'd think that libuv needs to handle this.

Even if I made my own binding for posix_fadvise() it's not obvious how
to integrate that into a createReadStream(file) object.

On Nov 27, 2:30 pm, Liam <networkimp...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bert Belder  
View profile  
 More options Nov 30 2011, 5:15 am
From: Bert Belder <bertbel...@gmail.com>
Date: Wed, 30 Nov 2011 02:15:37 -0800 (PST)
Local: Wed, Nov 30 2011 5:15 am
Subject: Re: libuv issue ignored & closed (was: libuv - posix_fadvise() on windows)
On Nov 29, 11:29 pm, Liam <networkimp...@gmail.com> wrote:

> I filed a libuv issue for posix_fadvise (which probably should have
> been titled "enable omitting pages from filesystem cache on/after
> read"), and someone labeled it API & Unix, and then Bert closed it
> without comment. I don't get it.

Wut - sorry, I didn't mean to close it (which does not mean that I am
now enthusiastic about the feature.).

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Liam  
View profile  
 More options Nov 30 2011, 8:31 am
From: Liam <networkimp...@gmail.com>
Date: Wed, 30 Nov 2011 05:31:54 -0800 (PST)
Local: Wed, Nov 30 2011 8:31 am
Subject: Re: libuv issue ignored & closed (was: libuv - posix_fadvise() on windows)
On Nov 30, 2:15 am, Bert Belder <bertbel...@gmail.com> wrote:

> On Nov 29, 11:29 pm, Liam <networkimp...@gmail.com> wrote:

> > I filed a libuv issue for posix_fadvise (which probably should have
> > been titled "enable omitting pages from filesystem cache on/after
> > read"), and someone labeled it API & Unix, and then Bert closed it
> > without comment. I don't get it.

> Wut - sorry, I didn't mean to close it (which does not mean that I am
> now enthusiastic about the feature.).

Thanks. I renamed the issue. Insights on how to do this in Windows?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bert Belder  
View profile  
 More options Nov 30 2011, 7:11 pm
From: Bert Belder <bertbel...@gmail.com>
Date: Wed, 30 Nov 2011 16:11:02 -0800 (PST)
Local: Wed, Nov 30 2011 7:11 pm
Subject: Re: libuv issue ignored & closed (was: libuv - posix_fadvise() on windows)
On Nov 30, 2:31 pm, Liam <networkimp...@gmail.com> wrote:

> On Nov 30, 2:15 am, Bert Belder <bertbel...@gmail.com> wrote:

> > On Nov 29, 11:29 pm, Liam <networkimp...@gmail.com> wrote:

> > > I filed a libuv issue for posix_fadvise (which probably should have
> > > been titled "enable omitting pages from filesystem cache on/after
> > > read"), and someone labeled it API & Unix, and then Bert closed it
> > > without comment. I don't get it.

> > Wut - sorry, I didn't mean to close it (which does not mean that I am
> > now enthusiastic about the feature.).

> Thanks. I renamed the issue. Insights on how to do this in Windows?

There is no equivalent of fadvise() on windows.

A flag FILE_FLAG_NO_BUFFERING exists that is specified when opening
the file, similar to O_DIRECT on linux. But it adds constraints when
issuing a read call; you now have to read a multiple of 512 bytes and
your buffers need to be page-aligned.

You can also specify FILE_FLAG_SEQUENTIAL_SCAN which tells windows
that you want to read sequentially. It's probably closer to what you
need.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Liam  
View profile  
 More options Nov 30 2011, 9:12 pm
From: Liam <networkimp...@gmail.com>
Date: Wed, 30 Nov 2011 18:12:14 -0800 (PST)
Local: Wed, Nov 30 2011 9:12 pm
Subject: Re: libuv issue ignored & closed (was: libuv - posix_fadvise() on windows)
On Nov 30, 4:11 pm, Bert Belder <bertbel...@gmail.com> wrote:

> You can also specify FILE_FLAG_SEQUENTIAL_SCAN which tells windows
> that you want to read sequentially. It's probably closer to what you
> need.

It's too bad Node doesn't have a file abstraction; that'd make
accommodating this difference easy.

How about offering both an O_SEQENTIAL flag for fs.open() (a noop on
Unix) and an fs.fadvise() function (a noop on Windows)?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »