LiberTEM: Severe performance regression (at least) in K2IS since 0.5.0

The K2IS dataset reached the same pixel-per-pixel performance as raw in the past. On Moellenstedt this was about 5 GPix/s. The 202 GB dataset /cachedata/users/clausen/K2IS01_vacuum_.gtg should fit the file system cache on Moellenstedt, and if not, the SSD RAID it is stored on can deliver 6 GB/s. That means this file should be analyzed in just about half a minute under ideal conditions.

A ring analysis on this file in a notebook took way over 10 minutes in tests using the current master at this time and the state of #812. I aborted the tests because they took too long.

The 0.5.0 release version reached the expected performance:

# First run
CPU times: user 9.5 s, sys: 1.06 s, total: 10.6 s
Wall time: 35.7 s

# Second run
CPU times: user 8.21 s, sys: 1.01 s, total: 9.22 s
Wall time: 35.1 s

Zipped test notebook k2is-performance.zip

Other file types were not tested yet.

We should discuss if we fast-track at least a prototype version of #198 for the 0.6 release since we have to get a handle on this before the release one way or another, in particular testing all the file formats we support, GPU processing, and a good sample of analyses.

Edit: …plus, we still have #798 on our list for 0.6 which falls in the same category.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (18 by maintainers)

Commits related to this issue

Most upvoted comments

Memory use is high but worker has no data to store to disk

This can possibly also be caused by the way dask measures memory usage - IIRC it’s possible that memory mapped files are included in that memory usage figure. Generally, the K2IS dataset is very sensitive to memory management issues, so it’s possible we are not re-using a buffer somewhere, and generate lots of garbage, which is something that has caused regressions before. As there have been quite a few changes since 0.5 (example: what tiling scheme is negotiated?), we’ll have to profile to be sure.

I’m not sure if this is helpful, but I’m getting distributed.worker - WARNING - Memory use is high but worker has no data to store to disk. Perhaps some other process is leaking memory? Process memory: 1.82 GB -- Worker memory limit: 2.09 GB when I run an analysis on a K2IS dataset.

After updating to current master, I’m getting the same message with a 4 GB MIB dataset (with 256 files), a 8 GB SEQ one and the K2IS one, but not with smaller datasets. The workers running analysis on MIB and K2IS restarted a few times and eventually stopped before completing the analysis. The analysis on SEQ ran successfully.

Interesting.

  • Did you try to work on a subset of data and see if that works, using roi?
  • Did you measure, for example using system tools, how much memory the worker processes are actually taking up? Is that memory really used by the process itself (RES in Linux top-like tools), or is it virtual memory used by mmaping of files (VIRT in top-like tools)?
  • Can you see if you can disable the memory usage limits of the dask workers, if that fixes things?

I suspect the new I/O subsystem actually also takes up a bit more RAM, and I’ll have to re-think some approaches there anyways because of the slow-ish numba-compilation and caching. For K2IS there may be some intermediate data structures which scale with the number of blocks per partition, I’ll try to eliminate those completely.

As discussed, we can first merge #819 to add the benchmarking suite and the first part of the regression fix, then I can take over for the second part regarding general I/O performance, JIT caching etc.

@AnandBaburajan Thx! Not sure if it has the same root cause as the performance regression, but definitely something that shouldn’t happen. How do you reproduce it?

I ran a disk analysis through the GUI (current master) on a ~ 8 GB K2IS dataset.