开发者

Load time of a binary in linux

I have a general "feeling" that applications open faster on Windows than on Linux. I know this is too vague/non-scientific but if I were to compare load time of an application e.g. VLC on Windows and Linux how would I go about ? Also, I would like to s开发者_如何学运维tudy the differences in loading mechanism used by windows and Linux for binaries so any reference would very much appreciated.


The Linux loader can give you lots of information about the binding process.

LD_DEBUG=help ls

See the ld.so(8) man page for more details.


To really measure this you'd need to be able to flush the file cache on each OS before measuring.

One thing that Windows does is immediately after bootup it begins loading a list of frequently used DLLs and applications into file cache. This is called SuperFetch and it works pretty well.

Linux distros sometimes have a similar list that is preloaded into file cache by a program called readahead. The problem with the Linux distros is that this list is fixed at install time and isn't automatically updated, so it usually only includes programs such as the default user desktop, web browser, email application, etc.

To flush the file cache on Linux, do the following command as root:

echo 3 > /proc/sys/vm/drop_caches

To flush the file cache on Windows? I don't know, I will need to look.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜