New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need better heuristic for default value of LAZYFLOW_THREADS #1458
Comments
There is some hope that the situation will magically improve when we upgrade to Python 3, since it uses the "New GIL" implementation: http://www.dabeaz.com/python/NewGIL.pdf But it's difficult to say for sure. |
I'm writing it here, since it might be related and the old issue is closed now. Our switch to 512x512 tiles for 2D gave a very noticeable speed-up there, but, as I just found, also a very noticeable slow-down for 3D data. First of all, we should make the tile size conditional on the dataset dimensions, but it would be good to understand this behaviour in principle. |
So I did some benchmarking on a machine with In short, I could reproduce the behavior that @stuarteberg showed in the first post. However, with more RAM, ilastik could take more and more threads, without slowing down. I guess we see three effects:
So in the end, we should find a better heuristic to set both, |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/cpu-and-ram-core-limit-for-ilastik/52428/2 |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/multiphase-segmentation-and-other-questions/78696/4 |
Lou Scheffer was experiencing poor interactive performance during pixel classification on a large 2D image. But on my machine, I get good performance, even using the same project file. The most notable difference between our two systems is the number of CPUs: Lou has 48 (presumably, half are hyper-threads).
We timed (with a stopwatch) how long it took to completely predict all tiles of a 12577x750 image using various settings of
LAZYFLOW_THREADS
. We found that the benefit to using more CPUs disappears rather quickly. Maximum performance is achieved around 4-8 CPUs. Using all 48 CPUs is nearly as bad as using just a single thread.I believe that our upcoming switch to 512px tiles will improve the situation, but we should still come up with a better heuristic for how to set
LAZYFLOW_THREADS
if the user hasn't set it themselves. Otherwise, users with beefy workstations are likely to experience worse performance than users with modern laptops.LAZYFLOW_THREADS
Image Size:
(12577, 750)
Features: All
Prediction classes: 2
Viewer tile size: 256x256
OS: Fedora 20
ilastik version: 1.2.0
The text was updated successfully, but these errors were encountered: