Re: question on Java / Tomcat / GC

2016-07-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 7/14/16 5:37 PM, David Kerber wrote:
> On 7/14/2016 1:41 PM, André Warnier (tomcat) wrote:
>> Hi Java GC gurus.
>> 
>> I am coming for a bit of expert advice, not for a problem.
>> 
>> At some customer site, some applications appear to react
>> somewhat slowly sometimes, although these are not very heavy
>> applications, and traffic on the site is also not very high.
>> 
>> Amog several other things I'm looking at, wondering if this might
>> have something to do with Java/Tomcat running out of memory, and
>> perhaps doing excessive GC's, I set up GC logging. Below I am
>> pasting that small Java GC log. This is running tomcat 6 still,
>> the java versions and tomcat JVM relevant switches are shown in
>> the log. I am starting the tomcat JVM with "-Xms1024M -Xmx1024M",
>> and no other non-default settings regarding memory management or
>> GC type.
>> 
>> I take it that in the log below, the first number on the left is
>> a timestamp in "seconds , thousands of a second".
> 
> What version of java are you running under?  Since you're running a
> very old Tomcat version, you might be running an old java too, and
> Java itself has had some significant performance improvements over
> the years.

Good news! I have obtained Pid's crystal ball. It says:

Java HotSpot(TM) 64-Bit Server VM (25.51-b03) for linux-amd64 JRE
(1.8.0_51-b16), built on Jun  8 2015 19:28:07 by "java_re" with gcc
4.3.0 20080428 (Red Hat 4.3.0-8)

(Note that the first time I asked it, it said "Ask Again Later". This
was the second response.)

But unfortunately, I am bound by the same rules as Pid was: we only
get to use it once every decade. So I guess maybe it was a waste this
time.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAleIP8kACgkQ9CaO5/Lv0PBI5wCeJST3bGdh4IPVz3RxWdmOInkg
UEMAmwSLVsQJwfy6/xi4paFrATt0F6ts
=QKX+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: question on Java / Tomcat / GC

2016-07-14 Thread David Kerber

On 7/14/2016 1:41 PM, André Warnier (tomcat) wrote:

Hi Java GC gurus.

I am coming for a bit of expert advice, not for a problem.

At some customer site, some applications appear to react somewhat 
slowly sometimes, although these are not very heavy applications, and 
traffic on the site is also not very high.


Amog several other things I'm looking at, wondering if this might have 
something to do with Java/Tomcat running out of memory, and perhaps 
doing excessive GC's, I set up GC logging.

Below I am pasting that small Java GC log.
This is running tomcat 6 still, the java versions and tomcat JVM 
relevant switches are shown in the log.
I am starting the tomcat JVM with "-Xms1024M -Xmx1024M", and no other 
non-default settings regarding memory management or GC type.


I take it that in the log below, the first number on the left is a 
timestamp in "seconds , thousands of a second".


What version of java are you running under?  Since you're running a very 
old Tomcat version, you might be running an old java too, and Java 
itself has had some significant performance improvements over the years.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: question on Java / Tomcat / GC

2016-07-14 Thread Leon Rosenberg
On Thu, Jul 14, 2016 at 9:15 PM, Anthony Biacco  wrote:

> On Thu, Jul 14, 2016 at 11:41 AM, André Warnier (tomcat) 
> wrote:
>
> >
> Well, i'm not a GC expert by any stretch of the imagination, but i think
> with your PrintGC options the "GC (System.gc())" and the "Full GC
> (System.gc())" are the same GC.
> Since they're consistent at every hour, the application may be calling the
> System.gc
> You may want to check the code if you have access to it.
>
> -Tony
>

If you don't have access to the code you could just disable the gc
(recommended anyway):

-XX:+DisableExplicitGC

Since the app is running in tomcat6 it must be old, and a lot has been
happening with the gc since tomcat6 time.

Btw, you may want to add -XX:+PrintGCDetails for more insights into spaces.

Also shouldn't -XX:+UseParallelGC be default since 1.7?


regards

leon


Re: question on Java / Tomcat / GC

2016-07-14 Thread Mark Thomas
On 14/07/2016 20:15, Anthony Biacco wrote:



> Since they're consistent at every hour, the application may be calling the
> System.gc

That sounds like this bug:
https://bz.apache.org/bugzilla/show_bug.cgi?id=53267

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: question on Java / Tomcat / GC

2016-07-14 Thread Anthony Biacco
On Thu, Jul 14, 2016 at 11:41 AM, André Warnier (tomcat) 
wrote:

> Hi Java GC gurus.
>
> I am coming for a bit of expert advice, not for a problem.
>
> At some customer site, some applications appear to react somewhat slowly
> sometimes, although these are not very heavy applications, and traffic on
> the site is also not very high.
>
> Amog several other things I'm looking at, wondering if this might have
> something to do with Java/Tomcat running out of memory, and perhaps doing
> excessive GC's, I set up GC logging.
> Below I am pasting that small Java GC log.
> This is running tomcat 6 still, the java versions and tomcat JVM relevant
> switches are shown in the log.
> I am starting the tomcat JVM with "-Xms1024M -Xmx1024M", and no other
> non-default settings regarding memory management or GC type.
>
> I take it that in the log below, the first number on the left is a
> timestamp in "seconds , thousands of a second".
>
> Based on what I am seeing below, it does not appear that this Tomcat would
> be at any time running short of Heap space, does it ?
> The most it seems to be using below, is 153579K, when it has 1024M to play
> with.
> Meither does it seem to be doing excessive GC either, since these logged
> GC's are separated by several thousands of seconds.
>
> But what does puzzle me a bit, is that each time it runs a "minor GC", it
> seems to follow this almost immediately (within 1-2 ms) with a "full GC".
>
>
Well, i'm not a GC expert by any stretch of the imagination, but i think
with your PrintGC options the "GC (System.gc())" and the "Full GC
(System.gc())" are the same GC.
Since they're consistent at every hour, the application may be calling the
System.gc
You may want to check the code if you have access to it.

-Tony


question on Java / Tomcat / GC

2016-07-14 Thread tomcat

Hi Java GC gurus.

I am coming for a bit of expert advice, not for a problem.

At some customer site, some applications appear to react somewhat slowly sometimes, 
although these are not very heavy applications, and traffic on the site is also not very high.


Amog several other things I'm looking at, wondering if this might have something to do 
with Java/Tomcat running out of memory, and perhaps doing excessive GC's, I set up GC logging.

Below I am pasting that small Java GC log.
This is running tomcat 6 still, the java versions and tomcat JVM relevant switches are 
shown in the log.
I am starting the tomcat JVM with "-Xms1024M -Xmx1024M", and no other non-default settings 
regarding memory management or GC type.


I take it that in the log below, the first number on the left is a timestamp in "seconds , 
thousands of a second".


Based on what I am seeing below, it does not appear that this Tomcat would be at any time 
running short of Heap space, does it ?

The most it seems to be using below, is 153579K, when it has 1024M to play with.
Meither does it seem to be doing excessive GC either, since these logged GC's are 
separated by several thousands of seconds.


But what does puzzle me a bit, is that each time it runs a "minor GC", it seems to follow 
this almost immediately (within 1-2 ms) with a "full GC".


Is this normal, expected behaviour ?
And if not, what could be the cause ?
(and, should I worry about it ?)

Should I be looking at something else than the Heap ?

-- begin log file --
Java HotSpot(TM) 64-Bit Server VM (25.51-b03) for linux-amd64 JRE (1.8.0_51-b16), built on 
Jun  8 2015 19:28:07 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)

Memory: 4k page, physical 12198284k(871340k free), swap 8088572k(7962988k free)
CommandLine flags: -XX:InitialHeapSize=1073741824 -XX:MaxHeapSize=1073741824 -XX:+PrintGC 
-XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers -XX:+UseCompressedOops 
-XX:+UseParallelGC

0,465: [GC (System.gc())  26214K->3880K(1005056K), 0,0065929 secs]
0,472: [Full GC (System.gc())  3880K->3679K(1005056K), 0,0156589 secs]
3600,493: [GC (System.gc())  98060K->17186K(1005056K), 0,0158018 secs]
3600,509: [Full GC (System.gc())  17186K->14349K(1005056K), 0,0463734 secs]
7200,555: [GC (System.gc())  35320K->14389K(1005056K), 0,0026610 secs]
7200,558: [Full GC (System.gc())  14389K->8712K(1005056K), 0,0336780 secs]
10800,592: [GC (System.gc())  13957K->8744K(1005056K), 0,0013067 secs]
10800,594: [Full GC (System.gc())  8744K->8713K(1005056K), 0,0202595 secs]
14400,615: [GC (System.gc())  13956K->8745K(1005056K), 0,0011526 secs]
14400,616: [Full GC (System.gc())  8745K->8713K(1005056K), 0,0225167 secs]
18000,639: [GC (System.gc())  13956K->8777K(1005056K), 0,0011825 secs]
18000,640: [Full GC (System.gc())  8777K->8719K(1005056K), 0,0204080 secs]
21600,661: [GC (System.gc())  13962K->8751K(1005056K), 0,0014680 secs]
21600,662: [Full GC (System.gc())  8751K->8719K(1005056K), 0,0231917 secs]
25200,686: [GC (System.gc())  13962K->8751K(1005056K), 0,0013049 secs]
25200,687: [Full GC (System.gc())  8751K->8719K(1005056K), 0,0178894 secs]
28800,706: [GC (System.gc())  13962K->8751K(1005056K), 0,0009395 secs]
28800,707: [Full GC (System.gc())  8751K->8730K(1005056K), 0,0177490 secs]
32400,725: [GC (System.gc())  13973K->8762K(1005056K), 0,0012018 secs]
32400,726: [Full GC (System.gc())  8762K->8730K(1005056K), 0,0199877 secs]
36000,747: [GC (System.gc())  13973K->8762K(1005056K), 0,0045768 secs]
36000,751: [Full GC (System.gc())  8762K->8731K(1005056K), 0,0205136 secs]
39600,772: [GC (System.gc())  82213K->11405K(1005056K), 0,0035769 secs]
39600,776: [Full GC (System.gc())  11405K->11098K(1005056K), 0,0436870 secs]
43200,820: [GC (System.gc())  153579K->12647K(1005056K), 0,0053538 secs]
43200,826: [Full GC (System.gc())  12647K->11921K(1005056K), 0,0494967 secs]
46800,876: [GC (System.gc())  80022K->13513K(1005056K), 0,0029589 secs]
46800,879: [Full GC (System.gc())  13513K->12697K(1005056K), 0,0395771 secs]
50400,919: [GC (System.gc())  103251K->13825K(1005056K), 0,0030939 secs]
50400,922: [Full GC (System.gc())  13825K->12641K(1005056K), 0,0341599 secs]
54000,957: [GC (System.gc())  86842K->13305K(1005056K), 0,0018964 secs]
54000,959: [Full GC (System.gc())  13305K->12999K(1005056K), 0,0329190 secs]
57600,992: [GC (System.gc())  72900K->13583K(1005056K), 0,0024302 secs]
57600,995: [Full GC (System.gc())  13583K->13142K(1005056K), 0,0327378 secs]
-- end logfile --

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org