using nginx to cache file serving

Richard Stanway r1ch+nginx at
Thu Dec 5 11:13:23 UTC 2013

1. Depends a lot on your environment. If you are sure you are I/O bound,
there isn't too much you can tweak.

2. How are you measuring this? It's normal for there to be very little
"free" memory on Linux due to buffers and filesystem caches. Look at the
-/+ buffers/cache line for your available memory. If you are actually
running out of memory and hitting swap, this is likely why performance is
so low.

3. Take a look at ngx_slowfs_cache, it sounds like it might fit the bill -


On Thu, Dec 5, 2013 at 12:00 PM, mojiz <nginx-forum at> wrote:

> Hi
> We are using nginx & SATA disks on several of our file servers.However
> after
> hitting 12MBytes/s of port speed (server nic is a 1gbps), the server gets
> down to it's knees. SSH becomes very slow/unresponsive and our users
> complain about slow speeds and dropped connections. Our users/downloaders
> have very slow speed (like 512kbits/s)  so there are lots of users
> downloading from each server. I thought the problem was from using SATA
> disk
> and the bottleneck was the HDD IO speed.So we ordered a new server with SAS
> hdds & RAID0, the performance has been great and our server is serving
> about
> 20MBytes/s, (same provider)
> However I'm still not satisfied.
> 1.Is there any configuration options I'm missing? I'm using the default
> config.
> 2. Both servers rams are fully utilized and the memory is 100% filled, When
> I stop nginx the memory is still used up but why? (there is no other
> service
> running on the server)
> If this is the nginx cache, why it's not emptied when I exit/kill  nginx
> processes?
> 3. My most important question is, Is it possible/wise that I use the SAS
> server as a rev-proxy/cache to serve the downloads from the SATA server? My
> idea is when a user connects to the SAS server to download a file, The SAS
> server requests the file from the SATA server(using the internal connection
> in datacenter), caches it on it's fast disk, then serves the file to my
> slow
> downloader. This way the SATA HDD doesn't have to seek to the file location
> each time and since there are lots of downloaders this happens a lot.
> Sorry for the long message and thank you for your time
> Mojiz
> Posted at Nginx Forum:
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list