Re: Keep a file in memory an any cost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/11/2011 08:33 PM, Joe Zeff wrote:
> On 05/11/2011 12:19 PM, Bryn M. Reeves wrote:
>> And have it all chucked onto the swap device when we're under memory pressure
>> and reclaiming user pages that haven't been touched in a while? How does that help?
> 
> It's much less likely, especially if you're using that file often enough 

No it isn't - it's dependent on configuration and workload. There are tunables
for this sort of thing. See the swappinness sysctl:

http://kerneltrap.org/node/3000

I think either Linux Kernel Development 1st/2nd ed[1]. or Understanding the
Linux Kernel[2] give a straightforward explanation of the algorithm used
(possibly somewhat outdated now but conceptually still mostly accurate - I have
not read either since I stopped teaching kernel developer courses).

> to worry about saving time on accessing the index.  And, although I'm no 
> expert on the subject, I'd guess that data in a disk cache would be 
> swapped out long before data that the program's written into its own 
> data space.  And, of course, there's the advantage that you're not 
> depending on system calls that may or may not be honored the way you want.

Guessing doesn't help when you want the data in memory "at all cost" - if you
want determinism it's better to use the APIs that provide it.

Regards,
Bryn.

[1] http://www.amazon.com/Linux-Kernel-Development-Robert-Love/dp/0672325128
[2] http://oreilly.com/catalog/9780596005658

LKD is now up to a 3rd ed. btw but I've not read it at all:
http://blog.rlove.org/2010/07/linux-kernel-development-third-edition.html
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux