This feature may be interesting for the people who often run SBCL tests. It uses several CPU cores to do that quickly. While it is still not finished, there is some early implementation which can be used to measure the performance boost. In case you want to try it yourself, here are the explanations and instructions:
The idea of the multi-core test launcher is based on the fact that SBCL test files are independent, so they can be loaded and executed in parallel. The classic model with the threads pool and the test files queue fits fine - there is a main, "supervisor" thread, whose job is to spawn additional threads. Every additional thread takes care of one impure test file at a time, and executes it using child SBCL process. The supervisor thread runs all pure tests (most of them are short) and waits for the additional threads to finish.
On my PC with Phenom X4 920, I use three additional threads and all tests run 3 minutes. Without the parallel launcher, they take 8 minutes to finish. Failures seem to be reported correctly, I have tweaked several tests to check that. However, the failures collection needs synchronization, and I hope to finish with it in the future.
The performance may be improved even more by splitting all-threads.impure.lisp on several files, but this is a low-priority task. Just make sure that you rename the original threads.impure.lisp before trying this stuff (the file is so long that a separate thread runs it almost 3 minutes, so it should be the first file in the queue, alphabetically). Also, adjust the number of threads as described in Launchpad. The default value are for quad-core systems.
The issue page and the initial code changes are here:
https://bugs.launchpad.net/sbcl/+bug/742777
In case you find any errors/mistakes in the code, please let me know. I am interested to make this feature stable and ready for the upstream.
Monday, 2 May 2011
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment