--- Ala'a Ibrahim <[EMAIL PROTECTED]> wrote:
> Hi Zaid,
> I' so sorry again, but if I didn't say it I wouldn't
> be sleeping for days
> :), thanks for the complement, or whatever it was.
>
> anyway back to business, this number I got from the
> system admins, I don't
> work on that machine, and I don't really know if
> it's true or not, but I'm
> sure this is not happening 24 hours, but as far as I
> know, it reaches
> something like this during the day, and I also guess
> there is something
> wrong with your calculation.
>
> let's start by, everytime apache is installed we
> make sure to change the max
> simultaneous connections is changed to 1024, and
> once again it's not RPS,
> it's the number of requests that can be handled
> simultaneously, also, for me
> I've worked on optimizing stuff, and without playing
> with the OS, only PHP,
> Apache, and of course with APC.
> I managed with an AMD 64 Athlon processor to get a
> php application that was
> launched online, to take it up to about 15,000 RPS,
> also dude, if it takes 1
> sec for each page to respond, I guess you are in
> deep trouble.
>
> Also the use of client caching is so important, I
> don't think that anybody
> takes the css, JS, and images files, every time the
> browser makes a request,
> this would be so waste of bandwidth, that's why we
> use Expires,
> Last-Modification-Date, and the E-Tag headers sent,
> so the user won't get
> the same data twice, so mostly in the end, the user
> in most of the times
> just gets the HTML.
>
> also given that we have the DB on another machine,
> that would remove it's
> burden from the sever, it's on another server on the
> same Rack.
>
> and don't think that even when reaching that number
> the server is standing
> doing his job well, it would be dying out there, and
> that's why there is the
> need for another machine to share this burden with.
>
> So for me I guess 200,000 is so believable to have,
> just after doing a good
> job.
>
> On 11/17/07, Zaid Amireh <[EMAIL PROTECTED]> wrote:
> >
> > Dear Ala'a,
> >
> > You are a smart guy whom I respect. I am not going
> to reply to your
> > highlighted bold comment for obvious maturity
> reasons :) , on the
> > other hand, the number you claimed (200,000) is
> beyond absurd and
> > following is my explanation:
> >
> > In PHP, the default value of
> session.gc_maxlifetime in 1440 seconds,
> > which equals 24 minutes, I will assume that your
> clients are browsing
> > 3 pages during their session lifetime which is a
> very low number, but
> > stick with me, it gets interesting.
> >
> > 200,000 * 3 = 600,000 page requests in 24 minutes.
> >
> > each page would contain an average of 5 media
> elements, also way too
> > low but I'm not gonna stress test you here, so we
> end up with 6
> > requests for each page.
> >
> > so 600,000 * 6 requests served in 24 mins = (
> (600,000 * 6) / (24*60)
> > ) thats 2500 requests per second.
> >
> > You do know that apache's default of MaxClients
> (which is max
> > concurrent requests if you don't have keep alive
> on) is 256 and that
> > you have to change the source code to increase
> that, right? ever
> > wondered why its hard coded at 256?
> >
> > lets assume you did increase the cap and you are
> happily serving 2500
> > RPS, I don't know what hardware or software you
> have, but I can
> > extrapolate on the environment that I operate
> since its all php and
> > apache after all.
> >
> > I have a dual core Xeon with 2 gigs of RAM,
> hardware RAID 1, 100mbits
> > uplink, its a decent Dell PowerEdge machine that
> has been grinding web
> > requests for the last couple of years, it took me
> 2 months to fully
> > tweak the OS and applications, starting from the
> VM parameters in the
> > kernel, to the TCP params in the kernel, all the
> way to tuning gcc
> > compile options to produce an optimized apache
> binary, APC for php
> > caching, etc ..., trust me, its a blazing fast
> machine for serving PHP
> > and I hold extreme pride in what I made out of
> this particular
> > machine.
> >
> > How many clients can this machine serve
> concurrently? (this machine
> > does not hold the DB btw, it has only apache)
> > At 35 requests per second the CPU is at 20%
> utilization.
> > At 55 requests per second the CPU is at 40%
> utilization.
> > At 75 requests per second the CPU is at 70%
> utilization.
> > I was able to squeez 89 RPS at 100% CPU. (and the
> CPU was the
> > bottleneck, also bear in mind that the NIC has an
> onboard processor,
> > thus networking takes almost nothing from the
> CPU).
> >
> > Want fancy charts with real data? I have attached
> two charts that show
> > apache's children state and cpu utilization for
> the last hour, I can
> > also provide you with the last 12 months charts
> that include apache
> > children stats (busy, idle, waiting...), cpu
> utilization, memory
> > utilization, hard disk i/o, all that stuff.
> >
> > So for the love of the flying spaghetti monster
> don't tell me there is
> > a *single* machine out there serving 2500 PHP and
> static content
> > requests per second unless you back up your claim
> with real numbers.
> >
> > Good luck with your cluster and if you need
> anything else we are here
> > to help as much as we can :)
> >
> > virtually yours
> >
> > Zaid
> >
> >
> >
> >
> >
> > On Nov 17, 2007 2:35 PM, Ala'a Ibrahim <
> [EMAIL PROTECTED]> wrote:
> >
> > >
> > >
> > >
> > > On 11/17/07, Zaid Amireh <[EMAIL PROTECTED]>
> wrote:
> > > >
> > > >
> > > >
> > > >
> > > > you kidding me? 200,000 *concurrent* HTTP
> sessions on *one* server?
> > > > whats your session time window? 24 hours?
> > > >
> > > > seriously mate, if you want help, tell me some
> thing I would believe.
> > > >
> > > > Zaid
> > > >
> > > > On Nov 15, 2007 5:03 PM, Ala'a Ibrahim <
> [EMAIL PROTECTED]> wrote:
> > > > > well, the problem is that it's a legacy
> system, and we are not
> > planning
> > > to
> > > > > do any development on it right now, we are
> having about 200,000
> > > concurrent
> > > > > sessions on that system, and the database
> server is also already
>
=== message truncated ===
hi guys,
i'm pitching in with what i think might be helpful...
the following caught my attention:
"max simultaneous connections is changed to 1024"
first of all are we talking apache2.x or apache1.3?
because, and i'm sure you know this, there is a huge
difference of how these two servers operate.
apache1.3 and apache2.x prefork module are basically
process based, so in your example 1024 simultaneous
request would require 1024 child processes to handle .
problem is 1024 apache processes would of course
require memory and lots of it. so lets say you
optimized apache+php, and compiled in php the least
amount of libraries just to get you going and you made
each apache process take 10MBs (fyi its usually
15-23+MBs), so 1024 * 10 = 10240MBs which means you'd
need a server with 10+GBs of RAM otherwise the OS will
hit the swap and most probably thrash and the load
will skyrocket and the machine would be practically
unavailable.
so increasing MaxClients beyond 256 is not a good
idea, in fact it makes things worse, much worse. as
zaid said there is a reason its hard coded at 256.
as for the other thread based apache2.x modules, well
i don't know if the php people are ok with that to
begin with, thread safety issues might be involved.
just my 0.02$
aram
____________________________________________________________________________________
Be a better sports nut! Let your teams follow you
with Yahoo Mobile. Try it now.
http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Jolug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Jolug?hl=en-GB
-~----------~----~----~----~------~----~------~--~---