[Nix-dev] Having multiple versions - disk is cheap, what about RAM?
Marc Weber
marco-oweber at gmx.de
Fri Dec 19 01:43:30 CET 2008
Reply-To:
In-Reply-To: <580076180812181553s2b168864j6378d8884cc968fa at mail.gmail.com>
On Fri, Dec 19, 2008 at 12:53:10AM +0100, Andres Loeh wrote:
> At the risk of sounding annoying:
:-) In this case I should have said: I'll implement the smallest set on
which we all agree: At least get nice error messages because tracking
them down is faster than tracking down asserts.
You're right. In most cases (such as git) nix-store --optimise should
even hardlink most files. So you even don't waste that much space (or
does hardlinking only take place if all files of /nix/store/{A,B} are
exactly the same?)
We maybe also don't want it in other cases: Examples:
PHP
(endless set of features)
python ( zlibSupport, sqliteSupport, db4Support, readlineSupport, opensslSupport, gdbmSupport)
if each depending library started selecting only the features which
it needs this would result in compiling python several times.
On the other hand you're right: This does only mean that the defaults
aren't sensible..
Are there any real disadventages building subversion with perl support
all the time? So maybe we should just enable it.
I also agree with you that administrator time today is more expensive
than some hundred MBs of disk usage..
On the other hand what does the system do if you start having 2 or 3
different versions of the same library in memory?
For example what happens if
/nix/store/xxxxx-lib/lib/libExample.so
is loaded by app1 and
/nix/store/yyyyy-lib/lib/libExample.so
is loaded by app2 (even if both are hardlinked).. Will linux allocate
the memory for the shared library twice?
Hard disk is still cheap.. But I think that RAM is still valuable if you
start running nixos on a small laptop.. It matters wether your system
takes up 512MB/1024 or does take up only half of that.
Can someone add a comment who has more knowledge?
Marc Weber
More information about the nix-dev
mailing list