Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 72865 invoked from network); 30 Nov 2005 20:02:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Nov 2005 20:02:20 -0000 Received: (qmail 8465 invoked by uid 500); 30 Nov 2005 20:02:16 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 8422 invoked by uid 500); 30 Nov 2005 20:02:15 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 8411 invoked by uid 99); 30 Nov 2005 20:02:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2005 12:02:15 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of janb@mortbay.com designates 209.235.255.182 as permitted sender) Received: from [209.235.255.182] (HELO jetty3.inetu.net) (209.235.255.182) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2005 12:03:45 -0800 Received: (qmail 75213 invoked from network); 30 Nov 2005 20:01:52 -0000 Received: from cpe-144-133-196-185.nsw.bigpond.net.au (HELO ?192.168.8.2?) (janb@144.133.196.185) by jetty3.inetu.net with AES256-SHA encrypted SMTP; 30 Nov 2005 20:01:52 -0000 Message-ID: <438E0522.4050204@mortbay.com> Date: Thu, 01 Dec 2005 07:01:38 +1100 From: Jan Bartel Reply-To: geronimo-dev@apache.org Organization: Mort Bay Consulting User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: geronimo-dev@apache.org Subject: Re: Statistics Management and Jetty/Tomcat References: <438CD0D3.9060109@earthlink.net> <438CD9BA.1040609@mortbay.com> <438D0462.40708@earthlink.net> <438D47DA.3050300@mortbay.com> <438DC0CA.1030505@earthlink.net> <74e15baa0511300737i797131deja4b41bb01ec2832a@mail.gmail.com> In-Reply-To: <74e15baa0511300737i797131deja4b41bb01ec2832a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Aaron, The package to look at with viewCVS at sourceforge is here: http://cvs.sourceforge.net/viewcvs.py/jetty/Jetty/extra/jsr77/src/org/mortbay/jetty/servlet/jsr77/ The JSR77 stuff is instrumented by inserting an o.m.j.s.jsr77.Jsr77Filter in front of each servlet defined for a webapp. This filter collects the JSR77 servlet statistics. The stats are exposed to JMX via the o.m.j.s.jsr77.jmx.Jsr77ServletHolderMBean at the objectname expected by the spec. The mbean interrogates the filter instance to get the stats. To turn on JSR77 for Jetty, you: 1) add these lines to the jetty.xml config file: org.mortbay.jetty.plus.PlusWebAppContext$Configuration org.mortbay.jetty.servlet.JettyWebConfiguration org.mortbay.jetty.servlet.jsr77.Configuration 2) run Jetty with jmx enabled: java -Dmain.class=org.mortbay.xml.XmlConfiguration -DSTART=extra/etc/start-plus.config -jar start.jar extra/etc/jettyplus-jmx.xml Note that the above documented instructions are given for the JettyPlus server, but should work with the standard Jetty server so long as the jsr77.jar built from the $JETTY_HOME/extra/jsr77 package is on Jetty's classpath. I gather that for the web console, you are looking not only at the JSR77 servlet stats, but want to apply JSR77-type metrics to the container-specific stats as well? cheers Jan Aaron Mulder wrote: > Jan, is there some sample code for acessing the Jetty JSR-77 stats? > If you have some of that plumbing in place already, and we can use > what's there, that would be great. > > Next best might be looking at the code for your JSR-77 implementation > and seeing how you dig up the numbers so we can try to do it the same > way. Is the code in CVSWeb or something where you can just give us a > URL to the JSR-77 implementation? > > Thanks, > Aaron > > On 11/30/05, Joe Bohn wrote: > >>I'm afraid we might be out of time for these changes in jetty. I was >>hoping to get this JSR77-like server performance mgmt completed and >>implemented for Jetty yesterday or today. That way we could have a shot >>at getting similar functionality implemented for tomcat just in time for >>v1. How quickly do you think you could get these changes into jetty? >>Would they be in a jetty5.x version or would we have to move to jetty6? >> >>WRT the bigger picture .... it is still a big unknown if we can get >>similar information from tomcat. Several folks have provided some hints >>here but I still can't find similar statistics available from within >>tomcat itself. So even if we could get this today for jetty, it might >>not be something we could implement for tomcat by v1. >> >>The bigger issue is this: >>1. The web console has this statistics view for jetty but it is >>hard-coded in the portlet itself for jetty alone. >>2. We'd like to provide equivalent capabilities for jetty and tomcat in >>the console. >>3. This requires a common management interface for the console to use >>that can be implemented by both jetty and tomcat. Aaron began creating >>this JSR77-like style stats management. I've been completing it and >>working on the jetty implementation with the goal to not lose function >>from what was already available for jetty in the console. >>4. We have to create the tomcat statistics management implementation >>that is conformant to the new structure. >> >>I'm currently at about 90% of #3 above with the issues mentioned in my >>original post on this thread. >> >>We could either: >>A. Leave well enough alone for v1 and deliver the existing function for >>jetty but not tomcat. >>B. Implement the new structure and partial Jetty implementation. This >>would be slightly less information than we currently display to the user >> but would get us on a better path. We could include the tomcat >>version if time and capability of tomcat permit. >>C. Remove the web server statistics portlet entirely from the console >>for v1. >> >>Opinions? Aaron, IIUC you wanted me to continue to pursue this for v1 >>based upon your response to my earlier post. Is that still your opinion? >> >>http://mail-archives.apache.org/mod_mbox/geronimo-dev/200511.mbox/%3c4384806B.3040303-ihVZJaRskl1bRRN4PJnoQQ@public.gmane.org%3e >> >>Joe >> >>Jan Bartel wrote: >> >>>Joe, >>> >>>When do you need these statistics by? >>>We could certainly add methods like: >>> >>>getConnectionsDuration() >>>getConnectionsRequests() >>>getRequestsDuration() >>> >>>which would return an ever-increasing counter, and then you >>>would be able to infer the averages by using the getStatsOnMs() >>>method. That would be more in line with JSR77 type stats for your >>>purposes I think. >>> >>>For Jetty6 we will be following more of the JSR77 style stats >>>gathering. Your feedback on this would be useful so we can >>>ensure that Jetty6 slurps into Geronimo with minimum fuss. >>> >>>cheers >>>Jan >>> >>>Joe Bohn wrote: >>> >>> >>>>Jan, >>>> >>>>Thanks for the information and the offer of help. >>>> >>>>I'm not familiar with either Jetty's raw JMX stats or Jetty's JSR77 >>>>implementation but I don't think I'm referring to either. >>>> >>>>What Aaron and I are trying to do is a JSR77-like implementation to >>>>deliver statistic information about the web container itself. >>>> >>>>The Web Console (in the Web Server portlet) is currently getting this >>>>type of information from org.mortbay.jetty.Server extension of >>>>org.mortbay.http.HttpServer. The stats are things like total # of >>>>connections accepted, # of open connections, max # of open >>>>connections, avg connection duration, max connection duration, avg # >>>>or active requests, max # of active requests, etc.... >>>> >>>>The enabling of these statistics is at the very bottom of the XML that >>>>you attached as "statsOn" under other server options. >>>> >>>>Can we get this information from the raw JMX stats? >>>> >>>>Joe >>>> >>>> >>>>Jan Bartel wrote: >>>> >>>> >>>>>Joe, >>>>> >>>>>Are you refering to Jetty's raw jmx statistics available from the >>>>>management console or to Jetty's JSR77 implementation? >>>>> >>>>>Jetty supports JSR77 via a filter. Have a look at the Jetty >>>>>extra/jsr77 package in the Jetty source tree. It is part of the >>>>>JettyPlus server, but >>>>>should be able to be extracted to work with vanilla jetty. I've attached >>>>>the jettyplus config files that enables it for your info. >>>>> >>>>>I can work with you on this to enable jsr77 for jetty if you'd like. >>>>> >>>>>cheers >>>>>Jan >>>>> >>>>> >>>>>Joe Bohn wrote: >>>>> >>>>> >>>>>>I'm working a new JSR77 like management API for performance >>>>>>monitoring of Jetty (soon to be followed by Tomcat) started by >>>>>>Aaron. However, I'm hitting some incompatibilities between the >>>>>>currently available Jetty statistics from the server (and displayed >>>>>>in the console today) and JSR77 performance monitoring style reporting. >>>>>> >>>>>>Jetty can report averages for some attributes such as the number of >>>>>>connection requests, the duration of connections and the duration of >>>>>>requests. When Jetty provides an average of some statistic the only >>>>>>other value typically provided is the maximum (this is true for all >>>>>>three). >>>>>> >>>>>>JSR77 performance monitoring does not track/store any averages. >>>>>>Rather, for TimeStatistics only, it is expected that the average can >>>>>>be computed by dividing the total time by the total count. There is >>>>>>not a way to compute the average for range statistics (such as the >>>>>>connection requests). I would like to be able to infer the missing >>>>>>values from the average but I don't have enough information >>>>>>available from Jetty. >>>>>> >>>>>>Given this mismatch I can do one of the following: >>>>>>1) Don't make available the reporting of averages from Jetty for the >>>>>>three statistics. Since there are no other values available, the >>>>>>result will be that we will only display the maximum value for the >>>>>>particular statistic(for Time values we'd be missing minimum, total >>>>>>time, and count - for Range that's current and LowWaterMark). >>>>>>2) Provide some extensions on the JSR77 Statistics in the console or >>>>>>geronimo Jetty packages to store and retrieve the averages in >>>>>>addition to the other values. Once again we would not have values >>>>>>for the other statistic fields ... just average and maximum. >>>>>> >>>>>>I'll need to work out the same or similar performance statistics for >>>>>>Tomcat as soon as I have the Jetty capability resolved (which I hope >>>>>>is still in the next day). So, I'll need some help from you Tomcat >>>>>>experts soon! :-) >>>>>> >>>>>>Joe >>>>>> >>>>>> >>>>> >>> >>> >>-- >>Joe Bohn >>joe.bohn-ihVZJaRskl1bRRN4PJnoQQ@public.gmane.org >> >>"He is no fool who gives what he cannot keep, to gain what he cannot >>lose." -- Jim Elliot >> > >