large number of cache files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

large number of cache files

Roger Fischer
Hello,

from a practical perspective, what would be considered an unreasonable large number of cache files (unique cache keys) in a single nginx server?

1M, 10M, 100M?

With a large cache, would there be any significant benefit in using multiple caches (multiple key_zones) in a single nginx server?

Or using two nginx servers on the same physical server (or VM)?

I am aware of the ~ 8K keys (files) per 1 MB of key zone memory, and that available memory thus poses a limit. I am curios at what point the the cache exceeds the comfort zone of the design.

Thanks…

Roger



_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

RE: large number of cache files

Reinis Rozitis
> I am curios at what point the the cache exceeds the comfort zone of the design.

In my opinion it depends more on the aspect how important is your cache / how quickly can you replace and repopulate it (how fast or loaded are your backends) / can your service work without it - as in if you have a single massive cache server what happens when it goes down?

I'm not sure what the upper or "reasonable" limits are but from a personal/practical experience I'm currently running instances with 32Gb ram and 4 x 1Tb ssds for cache files/zones (distributed via split_clients directive) each zone has keys_zone=2000m / each drive is filled up to 800G with roughly ~10M objects so in total 40-50M objects per server instance. Traffic Is arroung 1-2Gbits at peaks and there are no performance issues.

rr

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx