Server IP : 85.214.239.14 / Your IP : 18.118.7.18 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/task/2/root/proc/3/root/proc/self/root/proc/self/root/usr/share/doc/memcached/ |
Upload File : |
In versions new enough to have the `-o lru_maintainer` option, a new LRU mechanic is available. Previously: Each slab class has an independent doubly-linked list comprising its LRU. Items are pulled from the bottom and either reclaimed or evicted as needed. Now, enabling `-o lru_maintainer` changes all of the behavior below: * LRU's are now split between HOT, WARM, and COLD LRU's. New items enter the HOT LRU. * Items hit at least twice are considered active. * LRU updates only happen as items reach the bottom of an LRU. If active in HOT, move to WARM, if active in WARM, stay in WARM. If active in COLD, move to WARM. The exception is that items active in COLD are immediately moved to WARM. * HOT/WARM each capped at N% of memory available for that slab class. COLD is uncapped (by default, as of this writing). * HOT/WARM are also age capped by ratios of COLD's age. IE: HOT is capped at N% of memory, or 10% of the age of COLD, whichever comes first. * Items flow from HOT/WARM into COLD. * A background thread exists which shuffles items between/within the LRU's as limits are reached. This includes moves from COLD to WARM. * The background thread can also control the lru_crawler, if enabled. The primary goal is to better protect active items from "scanning". Items which are never hit again will flow from HOT, through COLD, and out the bottom. Items occasionally active (reaching COLD, but being hit before eviction), move to WARM. There they can stay relatively protected. A secondary goal is to improve latency. The LRU locks are no longer used on most item reads, largely during sets and from the background thread. Also the background thread is likely to find expired items and release them back to the slab class asynchronously, which speeds up new allocations. It is recommended to use this feature with the lru crawler as well: `memcached -o lru_maintainer,lru_crawler` - Then it will automatically scan slab classes for items with expired TTL's. If your items are always set to never expire, you can omit this option safely. An extra option: `-o temporary_ttl=N` (when used with lru_maintainer) will make items with a TTL less than or equal to this value use a fourth TEMP LRU. Items stored in TEMP are never bumped within its LRU or moved to other LRU's. They also cannot be evicted. This can help reduce holes and load on the LRU crawler. Do not set temporary_ttl too high or memory could become exhausted.