Closed meowcat closed 3 years ago
Hi, I would like to track down this issue. 16GB is decent. We don't want our program to fail on this machine. I only test with the official massbank data, which has less than 100k record files, so 1100k is untested. I can imagine that there is a limit atm, because we parse all content to memory(just because it was easier and worked for me). Do you think that its possible to give me your dataset? Otherwise I would have to construct an artificial dataset of that size.
Hi, that dataset specifically I can't give you right now, but I could try to finish the second part of the LipidBlast dataset, and the two LipidBlasts should be >1e6 together. (But the LipidBlast have fewer peaks per spectrum, so not sure this triggers the problem.)
The third attempt has now also failed; however, I quickly checked top
and saw that Java was only using 4gb ram, so this can maybe be solved just by doing -Xmx8092m
or such?
I should let @meier-rene comment but that trick has worked for MetFrag in the past ... ;-)
Yes, increasing the heap size by the -Xmx
switch is the way to go. There is not much what one could change on Java
, but it is important to limit the RAM
consumption because Java
takes it all (if possible). Once a colleague of mine catch 756 GB RAM with MZmine and was called by the server administrator...
Setting environment: JAVA_OPTS: -Xmx8g
and adjusting MassBank-Project/MassBank-lib/target/MassBank-lib/MassBank-lib/bin/RefreshDatabase
to use $JAVA_OPTS
for running Java seems to be working; it's still running but java is now taking >6G RAM. The limiting factor was the default max RAM percentage of 25% for max heap size, i.e. 4G on 16G RAM. Note that there is now the option -XX:MaxRAMPercentage
that would allow changing the percentage directly instead of setting a fixed value.
It works with 8G for 1.1e6 records. Should I make a PR? Do you want to further follow up?
No need for a PR. I'm testing a changed algorithm, which works with 256MB for large number of records. I will check this code in as soon as I finished testing.
Fixed with d3beaef. Thank you for reporting.
Hi,
when processing a large number (1.1e6) of records with the validator (ca 0.2% invalid), it eventually crashes with
Now this is just a dev box with 16 GB RAM, not a production server, and I can get more RAM. But does that mean that all records are first composed into memory and then the entire block written to DB? Is there already a way for the user to split this up into chunks, and/or to refresh a DB without removing existing records (so one could do blockwise addition)?
There is no specific place where the error happens, see two examples below, so I guess it's just OOM in general.
Note: a test with 600k records of which 100% are valid worked fine. For the 1.1e6 batch, I had 6k invalid records in the first attempt. I removed all those files (will fix later), and had 1300 failures in the second attempt. The third attempt is still running at currently 23 failures. But I guess the failures aren't a specific problem.
or