Forum: NGINX fastcgi cache path keys zone=name:size

2974d09ac2541e892966b762aad84943?d=identicon&s=25 beatnut (Guest)
on 2014-05-09 08:37
(Received via mailing list)
Hi all
I've simple question but unfortunately i cant' find any information.

How many entries can handle 1MB of memory configured by size in
keys_zone=name:size ?

Thanks in advance for your reply

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,249973,249973#msg-249973
2974d09ac2541e892966b762aad84943?d=identicon&s=25 beatnut (Guest)
on 2014-05-13 10:49
(Received via mailing list)
I found similar information about :

limit_req_zone $binary_remote_addr   zone=one:1m  "One megabyte zone can
keep about 16 thousand 64-byte states. "

or

ssl_session_cache  shared:SSL:1m; " The cache size is specified in
bytes;
one megabyte can store about 4000 sessions."

but there is no info about   fastcgi_cache_path keys_zone shared memory.

I was searching any tip in the source code of fastcgi module with no
success.

I'm trying to adjust my setup. There will be about 30k of cached files.
How
big should be size of shared memory ?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,249973,250043#msg-250043
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-05-13 13:51
(Received via mailing list)
Hello!

On Tue, May 13, 2014 at 04:48:56AM -0400, beatnut wrote:

> but there is no info about   fastcgi_cache_path keys_zone shared memory.
>
> I was searching any tip in the source code of fastcgi module with no
> success.
>
> I'm trying to adjust my setup. There will be about 30k of cached files. How
> big should be size of shared memory ?

Each cache node currently takes about 128 bytes of memory.
So for 30k cached files you'll need about 4 megabytes.

--
Maxim Dounin
http://nginx.org/
2974d09ac2541e892966b762aad84943?d=identicon&s=25 beatnut (Guest)
on 2014-05-13 14:17
(Received via mailing list)
This is what I wanted to know.
Thank you very much Maxim.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,250046,250047#msg-250047
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.