Slide 1

Slide 1 text

NIX FROM THE DARK AGES: WITHOUT ROOT ROHIT GOSWAMI Created: 2020-10-17 Sat 10:19 1

Slide 2

Slide 2 text

HELLO NIXCON! Find me here: Who? Rohit Goswami MInstP AMIChemE AMIE Doctoral Researcher, University of Iceland, Faculty of Physical Sciences https://rgoswami.me 2

Slide 3

Slide 3 text

BIG PICTURE 3

Slide 4

Slide 4 text

Woes ACADEMIC CLUSTERS No docker If lucky, will have singularity No userspace support No proot Probably runs CentOS or something Has a networked le system Uses a resource queue Slurm, PBS Might have support for lmod 4

Slide 5

Slide 5 text

Necessary Evil However WHY? Users can’t be trusted Massive amounts of resources are consumed Resource limits are tracked Users need new software Developers need guarantees of high resources To test parallelism and more 5

Slide 6

Slide 6 text

WHERE’S NIX? Nix is the solution Used by some scienti c software too Does no one use it then? What if no-one cared? [dolstraNixSafePolicyFree2004] [goswamiDSEAMSDeferredStructural2020] Some clusters have nix support They actually support it though GRICAD has [bzeznikNixHPCPackage2017] The Flatiron Institute and also support nix Compute Canada Then you end up here ( ) post 6

Slide 7

Slide 7 text

WHERE ARE WE? 7

Slide 8

Slide 8 text

Prerequisites A whole lot of user- installed junk Concept METHODOLOGY REVIEW Listed here Somehow get nix to build Do unholy things to paths Indiscriminate source pruning Let nix re-install itself Described here 8

Slide 9

Slide 9 text

ACKNOWLEDGEMENTS Who worked on it rst? Built upto 2.0.4 apparently Seemingly abandoned after 2015 jefdaj/nix-no-root pjotrp/nix-no-root 9

Slide 10

Slide 10 text

HOORAY? Not quite! 10

Slide 11

Slide 11 text

WHAT WENT WRONG? Massive waste of resources Though they can be traced to the user Effectively builds on the login node (~ 3 hours) Can’t be helped without integration with a queue 11

Slide 12

Slide 12 text

WHAT DO WE NEED? 12

Slide 13

Slide 13 text

BETTER PERMISSION HANDLING e.g. building ruby involves: watch -n1 -x chmod 777 -R /tmp/nix-build-ruby-2.6.6.drv-0/source/lib/ Less gratuitous permissions might be set 13

Slide 14

Slide 14 text

BETTER NFS LOCKS Maybe even build in a temporary directory until the lock is released Currently one of the “ xes” includes: nix-build # something about a .nfs lockfile in some .nix/$HASH-pkg/.nfs0234234 mv .nix/$HASH-pkg/ .diePKGs/ nix-build # profit 14

Slide 15

Slide 15 text

Builder Provenance Who built what? a.k.a. Billing Honestly the only way to make this go mainstream Queue Integration Can only build on the head node Need slurm or PBS to run on the whole cluster BILLS AND QUEUES 15

Slide 16

Slide 16 text

FUTURE DIRECTIONS 16

Slide 17

Slide 17 text

UNION MOUNT by catern Proposed here Would reduce compilation Currently does not actually replace the global store Discussion here 17

Slide 18

Slide 18 text

PERSONAL GOALS Native le path test Hash relative to a pre x Cleaner Setup Maybe a derivation Return Next Year! Hopefully with cleaner methods 18

Slide 19

Slide 19 text

THE END 19

Slide 20

Slide 20 text

BIBLIOGRAPHY Bzeznik, Henriot, Reis, Richard & Tavard, Nix as HPC Package Management System, 1-6, in in: Proceedings of the Fourth International Workshop on HPC User Support Tools - HUST'17, edited by ACM Press Dolstra, family=Jonge & Visser, Nix: A Safe and Policy-Free System for Software Deployment, , 15 . Goswami, Goswami & Singh, D-SEAMS: Deferred Structural Elucidation Analysis for Molecular Simulations, Journal of Chemical Information and Modeling, 60(4), 2169-2177 . . [bzeznikNixHPCPackage2017] [dolstraNixSafePolicyFree2004] [goswamiDSEAMSDeferredStructural2020] doi 20

Slide 21

Slide 21 text

THANKS! 21