About the cache_mem option of squid

Source: Internet
Author: User
Article Title: About the cache_mem option of squid. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

I have been using squid for a while, and I have always had some errors in understanding the cache_mem option. I re-checked the configuration file and translated it to the dictionary. I shared it with you. Thank you for your criticism :)

Option Name: cache_mem

Replaces:

Requires:

Default Value: cache_mem 8 MB

Suggested Config:

NOTE: this parameter does not specify the maximum process size.

IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL

Use as a memory cache of objects. SQUID USES MEMORY FOR OTHER

Things as well. see the squid faq section 8 for details.

This parameter is not the maximum value of the specified process. It only sets the limit value of the object to be cached by a squid, and squid also needs to use memory in other aspects. For more details, see FAQ section 8th of squid.

'Cache _ mem 'specifies the ideal amount of memory to be used

For:

* In-Transit objects

* Hot Objects

* Negative-Cached objects

'Cache _ mem 'sets the ideal total memory size:

* OBJECTs In transmission (In-Transit OBJECTs)

* Hot OBJECTs)

* Negative-Cached OBJECTs)

Data for these objects are stored in 4 KB blocks. This

Parameter specifies the ideal upper limit on the total size

4 KB blocks allocated. In-Transit objects take the highest

Priority.

The data corresponding to these objects is stored in a 4 kb block. This parameter specifies the maximum number of allocated 4 kb blocks. In-Transit OBJECTs has the highest priority.

In-transit objects have priority over the others. When

Additional space is needed for incoming data, negative-cached

And hot objects will be released. In other words,

Negative-cached and hot objects will fill up any unused space

Not needed for in-transit objects.

In-transit OBJECTs has a higher priority than other OBJECTs. When the input data requires additional space for storage, negative-cached and hot OBJECTs will be released. In other words, passive cache objects and hot objects will fill up all unused and not necessary space for objects in transmission.

If circumstances require, this limit will be exceeded.

Specifically, if your incoming request rate requires more

'Cache _ mem 'of memory to hold in-transit objects, Squid will

Exceed this limit to satisfy the new requests. When the load

Decreases, blocks will be freed until the high-water mark is

Reached. Thereafter, blocks will be used to store hot

Objects.

If necessary, this restriction will be broken. In particular, if the input request rate needs to exceed the memory value specified by 'cache _ mem 'to carry objects in transmission, squid will break through this limit to meet new requests. When the load continues to decrease, the block will be released until it reaches the highest score waterline. After that, the block will be used to keep the hot object.

Original address http://blog.chinaunix.net/u2/67390/showart_1071869.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.