Skip to content

Troubleshooting

Pete edited this page Jan 20, 2018 · 3 revisions

Setting memory limits

Working with large, whole slide images can require a large amount of memory (RAM).

Often, the image could be up to 40 GB uncompressed - but fortunately you don't need this much RAM to work with it, since QuPath is designed to handle things more efficiently. If you just want to view such an image, QuPath could perform well with as little as 1 GB of memory available. But for analysis that involves detecting and measuring many hundreds of thousands of cells, you probably want at least 4 GB RAM just for QuPath (i.e. your computer would need to have more so that it can run everything else it needs at the same time). The more memory you can give it, the better.

When QuPath is installed and started for the first time, it will allow itself a default amount of the memory available - and show you a dialog box to be able to change this:

Setting the maximum memory for QuPath

Setting max memory preference

If you want to adjust the setting later you can find it under Help → Show setup options.

There are three main things to note about this memory setting:

  • The amount of memory is very important for analysis. Consider raising this value, e.g. to half of the RAM your computer has.
  • Although you want to increase the memory for QuPath for analysis, you may not need a huge amount of memory if you only wish to view and annotate images manually. So if this is your plan, you may be able to leave the default setting (normally around 1/4 the total memory of the computer).
  • One of the things that uses most memory is when you run memory-intensity commands in parallel, e.g. to detect cells. If you're struggling with not having enough RAM for your analysis to complete successfully, and you can't increase the setting any further, you can instruct QuPath to try doing fewer tasks in parallel by reducing the Number of processors for parallel commands setting inside the Preferences . By default, this uses all the processors you've got - but that might be too much. (Incidentally, increasing this value above the number of processors you have is probably not a good idea.)

There's also a script you can use to track memory use and help investigate any memory-related problems issues here.

Clone this wiki locally