Java process on windows using less memory than specified by -xms?

I start my server using the command "java -xms 1280m -xmx 1280m". On Linux machines, this works fine, and I see that the process uses almost the same amount of memory. However, on Windows machines, I see that the java process uses significantly less than 1280 m - about 500-600 m. I collected this data from the Windows task manager, if that matters. Both Windows machines that I checked are Windows 2003 servers and have 2 GB and 3 GB of RAM, respectively. I always thought that specifying the initial heap size on -xms would force java to use at least most of the memory. Am I mistaken? Or is it a feature with java on Windows?

+3
source share
4 answers

Windows Task Manager was designed for end users, not programmers. The latter usually prefer Process Explorer ( procexp.exe) from the Sysinternals package. This combined with vmmap.exewill show you exactly what is happening.

0
source

. - , . , " ", - , . "" " " " ". . , , 500-600 , .

+2

, .

Windows XP java -xms Unrecognised option

java -xms invalid intial heap size, , , .

So it seems that my comment is valid and you need to sort the shell by your command.

0
source

In addition to what Kevin D said about capitalization, note that 32-bit Windows systems typically have an upper bound on the maximum heap size. It tends to change depending on many factors, but I often saw this right around 1280 m that you are trying. I doubt there is a problem here, but it could be a related problem.

0
source

Source: https://habr.com/ru/post/1769584/


All Articles