Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87d2nzbtp9.fsf@gmail.com>
Date: Mon, 23 Sep 2013 14:36:50 +0200
From: Christian Neukirchen <chneukirchen@...il.com>
To: sabotage@...ts.openwall.com
Subject: Re: Installing everything in opt

Paul Schutte <sjpschutte@...il.com> writes:

> Hi Guys,
>
> I apologize in advance if I step on someone toes with this post.
>
> Performance wise it is very bad to put everything in /opt and using
> symlinks.
>
> lets look at an example of a binary called test1 that uses three dynamic
> libraries.
>
> In a "normal" installation it will go something like this:
>
> dirlookup(/bin)->inodelookup(/bin)->dirlookup(test1)->inodelookup(test1)->load(test1)
>
>
> In the "symlink" installation it will go something like this:
>
> dirlookup(/bin)->inodelookup(/bin)->dirlookup(test1)->inodelookup(test1)->readsymlink(test1)
> ->dirlookup(/opt)->inodelookup(/opt)->dirlookup(test1dir)->inodelookup(test1dir)
> ->dirlookup(/bin)->inodelookup(/bin)->->dirlookup(test1)->inodelookup(test1)
>
> 5 operations vs 13 operations.
>
> If we take into account the 3 libraries we are at 20 ops vs 52.
>
> If we asume SATA with 8ms average seek, this will be 0.16s vs 0.416s seek
> time for the same binary.
>
> One might argue that the meta data will be cached and therefore the penalty
> is not that bad.

It would be interesting to benchmark the actual performance loss,
e.g. of a kernel build with toolchain in /usr vs symlinked.

-- 
Christian Neukirchen  <chneukirchen@...il.com>  http://chneukirchen.org

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.