Forum: NGINX proxy_cache_path with huge zone size

Posted by traquila (Guest)
on 2013-02-27 10:56
(Received via mailing list)
Hello,

I have some troubles to configure my reverse proxy cache.

I would like to use a proxy cache with about 5 TB.
If I estimate an average file size of 128KB, I need to define my zone 
size
to about 5GB.  (5 TB / (128KB / 128))

Here the configuration line:
proxy_cache_path /opt/.../hdd_storage/cache levels=1:2
keys_zone=proxyCacheZone_hdd:5000m max_size=5000g inactive=1d;
Now, as I have 16 CPUs, I defined 16 worker_process.

The problem is, for each worker an allocation of 5 GB is done for a 
total of
80 GB of ram usage!!!

Do I have misunderstood somethig?
Is there a way to used a shared memory between workers for the zone 
cache?

Thank you in advance
Traquila

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,236662,236662#msg-236662
Posted by Igor Sysoev (Guest)
on 2013-02-27 11:00
(Received via mailing list)
On Feb 27, 2013, at 13:56 , traquila wrote:

> keys_zone=proxyCacheZone_hdd:5000m max_size=5000g inactive=1d;
> Now, as I have 16 CPUs, I defined 16 worker_process.
>
> The problem is, for each worker an allocation of 5 GB is done for a total of
> 80 GB of ram usage!!!
>
> Do I have misunderstood somethig?
> Is there a way to used a shared memory between workers for the zone cache?

These 5G is shared memory.


--
Igor Sysoev
Posted by traquila (Guest)
on 2013-02-27 11:17
(Received via mailing list)
Thank you and sorry for my mistake.
You have done a great job!

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,236662,236664#msg-236664
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.