• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WO and Memory Management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WO and Memory Management


  • Subject: Re: WO and Memory Management
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 13 Jul 2006 20:49:20 -0700

Hi Owen,


On Jul 13, 2006, at 7:33 PM, Owen McKerrow wrote:

Thanks for the response Chuck. See comments below....

On 14/07/2006, at 11:53 AM, Chuck Hill wrote:


On Jul 13, 2006, at 6:15 PM, Owen McKerrow wrote:

Hi All,

We are setting up an application of ours on a clients server, they did some stress testing to see if they needed a bigger box and discovered something strange.
Their comments ....


The webobjects versions have been stress tested further, we are getting ok
results but far worse then I was hoping. RIS Public faired worse the RIS
with it starting to get error with only 5 simultaneous users making simple
request 5 seconds apart (running with 2 instances each with - mx512M.

That is odd. Are you dispatching requests concurrently?

No, getting them to retest with it on.

That should make a considerable difference, unless the app is doing a lot of EOF activity.



A major point of interest is that garbage collection does not appear to be
active for these instances.

Check for I/O and DB usage. How long does the average request take to process?

From the stats page : Transactions 691 Active Session 0 Average transactions 5.031 Averegae idle 131.627

Five seconds on average is, IMHO, way too long. Either all of your actions are a little slow or some are very slow. Sight unseen, my money is on the latter. Usually this is the result of DB access, either queries that are slow to evaluate due to missing indexes or lots of single row queries due to a lack of batch faulting and pre- fetching in the application.


Are you a Project Wonder user? There is a class in there that will log out all queries that take longer than X seconds to return. That is a good way of finding slow queries. If not, I can dig out a similar class. I thought it was in Practical WebObjects, but I can't find it now. For lots of single queries, the best way I have found is to just turn on SQL logging and look at what is spit out. If you see reams of queries one after the other, each returning a single row, that is your problem.

I will also suggest that you add this to Application or modify what is there:

    /**
     * Overidden to log RR loop and gather statistics.
     */
    public WOResponse dispatchRequest(WORequest request) {

NSLog.out.appendln("=========== New Request: " + request.uri ());
NSLog.out.appendln("Headers: " + request.headers());


        long startTime = System.currentTimeMillis();
        WOResponse response = super.dispatchRequest(request);
        long endTime = System.currentTimeMillis();

NSLog.out.appendln("Elapsed Time," + (endTime - startTime) / 1000.0 + "," + request.uri());

NSLog.out.appendln("=========== End Request: " + request.uri ());

        return response;
    }

That will show you the time for each request. You can turn this into a CSV file for Excel by grepping the log
grep Elapsed AppLog.log > elapsed.csv
That lets you sort by elapsed time to find the max and min and to graph against time.



We ran the tests yesterday and the started to
consume over 500M per instance (2 instance running for RIS and RISPublic).
This morning after no activity all night the process are still using the
full memory set. To me this is a bit of a concern, can you guys check your
side to see if it the same there, or if there is some configuration options
that can be put in place to improve this?

The strange thing here is that the instances don't seem to be releasing memory. Is this normal ? Is there a setting I need to tweak somewhere in JavaMonitor ?

This is normal for the JVM on OS X. Once the JVM has allocated memory, it does not return it to the OS until it terminates. You can have the instances restart more often to return this memory to the OS. 500M seems like a lot, but that depends on what the app is doing.

Sorry forgot to mention its on a Solaris Machine running Vs 9. WO 5.2.4 ( witha 5.3 build if it makes any difference ).

IIRC, Solaris is the same in this respect. But the last time I deployed on Solaris was with Java 1.2 so it has been a few years. :-)


Does you app deal with a large amount of data that might explain this memory footprint?


Chuck

--
Coming sometime... - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: WO and Memory Management
      • From: Owen McKerrow <email@hidden>
References: 
 >WO and Memory Management (From: Owen McKerrow <email@hidden>)
 >Re: WO and Memory Management (From: Chuck Hill <email@hidden>)
 >Re: WO and Memory Management (From: Owen McKerrow <email@hidden>)

  • Prev by Date: Re: WO and Memory Management
  • Next by Date: Re: Voting Time.. Food/Policy for WoDev event, August 7th 7-10pm
  • Previous by thread: Re: WO and Memory Management
  • Next by thread: Re: WO and Memory Management
  • Index(es):
    • Date
    • Thread