Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Parallelizing Quickref
e ELS 2019 E
Didier Verna
EPITA / LRDE
didier@lrde.epita.fr
lrde/~didier
@didierverna didier.verna
in/didierverna
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Conclusion
I
Quickref parallelized
I
Performance improvement: 4x
Thank you! Any questions?
Parallelizing Quickref / ELS 2019 Didier Verna 2/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Introduction
I
Reference manuals for CL
(Quicklisp) libraries
I
quickref.common-lisp.net
or local builds
I
Originally: sequential loop
over 1700+ libraries
I
1h30 7h
depending on the conditions
I
Parallelism worth investigating
Parallelizing Quickref / ELS 2019 Didier Verna 3/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Plan
Toolchain
Experiments
Parallel Solution
Discussion and Perspectives
Parallelizing Quickref / ELS 2019 Didier Verna 4/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Plan
Toolchain
Experiments
Parallel Solution
Discussion and Perspectives
Parallelizing Quickref / ELS 2019 Didier Verna 5/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Toolchain
Quicklisp
foo/
Declt
foo.texi Makeinfo foo.html
Important remarks:
I
Declt works by introspection
I
Compilation / loading (of dependencies) may be required
I
Avoid loading 1700+ libraries in the same Lisp image!
I
Run Declt in external processes
I
Makeinfo is a Perl/C script
I
Ditto
Parallelizing Quickref / ELS 2019 Didier Verna 6/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Plan
Toolchain
Experiments
Parallel Solution
Discussion and Perspectives
Parallelizing Quickref / ELS 2019 Didier Verna 7/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Scenarios
I
Quickref Options
I
Libraries and Update
I
full / installed-only
I
download / compilation may occur
I
Compilation cache Policy
I
global / local
I
global cache may cause problems
I
Scenarios
1. All libraries already compiled (1h 27m)
2. Nothing compiled, global compilation cache (1h 51m)
3. Nothing compiled, local compilation cache (7h 01m)
Parallelizing Quickref / ELS 2019 Didier Verna 8/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Time Distribution
Makeinfo
48!%
Declt
48!%
Loading
4!%
1
Makeinfo
40!%
Declt
41!%
Loading
3!%
Compilation
16!%
2
Makeinfo
10!%
Declt
10!%
Loading
1!%
Compilation
79!%
3
Scenario Texinfo Html
1 52% 48%
2 60% 40%
3 90% 10%
Parallelizing Quickref / ELS 2019 Didier Verna 9/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Plan
Toolchain
Experiments
Parallel Solution
Discussion and Perspectives
Parallelizing Quickref / ELS 2019 Didier Verna 10/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Parallel Solution
Library Pool
Declt
Declt
Declt
Texinfo Files Makeinfo
Makeinfo
Makeinfo
HTML Files
I
Usable in all scenarios
I
Dependency graph management cheap
I
Scenario 2
I
Best results: 4 Declt threads / 4 Makeinfo threads
I
Total time: 28m 17s (25% of sequential time)
Parallelizing Quickref / ELS 2019 Didier Verna 11/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Library Pool Management
Dependency Graph
5
6
1 2
4 3
Library Pool Done
2 1
3 4
5
6
Parallelizing Quickref / ELS 2019 Didier Verna 12/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Library Pool Management
Dependency Graph
5
6
1 2
4 3
Library Pool
1 2
Done
2 1
3 4
5
6
Parallelizing Quickref / ELS 2019 Didier Verna 12/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Library Pool Management
Dependency Graph
5
6
1 2
4 3
Library Pool
1
3
Done
2 1
3 4
5
6
Parallelizing Quickref / ELS 2019 Didier Verna 12/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Library Pool Management
Dependency Graph
5
6
1 2
4 3
Library Pool
4
Done
2 1
3 4
5
6
Parallelizing Quickref / ELS 2019 Didier Verna 12/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Library Pool Management
Dependency Graph
5
6
1 2
4 3
Library Pool
5
Done
2 1
3 4
5
6
Parallelizing Quickref / ELS 2019 Didier Verna 12/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Library Pool Management
Dependency Graph
5
6
1 2
4 3
Library Pool
6
Done
2 1
3 4
5
6
Parallelizing Quickref / ELS 2019 Didier Verna 12/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Library Pool Management
Dependency Graph
5
6
1 2
4 3
Library Pool Done
2 1
3 4
5
6
Parallelizing Quickref / ELS 2019 Didier Verna 12/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Plan
Toolchain
Experiments
Parallel Solution
Discussion and Perspectives
Parallelizing Quickref / ELS 2019 Didier Verna 14/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Discussion and Perspectives
I
Alternative Algorithms
I
Dependency Management Issues
I
Based on static information provided by Quicklisp
I
Fragile, not always correct
I
CPU vs. I/O Consumption
I
4x is a bit disappointing
I
Open the Declt and Makeinfo black boxes
I
SJF-like Scheduling
I
Very dicult to gure out where complexity comes from
I
Collect timings and use them in next run
I
SSD!
Parallelizing Quickref / ELS 2019 Didier Verna 15/16
Conclusion
Introduction Toolchain
Experiments
Solution
Perspectives
Acknowledgments
I
Initial code base: Antoine Martin
I
Author index and parallel algorithm #4: Antoine Hacquard
I
Hosting (code & website): CLF / common-lisp.net
Parallelizing Quickref / ELS 2019 Didier Verna 16/16