Redis parameter optimization

Source: Internet
Author: User

The Redis memory management method supports Tcmalloc,jemalloc,malloc three memory allocations, memcache using memory allocation methods such as Slabs,malloc.
The simple point, Redis, is to use the side of the application, using the field to apply memory to store data, and rarely use free-list and other ways to optimize memory allocation, memcache using a pre-allocated memory pool, using slab and different sizes of chunk to manage memory, Item selects the appropriate chunk storage based on size, the memory pool can be omitted to request/free memory cost
Optimized parameters: 1. Setting the MaxMemory option in redis.conf, my experience is that when your Redis physical memory is using more than 3/5 of the total memory capacity, it starts to be more dangerous.

2. You need to set the Vm.overcommit to 1, which is useful when writing a large number of
Overcommit_memory=0, default, Smart Super, each time the allocation of memory is required, kernel will compare the requested space and free space is sufficient to allocate overcommit_memory=1, request allocation of memory, always pretend to have enough memory overcommit_memory=2, do not allow hyper-fat memory, that is, the size of the allowed allocation is less than
3. Be sure to set a certain amount of swap, preferably as large as memory, otherwise the kernel oom (out-of-memory) killer will kill the Redis process

Redis parameter optimization

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.