# Proxy\_cache\_path with huge zone size

**URL:** <https://www.ruby-forum.com/t/proxy-cache-path-with-huge-zone-size/226971>\
**Category:** NGINX\
**Created:** [February 27, 2013, 10:56am UTC](https://www.ruby-forum.com/t/proxy-cache-path-with-huge-zone-size/226971 "2013-02-27T10:56:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![traquila](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@traquila](https://www.ruby-forum.com/u/traquila)\
**Post date:** [February 27, 2013, 10:56am UTC](https://www.ruby-forum.com/t/proxy-cache-path-with-huge-zone-size/226971/1 "2013-02-27T10:56:45Z")

</div>

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:

> **[proxy\_cache\_path with huge zone size](https://forum.nginx.org/read.php?2,236662,236662#msg-236662)**
>
> 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 configurat

---

<div class="post-metadata">

**Author:** ![traquila](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@traquila](https://www.ruby-forum.com/u/traquila)\
**Post date:** [February 27, 2013, 11:00am UTC](https://www.ruby-forum.com/t/proxy-cache-path-with-huge-zone-size/226971/2 "2013-02-27T11:00:15Z")

</div>

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 S.

---

<div class="post-metadata">

**Author:** ![traquila](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@traquila](https://www.ruby-forum.com/u/traquila)\
**Post date:** [February 27, 2013, 11:17am UTC](https://www.ruby-forum.com/t/proxy-cache-path-with-huge-zone-size/226971/3 "2013-02-27T11:17:13Z")

</div>

Thank you and sorry for my mistake.  
You have done a great job!

Posted at Nginx Forum:

> **[Re: proxy\_cache\_path with huge zone size](https://forum.nginx.org/read.php?2,236662,236664#msg-236664)**
>
> 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 configurat
