You can use pcstat ( https://github.com/tobert/pcstat ) to get page cache
statistics for files. I have used this app in the past to see which and how
much Lucene indexes were on Linux page cache.

Edward


On Fri, Sep 25, 2015 at 2:22 PM, Jeff Wartes <jwar...@whitepages.com> wrote:

>
>
> I’ve been relying on this:
> https://code.google.com/archive/p/linux-ftools/
>
>
> fincore will tell you what percentage of a given file is in cache, and
> fadvise can suggest to the OS that a file be cached.
>
> All of the solr start scripts at my company first call fadvise
> (FADV_WILLNEED) on all the files in the index directories. It works great
> if you’re on a linux system.
>
>
>
> On 9/25/15, 8:41 AM, "Gili Nachum" <gilinac...@gmail.com> wrote:
>
> >Gonna try Mikhail suggestion, but just for fun you can also empirically
> >"test" for how much of a file is in the oshr...@matrix.co.il cache with:
> >time cat <file> > /dev/null
> >
> >The faster it completes the more blocks are cached you can take a baseline
> >after manually purging of cache - don't recall the command. Note that
> >running the command by itself encourages to cache the file.
> >On Sep 25, 2015 12:39, "Aman Tandon" <amantandon...@gmail.com> wrote:
> >
> >> Awesome thank you Mikhail. This is what I was looking for.
> >>
> >> This was just a random question poped up in my mind. So I just asked
> >>this
> >> on the group.
> >>
> >> With Regards
> >> Aman Tandon
> >>
> >> On Fri, Sep 25, 2015 at 2:49 PM, Mikhail Khludnev <
> >> mkhlud...@griddynamics.com> wrote:
> >>
> >> > What about Linux:
> >> > $less /proc/<PID>/maps
> >> > $pmap <PID>
> >> >
> >> > On Fri, Sep 25, 2015 at 10:57 AM, Markus Jelsma <
> >> > markus.jel...@openindex.io>
> >> > wrote:
> >> >
> >> > > Hello - as far as i remember, you don't. A file itself is not the
> >>unit
> >> to
> >> > > cache, but blocks are.
> >> > > Markus
> >> > >
> >> > >
> >> > > -----Original message-----
> >> > > > From:Aman Tandon <amantandon...@gmail.com>
> >> > > > Sent: Friday 25th September 2015 5:56
> >> > > > To: solr-user@lucene.apache.org
> >> > > > Subject: How to know index file in OS Cache
> >> > > >
> >> > > > Hi,
> >> > > >
> >> > > > Is there any way to know that the index file/s is present in the
> >>OS
> >> > cache
> >> > > > or RAM. I want to check if the index is present in the RAM or in
> >>OS
> >> > cache
> >> > > > and which files are not in either of them.
> >> > > >
> >> > > > With Regards
> >> > > > Aman Tandon
> >> > > >
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Sincerely yours
> >> > Mikhail Khludnev
> >> > Principal Engineer,
> >> > Grid Dynamics
> >> >
> >> > <http://www.griddynamics.com>
> >> > <mkhlud...@griddynamics.com>
> >> >
> >>
>
>

Reply via email to