james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bagnara <apa...@bago.org>
Subject Re: Confirmed but unidentified memory leak in RC2
Date Mon, 11 Sep 2006 09:12:07 GMT
Noel J. Bergman wrote:
> Unfortunately, I once again confirm (this time using the embedded memstat
> check in RemoteManager) that we are losing about 2MB per day.  And it does
> seem related to the days, not the amount of mail.

Imho the memstat showing 2MB more every day in an "uncontrolled"
environment is not a clear sign of a leak. Maybe you simply have
increase in traffic or anything else.. Imho this will be "confirmed"
when we'll be able to reproduce it in a different environment.

This means that you SHOULD send us more informations: I already asked
your config.xml previously! Why can't you send your config.xml?? Just
remove sensitive informations and let us work on this bug!

> I again wonder about the memory consumed by those Phoenix artifacts that
> showed up in the prior logs.  Considering that both Stefano and Norman run
> with larger heaps than I do, and that at least Stefano rotates logs
> infrequently compared to my daily rotation, it is entirely possible that
> they would not see such leaks for extended periods of time.  Also, load
> testing wouldn't help in this case, since it seems to be independent of
> load.

I just ran a postage test and I cannot confirm this idea.
1) I changed environment.xml to rotate logs *every* *second*
2) I changed Xmx to 10MB (10!!!)
3) I create a test configuration for postage to run 30 minutes of low
costant traffic:

    <!-- scenario for short runs as needed during development -->
    <scenario id="james-592" runtimeMinutes="30">
            <jvm>Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed
mode, sharing)</jvm>
          <internal count="10" username-prefix="test_int"
domain="mail.james.local" password="test" reuseExisting="yes" />
          <external count="3" username-prefix="test_ext"
domain="mail.sample.com" />
            <profile name="ext-int" source="extern" target="intern">
               <send count-per-min="10" subject="ext2int"
text-size-min="10" text-size-max="1000" binary-size-min="1"
binary-size-max="1000" />
            <profile name="int-ext" source="intern" target="extern">
               <send count-per-min="10" subject="int2ext"
text-size-min="10" text-size-max="1000" binary-size-min="1"
binary-size-max="1000"  />
            <profile name="int-int" source="intern" target="intern">
               <send count-per-min="10" subject="int2int"
text-size-min="10" text-size-max="1000" binary-size-min="1"
binary-size-max="1000"  />
        <testserver host="localhost">
          <smtp-forwarding port="2525" latecomer-wait-seconds="120"/>
          <smtp-inbound port="25" />
          <pop3 port="110" count-per-min="10" />
          <remotemanager port="4555" name="root" password="root" />
          <spam-account name="spam-sink" password="spam-sink" />
          <jvm-resources jmx-remoting-port="0" />

And here are the memstats:

James just loaded:
memstat -gc
Current memory statistics:
        Free Memory: 1514056
        Total Memory: 2969600
        Max Memory: 10420224
And after System.gc():
        Free Memory: 1556400
        Total Memory: 2969600
        Max Memory: 10420224
After 5 minutes:
memstat -gc
Current memory statistics:
        Free Memory: 714696
        Total Memory: 3203072
        Max Memory: 10420224
And after System.gc():
        Free Memory: 1752144
        Total Memory: 3497984
        Max Memory: 10420224
After the end of the test
memstat -gc
Current memory statistics:
        Free Memory: 1186792
        Total Memory: 3497984
        Max Memory: 10420224
And after System.gc():
        Free Memory: 1928488
        Total Memory: 3497984
        Max Memory: 10420224

So with 3.5MB of Max memory my james created (rotating) 1300 files in
the log directory. I believe this is much more files than your daily
rotation can do in few days and I did all of this using 3.5MB of Total
Memory, and having almost 2MB of this unused at the end of the test.

> I am still prepared to release, but we will have to document this issue.  I
> would also like for everyone to check for this in their environment.  Once a
> day, run memstat -gc in the RemoteManager, and document the available heap
> after the garbage collection.
> 	--- Noel

Imo it does not make sense to document the issue until we are able to
reproduce it somewhere else and we will understand WHERE is the leak.


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message