[Cialug] decreasing website latency

Kenneth Younger kyounger at gmail.com
Thu Nov 4 10:52:27 CDT 2010


My only complaint with Nginx is that SSL support requires a separate compile
of the source code, and Ubuntu's repos don't have a version with it
included. Unless someone knows of one that is maintained?

-Kenny

On Thu, Nov 4, 2010 at 9:49 AM, Matthew Nuzum <newz at bearfruit.org> wrote:

> On Thu, Nov 4, 2010 at 10:17 AM, Matthew Steven <matthew at geniusweb.com>wrote:
>
>> On 11/04/2010 09:35 AM, Matthew Nuzum wrote:
>>
>>> What kinds of latency do you think is realistic from a good server doing
>>> SSL? Maybe 350ms is the norm?
>>>
>>>  Benching a simple dynamically generated XML feed on one of my sites over
>> SSL on a live server, I'm getting the following using a brief benchmark of
>> 'ab -n 100 -c 5'
>>
>> Time per request:       170.048 [ms] (mean)
>> Time per request:       34.010 [ms] (mean, across all concurrent requests)
>>
>> There's no caching or anything involved, other than opcode.  It's a pretty
>> new and ballsy machine though, so it may not be a fair comparison from that
>> aspect.
>>
>>
> OK, very interesting observation. I decided to do the test from localhost
> and it cut the latency big time.
>
> Time per request:       98.595 [ms] (mean)
> Time per request:       98.595 [ms] (mean, across all concurrent requests)
> (keep in mind that the file is <?php echo "hello world"; ?> on a server
> with zero load)
>
> This appears to be a function of network latency so there may not be a
> solution. :-/ I'm guessing that the SSL handshake requires a couple extra
> round trips.
>
> Non-ssl is still much faster at:
> Time per request:       0.354 [ms] (mean)
> Time per request:       0.354 [ms] (mean, across all concurrent requests)
>
>
>
>> I was surprised to find that using nginx for all the static content made a
>> huge difference in the memory footprint overall, since this way one can
>> reduce the number of apache threads a great deal and use apache only for
>> serving php.
>>
>> Look at it this way: why would you want a fully loaded down apache thread
>> with its big php modules and a dozen other things you may or may not be
>> using serving up an image, when you can have a microscopic nginx service
>> serving it with very little resource usage. In any given page these days,
>> 80% of the requests are going to be for external resources like images and
>> text anyhow.
>>
>> Oh, and you'll want to have munin or some other decent monitor installed
>> to actually be able to tell if what you're doing helps or harms once it is
>> out there.
>
>
> My intention was to offload most of the static content to s3 / cloudfront
> and use my server for hosting dynamic content. S3 is so darn cheap and then
> I get the benefit of extra http pipelines.
>
> In your experience, does using Ngninx on mostly dynamic sites provide any
> benefit? I've noticed the memory footprint is quite low compared to Apache
> but I've got very very limited experience using it for dynamic content.
>
>
> --
> Matthew Nuzum
> newz2000 on freenode, skype, linkedin, identi.ca and twitter
>
> "An investment in knowledge pays the best interest." -Benjamin Franklin
>
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
>


-- 
Kenneth Younger III
Founder, Sheer Focus Inc.
Organizer, WordCamp Iowa
e: kenny at sheerfocus.com
p: (515) 367-0001
t: @kenny <http://twitter.com/kenny>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20101104/d94992e9/attachment-0001.htm 


More information about the Cialug mailing list