Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 23 Sep 2013 10:28:04 +0200
From: Paul Schutte <sjpschutte@...il.com>
To: sabotage@...ts.openwall.com
Subject: Installing everything in opt

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.

That brings me to the fact that we are using almost 3 times more meta data
cache using this symlinking scheme and therefore the chance that meta data
will be in cache is only 33% of what it would have been for the same amount
of cache.

We need to reconsider this scheme or maybe use hardlinks instead.
Hardlinks links will be the quick fix, but then everything needs to be on
the same filesystem.

Regards
Paul

Content of type "text/html" skipped

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.