-
Notifications
You must be signed in to change notification settings - Fork 9
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
Qs: parallel reading #5
Comments
Reading the tif stack is indeed serial I think, but for more or less good reason. For reasonably large tif/image source files, there should be no real advantage of doing this in parallel, because it should be mainly I/O limited instead of CPU limited. If the image files use some expensive compression, this might actually be different. Writing the cubes is then already heavily parallelized, as well as all further operations of the cuber. Do you use compressed input image files? |
I use uncompressed TIFFs of about 100 to 200 MB each. I find reading in parallel is much faster if I'm working from a RAID volume. I use btrfs RAID1 and read with about 1 to 2 threads per drive. I've seen similar results with hardware RAID 1+0, but in that case the optimum speed was at 1 thread per drive. Fresh benchmarks: Hardware I read 484 uncompressed TIFFs each of size 201MB. The system cache is cleared before each run.
|
Thanks for looking into that, it looks like this could be optimized indeed! Could you make a pull request for your modifications that use many threads for reading into the numpy array? |
Sorry, I wasn't modifying your code to generate those numbers. I just did a quick benchmark in MATLAB by reading in TIFF files with different number of workers using the Parallel Computing toolbox. The benchmark was done with very low level code. i.e. I'm not even using MATLAB's tiff reader, I'm just using their basic |
I think knossos_cuber is reading files in series. With data on a RAID volume, reading may be sped up substantially when done in parallel. Might be worth adding the option for this.
The text was updated successfully, but these errors were encountered: