Fearfully slow write speed when using Jpeg2000
(4k) x (4k) slices, writing to jpeg2000 takes up to 6 seconds per slice.
Using the multi-threaded write from
libopenjp2 improve things. Some timings with 64 threads (one socket) on power9:
jp2_writer.write(img_float) # 190 ms - was 2.3 sec glymur.Jp2k(data=img_uint, ...) # 100 ms rescale_data(img_float, 0, 65535) # 22 ms img_float.astype(np.uint16) # 2 ms
not sure where the remaining ms go - some profiling has to be done.
Using multi-threaded write implies to:
- Use another library (Ubuntu 20.04 ships libopenjp2 2.3.1, but 2.4.0 is required)
~/.config/glymur/glymurrc: see glymurrc file