What memory is used to start an external process from java-java-memory or OS memory?

If I run the following line

final String[] command = new String[]{ffmpeg -y -i /home/user/video.mov -ss 0 -t 20 -vcodec libx264 -vpre slow -crf 18 -f flv -bf 0 -g 10 -vsync 1 -r 30 -an -threads 0 -s 1920x1080 /home/user/video0.flv};

final Process process = Runtime.getRuntime().exec(command, null, null);

It will run ffmpeg and convert the first 20 seconds of the video .mov to video.flv. But sometimes OutOfMemory is called from a high-resolution video. Obviously ffmpeg is taking up too much memory.

My question is this: do external processes start with java, taking memory from java memory or from OS memory?

Knowing this, I will know how to configure the -Xms and -Xmx options. If external processes come from OS memory, I will leave -Xms and -Xmx with low values ​​(leaving the OS with more free memory). Otherwise, I set -Xms and -Xmx to high, giving the Java process more memory.

+3
source share
1 answer

- JVM, .

+3

All Articles