• 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: How many is too many instances?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How many is too many instances?


  • Subject: Re: How many is too many instances?
  • From: "Jerry W. Walker" <email@hidden>
  • Date: Sun, 29 Jan 2006 08:54:15 -0500

Hi, Eric,

I would rephrase your question from "How do you know when you are running too many instances..." to "How do you know when you are running enough instances..."

If one presumes that "too many" instances of a WOApp is one more than "enough" instances, these could be said to be the same question. The more general question underlying both of these, however, is how do you optimize your application. But that's a deeper topic than I can afford to respond to here.

The rest of this message presumes that you're familiar with WO's built-in statistics collecting and display. If not, send another message on that topic. That facility is both too valuable and too convenient to leave out of your optimizing bag of tricks.

The first question to ask, and still keep things simple, is what are you optimizing for, response time or throughput? If throughput is your issue, I would look first to moving the database to another host. If you've done that, then start increasing your number of instances, but don't expect a great deal of throughput improvement from this technique past the point of a couple instances per CPU on your host. You can gain some throughput advantage with one instance taking advantage of the wait times of another instance, but the marginal throughput advantage of adding instances goes down quickly beyond two per CPU. And, of course, watch for thrashing, which can destroy the effect of any other improvements quite quickly.

However, if response time rather than throughput is the issue, more instances can help a lot if you have long running queries. There are other approaches to this problem, but increasing the number of instances is probably the simplest effective response. In this case, start with one instance for each CPU in your server. Collect statistics for a day or so, then increase to two instances per CPU. Again collect and analyze your statistics and repeat until you see little effective improvement in average response times. Basically, what you're trying to do here is to keep the next user's request from blocking behind an earlier long running request. For every user's request that blocks behind that long running request, you've increased the number of users who perceive your web site to be slow, whether it is or not.

These statistics are best collected on an app running in production, since that will give you the most valid request profile. If you're already running in production with many instances and are afraid of going all the way back to one instance per CPU for analysis, then approach the problem from the other direction. However many instances you are currently running, take the statistics for a day, then decrease the number of instances by one to determine the marginal improvement that you've just lost for that one. Continue removing instances until you see a significant difference, then add that instance back in.

Other than just guessing, there are few other ways to approach the number of instance problem because it tends to be very dependent on the specific application.

Regards,
Jerry

On Jan 27, 2006, at 5:05 PM, Eric Stewart wrote:

How do you know when you are running to many instances of a WO App on
a given server?

I understand that you obviously can't run more instances than you have
memory to work with. So if you have 4 GB of memory and your running WO
Apps consuming 256 MB per app, obviously you can't run more than
roughly 16 apps.

I realize that the number of processors is also going to play a role
in this. Just because you have enough memory to run 16 apps doesn't
mean that's your ceiling. If you have only two processors, then you
can at most simulateously handle 2 operations. In this case do you
just monitor your CPU usage and once you start approaching 50-75% CPU
utilization on a constant basis then you know  you are running the max
number of instances you should be running.

What do you guys who deploy large applications with millions of
requests per day look for when determining exactly how many instances
to run on a given server.

Thank you for your time,

Eric Stewart
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems


    email@hidden
    203 278-4085        office



_______________________________________________
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


References: 
 >How many is too many instances? (From: Eric Stewart <email@hidden>)

  • Prev by Date: Re: HTML Text Editor
  • Next by Date: [OT?]Help needed with data access MS SQL Server 2005/EOModeler
  • Previous by thread: Re: How many is too many instances?
  • Next by thread: Application Startup...
  • Index(es):
    • Date
    • Thread