QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3030|回复: 1

问preload和readahead的区别

[复制链接]
发表于 2007-5-2 23:53:30 | 显示全部楼层 |阅读模式
问preload和readahead的区别

谢谢
发表于 2007-6-8 09:21:24 | 显示全部楼层
Readahead is really only applicable to booting. The idea behind readahead is to cache all the files you're about to use in memory, so that each individual file access doesn't incur latency waiting for it to be read in from disk. It isn't proven that readahead is a real win; it is with curernt init systems and daemons, but after cleaning up daemons to not access extraneous files and streamlining the init system, some people have shown readahead to be unnecessary.

Preload is the act of loading an application into memory that you aren't using, so that when you do use it, it's already there. Preload is really only interestign for applications which use a lot of memory and require a lot of data to load. Again, it's generally better to just trim down application requirements. OOo and Mozilla could both use a diet. GNOME has been getting one heck of a diet lately, too, and it shows; it's getting pretty snappy to laod up even without prelaoding. (Note that using GDM is partly an act of preloading, since it does load in some key GNOME libraries like GTK+ and such. A good test of GNOME laod time would be to boot to KDM and log into GNOME.)

Prelink is an optimization to library loading. When a library is loaded, it has to be hooked up the application. For large C++ apps, this can take a huge amount of time. Prelinking allows this work to be done ahead of time when the application is installed, making startup time a lot shorter. It has no effect on runtime. Michael Meeks has been doing some work to make prelinking unnecessary, however, at least in the OOo case. I don't recall the exact details of his work.
__________________
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-16 16:58 , Processed in 0.051499 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表