This is just "logical" virtual memory... For example, if you run
something with "java -ms2m -mx1024m", it will allocate 1GB of logical
virtual memory. It will succeed even if you swap and physical memory
total less than 1GB.
I believe the default is "java -ms1m -mx64m" which will start out with
1MB of real memory allocated and 64MB of logical virtual. More real
memory is not allocated until the starting heap is exhausted and the logical
pages are touched (they are allocated real pages once anything is written in
them). The JVM cannot go above the maximum figure in any case.
So I wouldn't worry about the virtual figure that's reported by ps and
such... The RSS (resident size) is a better estimate of actual memory
usage (unless you are heavily swapping).
On Fri, Dec 29, 2000 at 11:30:25PM -0800, Ian Clarke wrote:
> Well, we need to start doing some research into this - so let me get the
> ball rolling with some simple observations:
>
> So I have noticed that Freenet's memory usage gets to about 97MB within
> about 4 seconds of starting up in IBM JDK 1.3 running on Linux with
> default parameters - this is clearly rediculous. This suggests that it
> isn't a question of threads being left behind after requests, since no
> requests have taken place at this stage, but that it is something
> happening during initialisation.
>
> Not running FProxy reduces it to 86MB on startup, suggesting that FProxy
> is not the culprit, although it does contribute to the problem.
>
> Deactivating thread management (by setting maximumConnectionThreads to
> 0) has no significant effect upon the memory usage.
>
> Wow! I just temporarily removed my datastore (rm -rf .freenet/*) - and
> now memory usage is at 140MB within seconds of startup, but when I stop
> and restart the node, it is back to around 80MB.
>
> Hmmm, so if we compare the memory requirements for a few different sizes
> of datastore (in terms of total items stored, not diskcache) I don't
> notice any particular correlation (although the memory requirements vary
> between 80 and 90 MB).
>
> Ian "Sherlock" Clarke signing off...
>
> Ian.
--
Dev Random
Fingerprint: 3ABC FCEF 1BCE 4528 E4FD 15EB 173A 76D2 6959 DAF1
PGP signature