Sentinel 1 toolbox memory increase

Greats,

I’m trying to do a radiometric callibration but it allways give me the same error, a problem with java memory. Someone can guide me how to increase de memory of sentinel 1 toolbox on a macbook?

Thanks

Luis Leitão

Are you referring to Version 1.* of S1TBX or to the SNAP 2.0 preview version?
For Version 1.* you can edit the file s1tbx.vmoptions, located in the installation directory.
You can increase the value for the Xmx parameter e.g. -Xmx5705M
The value is dependent on the amount of available RAM on your computer. By default it is set to 70%, if I remember correctly.

In Snap 2.0 you can look into the snap.conf file in the etc folder of the installation directory.
in the default_options line there is the parameter -J-Xmx.
You can increase this value to e.g. -J-Xmx5G
I think it has approximately the same default value as in S1TBX.

Marco

1 Like

Thanks for you reply Marco.
Problem solved, I gradually increasing the memory. The problem now is the machine that despite being macbook has only 4gb ram.

Thank you for your help.

Luis Leitão

Hi,

about memory managment I have some suggestion.

In my work in ONF International I have done Radar Training course based on S1TBX and ALOS2 and for standard laptop (4GO ram) I find that default value of Xmx is really to much higher. I suggest to put something like 512 because every windows user lost at least 1GO and if you had google chrome antivirus and so on you wil swap to much.

Better will be to put in the interface a slider “Maximum allocated Ram” or something like that in order that everybody understand easily that you can decrease value for old laptop (in some country new laptotp is expensive) or increase to improve speed.

Best regards

Hi.

Thanks for the help. Problem sold. I increse the virtual memory in the file by open it on a txt editor. I increse thoe memry to 3000 M. There are some funtions that dont work. I think the machine must have more Rom memory.

Luis Leitão

Hi Marpet,
Thanks for your reply here.

My computer is i5 and 4GB RAM. but when doing a process, RAM got to increase to about 95% (normal time about 50 % in use and 1.5-2 GB free) and “not responding” errors comes, also very slow performance.

By searching “Performance parameters” on right top of SNAP window, a guide comes and says about “VM parameters” that:
…these parameters are for advanced users and can be modified only by users having write access on the snap.conf file. …
To change / look at it Tools > Options > Performance in the SNAP.

In short, it seems I don’t have access to write (change the “VM parameters” since the “VM parameters” is not active).

Would you mind please help me find a solution?

Is increasing RAM a possibility? RAM is cheap so if that is possible it’s by far the best solution for you.

Thanks Marpet! your answer help a lot.
I also figured out that setting this values manually to a high value produce errors/crashes while processing on the command line. There is a compute button on options/performance in the GUI that set a balanced value for Xms, but this should be done with the less possible processes running on the computer so that the software can compute the maximum Xms possible considering the characteristics of your PC. To boost the speed even more, I am running in my SSD and deleting the intermediate data in every step. Now it’s 20 times faster.

Hello everyone,

I’m a beginner at PS-InSAR processing. By following the PS-InSAR workflow already present in the forum, I install in my windows laptop SNAP and Stamps and run mt.prep.snap in WSL.

Now I try to process 30 SLC S1 products but I face the “Data Buffer” issue that I think is correlated to SNAP memory usage. Here I attached my laptop parameters, SNAP version, VM parameters and the state of memory (I haven’t another pc, so I use this pc also for work :expressionless:).

Maybe, I have to change something in order to optimize the SNAP resources and memory usage. At least please, if you have any general suggestions on setting my laptop to upgrade performances just tell me; i’ll appreciate it.

Thanks for your reading,
regards,
Othmane.


image

image

You seem to confuse random access memory (RAM) with mass storage (often referred to as “disk” space). You can use Windows Task Manager to monitor memory usage. With only 16 GB you may need to close all other programs (or run SNAP after rebooting). Note that Windows often runs some programs in background at startup so you may need to remove them from the startup folder or manually kill them. Windows Resource Monitor is also helpful.

Web browsers tend to use a lot of memory, but are very useful when working out how to generate your required products. One strategy is to work out the processing steps with a minimal data set (such as those used in tutorials) and the aid of web access, then once you have the steps worked out you can close the browser to run full-scale processing.

Thanks for your reply George. I have monitored the RAM usage and it seems that snap uses it at almost 95%. I also removed programs in background at startup.

Now, according to some suggestions, i performed some settings on performance options (increase the RAM usage and cache) but my issue persists: i face the DataBuffer problems. The strange thing is that i try to perform the same stock of 28 images which i successfully processed 2 weeks ago and the data buffer comes out even in this case. Maybe, in every attempt SNAP take in memory some garbage data that progressively reduce the memory.
( Sorry if i say something wrong, i have several lacks in informatics (I’m a structural civil engineer and i just started with this topic). Maybe i am confused, i read FAQ “DataBuffer Errors” and similar but still i can’t solve my problem).

Thanks,
My best,
Othmane.

The memory allocated to SNAP will increase until it reaches the configured limits, and will stay at that level. 95% seems high, generally something around 2/3 the total RAM is a practical limit, because background processes, I/O buffers, and some graphics hardware uses RAM. Some processing does require a system with more than 16GB.

Hi Oth,

You can try to reduce the number of threads, as I’ve suggested here:

In your case you can test with 6 or 8.

You can also try to increase the allowed memory for SNAP. But this leaves less memory for other applications.
See here: FAQ: I’m getting the error “Cannot construct DataBuffer”, “GC overhead limit exceeded” or “Java Heap Space”. What can I do?