Forum: NGINX Memcached vs. static pages

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
99f32c8445128c6d9baadb69cae02381?d=identicon&s=25 Daniel Rhoden (Guest)
on 2009-03-04 05:00
(Received via mailing list)
Hopefully this is a simple question to answer.  Is there any
performance benefit of going to the trouble of setting up memcached
for static pages?  I guess the question is, does nginx have its own
form of storing frequently requested static resources, or does it read
from the hard drive each time is serves those requests?

My gut tells me nginx has something already built in to optimize
requests for static pages without the complexity of memcached.

Thanks community!

--Daniel Rhoden
7393382a0ef9d7b12b6467f8d50650ab?d=identicon&s=25 Philip Murray (Guest)
on 2009-03-04 06:02
(Received via mailing list)
On 4/03/2009, at 4:47 PM, Daniel Rhoden wrote:

> Hopefully this is a simple question to answer.  Is there any
> performance benefit of going to the trouble of setting up memcached
> for static pages?  I guess the question is, does nginx have its own
> form of storing frequently requested static resources, or does it
> read from the hard drive each time is serves those requests?
>
> My gut tells me nginx has something already built in to optimize
> requests for static pages without the complexity of memcached.


Hi Daniel,

Nginx (to my knowledge) doesn't have such a facility, nor does it need
one. The VM system of the operating system you're using will cache oft
accessed data in memory, thus it won't always be read from disk.

So you're experiencing high disk IO with just static pages, the best
thing you can do in the short term is add more memory (which Memcache
would need otherwise anyway)

Cheers

Phil
44f2cff9ae9c2467fb2b342ac2e4c802?d=identicon&s=25 Adam Zell (Guest)
on 2009-03-04 06:19
(Received via mailing list)
For zero-copy I/O:
http://wiki.codemongers.com/NginxHttpCoreModule#sendfile
For serving static content:
http://wiki.codemongers.com/NginxHttpGzipStaticModule

Note that sendfile won't help if utilizing HTTPS.
0e9ed31bf8241b80e384061cce657aa5?d=identicon&s=25 pf shineyear (Guest)
on 2009-03-04 08:03
(Received via mailing list)
hi, maybe this can help you www.ncache.org
This topic is locked and can not be replied to.