Fisher ha scritto: > Hi, > > I got a very strange problem. I running James on a server which have 4G > memory total, and I allocated 768M memory to James. When I use fetch mail to > fetch email from remote server, the Java VM will take 95% memory (I saw this > with the TOP command), but while I login to RemoteConsole, use memstat to > print the memory usage by James, it shows that only around 800M memory > total, and around 500M free. > Can someone tell me what happened? Thanks. > > Fisher
This is standard behavior of memory allocation between JVM and the undelying OS. If at a given moment the JVM uses a lot of temporary objects (like fetchmail does, as it creates many objects for every single incoming mail) then it's up to the garbage collector to remove them from memory. The garbage collector is only run at give times and if there is plenty of memory available then this decrease the probability that the GC will run and empty JVM memory. This means that the JVM will ask to the OS all of the memory you assigned with the Xmx parameter. The memory you see with MEMSTAT is the memory used by the JVM. Anyway, once the JVM asked the max memory to the OS it won't be freed anymore. The details depend on your OS, your kernel and you VM but most times the sentence above is true. Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
