Refined Buneman Trees
Refined Buneman Trees
Refined Buneman Trees
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
of the size of the heap during the execution time. Hopefully the data extacted<br />
in this way would present a clear image of the heap size trend.<br />
15.2.1 The Linux ps command<br />
The first option considered was the Linux command ps - report process status<br />
- which reports various information about a process or group of processes, including<br />
allocated memory. However, since we are measuring the size of a Java<br />
program running on a Java Virtual Machine, any information obtained from<br />
beyond the JVM would only reflect the characteristics of the JVM, and would<br />
therefore be very unreliable. We only know that the program we wish to profile<br />
is contained inside the space of the JVM, but we have no clue how big the<br />
program actually is. We would only have an upper limit.<br />
An example of the uselessness of the ps command when dealing with the<br />
JVM is the fact that we might set initial heap sizes differently, for example a<br />
high value and a low value, observe that the memory consumption is different in<br />
the two cases, but also that the memory consumption reported by ps grows in<br />
both cases! Clearly, if we set the initial heap size low to begin with, and measure<br />
the maximum heap size reported by ps, and then set the initial heap size in a<br />
new experiment higher than the previous reported maximum - we would not<br />
expect that the reported heap size would ever exceed the new minimum. But it<br />
does!<br />
The experiment is a bit tricky; we need to start fork a process with the JVM<br />
running on some sample data. Then quickly, before the process terminates, we<br />
must run ps -vg a few times to get snapshots of the process running. But it is<br />
possible to do, and here are the results: firstly, runs with small heap size, where<br />
the reported start and end process size are around 10 and 14 MB. (Note: the<br />
output has been edited to provide clarity)<br />
$ java -Xms1000000 -Xmx1000000000 RBT test.phylip &<br />
[1] 29376<br />
$ ps -v<br />
PID TIME RSS %MEM<br />
29376 0:03 10868 2.1<br />
29376 0:12 11452 2.2<br />
29376 0:22 13472 2.6<br />
Secondly, a large initial heap size, reporting a memory usage between 16 and<br />
26 MB. (Note: the output has been edited to provide clarity)<br />
$ java -Xms100000000 -Xmx1000000000 RBT test.phylip &<br />
[1] 29420<br />
$ ps -v<br />
PID TIME RSS %MEM<br />
29420 0:02 16044 3.1<br />
29420 0:08 22264 4.3<br />
29420 0:17 25840 5.0<br />
84