Re: [Nix-dev] `fast-eval' branch merged
Eelco Dolstra, the results of your work rock! Doing dependency analysis of hack-nix was: 17.08 total (secs) is now: 2.8 total (secs) Marc Weber ___ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] `fast-eval' branch merged
Hello, On Wed, May 12, 2010 at 04:01:08PM +0200, Eelco Dolstra wrote: > Hi, > > I've merged the Nix `fast-eval' branch into the trunk. Is there any good reason not to update nixpkgs nixUnstable and nixSqlite to the latest tarballs built by hydra? I have the commits ready in git-svn; I'm about to test the speed change in the Sheevaplug. I will report on it. ___ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] `fast-eval' branch merged
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/12/2010 07:15 PM, Marc Weber wrote: > /me is waiting for JIT now :)) *kidding* Do a Nix -> something JITtable convertor then. Should be simpler.. -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJL631GAAoJEE6tnN0aWvw3WlMH/Aksg1UUggu7dexUC4kOZAoA aS/9yv48EtPwON/pwkSTpvz3TrjebQddWO52rMSmqKZoWAm0caOSxfymqWkpRIEN Uxyapdjke/Ey+V8xPCrEO7YJkcB37Qqvd7jzcjZTi4WgLYYjhjYmHIE3BsOuhmOo vvtPlzCLBBTYVnGMBJ4QUdLPRPOdzRiRg8jOhmPg+sh6HRe5JkJoauO5bFhaMSP/ duj/lKflzG3cdDoTNFzRdieY7vbFkohgHa25xPEqI+0lOtq1DKJr11Ic9ocJoGBh IsXAt1y5vhZcyCLfG3a9pCSS9uTWBQSk//AE29YzENlm3FPxItSYkj/1ksvlyy8= =y0NG -END PGP SIGNATURE- ___ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] `fast-eval' branch merged
On Wed, May 12, 2010 at 04:01:08PM +0200, Eelco Dolstra wrote: > Hi, > > I've merged the Nix `fast-eval' branch into the trunk. Fantàstic! I was waiting the merge :) Thank you. ___ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev
RE: [Nix-dev] `fast-eval' branch merged
Merging the sqlite branch will give us another speed up as well (hopefully) :-) -Original Message- From: nix-dev-boun...@cs.uu.nl on behalf of Marc Weber Sent: Wed 5/12/2010 5:15 PM To: nix-dev Subject: Re: [Nix-dev] `fast-eval' branch merged Excerpts from Nicolas Pierron's message of Wed May 12 17:07:44 +0200 2010: > Great News :) I second that. hack-nix will be a nice test case as well. /me is waiting for JIT now :)) *kidding* Marc Weber ___ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev ___ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] `fast-eval' branch merged
Excerpts from Nicolas Pierron's message of Wed May 12 17:07:44 +0200 2010: > Great News :) I second that. hack-nix will be a nice test case as well. /me is waiting for JIT now :)) *kidding* Marc Weber ___ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] `fast-eval' branch merged
Hi, Great News :) On Wed, May 12, 2010 at 16:01, Eelco Dolstra wrote: > Hi, > > I've merged the Nix `fast-eval' branch into the trunk. This replaces the > current Nix expression evaluator by a new, faster implementation. It no > longer > uses the term-rewriting based approach (described in [1]) but a more > conventional functional language implementation based on thunk updating. As a > result, Nix no longer depends on the ATerm library. > > Here are some benchmark results to show the performance improvement. The > benchmarks are: > > - `nix-env -f /etc/nixos/nixpkgs -qa \*' on Nixpkgs r21747. > - `nix-env -f /etc/nixos/nixpkgs -qa \* --drv-path'. > - `nix-instantiate /etc/nixos/nixos -A system --readonly-mode' (also on r21747 > of NixOS). This is what every `nixos-rebuild' operation does. > - `nix-instantiate /etc/nixos/nixos/tests/ -A proxy.test --readonly-mode' > (which > evaluates 4 NixOS system configurations). > > These were done on a 32-bit Linux machine (Intel Core 2 Duo T7700 @ 2.40GHz, 2 > GiB RAM) and on a 64-bit Linux machine (Intel Core i5 750 @ 2.67GHz, 6 GiB > RAM). > Here are the timings in seconds: > > | Old | New | Speedup > -+---+--+ > `nix-env -qa' (32-bit) | 2.96 | 0.60 | 4.9x > `nix-env -qa' (64-bit) | 1.86 | 0.32 | 5.8x > `nix-env -qa --drv-path' (32-bit) | 12.48 | 3.96 | 3.2x > `nix-env -qa --drv-path' (64-bit) | 7.65 | 2.04 | 3.8x > `nix-instantiate -A system' (32-bit) | 6.79 | 1.32 | 5.1x > `nix-instantiate -A system' (64-bit) | 4.63 | 0.71 | 6.5x > `nix-instantiate -A proxy.test' (32-bit) | 23.86 | 3.55 | 6.7x > `nix-instantiate -A proxy.test' (64-bit) | 15.76 | 1.95 | 8.1x > > Another goal of the `fast-eval' branch was to reduce memory consumption by the > evaluator. The old evaluator basically never released memory due to its > normal > form cache. With the new evaluator, we can in principle reclaim garbage > memory. > However, it doesn't actually have a garbage collector yet. I intend to use > the > Boehm GC for that. Nevertheless, the new evaluator already uses less memory > than the old one. For instance, `nix-instantiate -A system' on 64-bit Linux > uses 358.6 MiB with the old evaluator, but only 213.7 MiB with the new > evaluator > (according to Valgrind's `massif' tool). > > [1] http://www.st.ewi.tudelft.nl/~dolstra/pubs/laziness-ldta2008-final.pdf -- Nicolas Pierron http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ ___ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] `fast-eval' branch merged
Hi, I've merged the Nix `fast-eval' branch into the trunk. This replaces the current Nix expression evaluator by a new, faster implementation. It no longer uses the term-rewriting based approach (described in [1]) but a more conventional functional language implementation based on thunk updating. As a result, Nix no longer depends on the ATerm library. Here are some benchmark results to show the performance improvement. The benchmarks are: - `nix-env -f /etc/nixos/nixpkgs -qa \*' on Nixpkgs r21747. - `nix-env -f /etc/nixos/nixpkgs -qa \* --drv-path'. - `nix-instantiate /etc/nixos/nixos -A system --readonly-mode' (also on r21747 of NixOS). This is what every `nixos-rebuild' operation does. - `nix-instantiate /etc/nixos/nixos/tests/ -A proxy.test --readonly-mode' (which evaluates 4 NixOS system configurations). These were done on a 32-bit Linux machine (Intel Core 2 Duo T7700 @ 2.40GHz, 2 GiB RAM) and on a 64-bit Linux machine (Intel Core i5 750 @ 2.67GHz, 6 GiB RAM). Here are the timings in seconds: | Old | New | Speedup -+---+--+ `nix-env -qa' (32-bit) | 2.96 | 0.60 | 4.9x `nix-env -qa' (64-bit) | 1.86 | 0.32 | 5.8x `nix-env -qa --drv-path' (32-bit)| 12.48 | 3.96 | 3.2x `nix-env -qa --drv-path' (64-bit)| 7.65 | 2.04 | 3.8x `nix-instantiate -A system' (32-bit) | 6.79 | 1.32 | 5.1x `nix-instantiate -A system' (64-bit) | 4.63 | 0.71 | 6.5x `nix-instantiate -A proxy.test' (32-bit) | 23.86 | 3.55 | 6.7x `nix-instantiate -A proxy.test' (64-bit) | 15.76 | 1.95 | 8.1x Another goal of the `fast-eval' branch was to reduce memory consumption by the evaluator. The old evaluator basically never released memory due to its normal form cache. With the new evaluator, we can in principle reclaim garbage memory. However, it doesn't actually have a garbage collector yet. I intend to use the Boehm GC for that. Nevertheless, the new evaluator already uses less memory than the old one. For instance, `nix-instantiate -A system' on 64-bit Linux uses 358.6 MiB with the old evaluator, but only 213.7 MiB with the new evaluator (according to Valgrind's `massif' tool). [1] http://www.st.ewi.tudelft.nl/~dolstra/pubs/laziness-ldta2008-final.pdf -- Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/ ___ nix-dev mailing list nix-dev@cs.uu.nl https://mail.cs.uu.nl/mailman/listinfo/nix-dev