Redis Learning Notes Five--Troubleshooting startup warning issues

Source: Internet
Author: User
Tags memory usage redis

If you do not make any changes to the Linux kernel before booting, the Redis launch warns you of a total of three: The following figure shows


First Warning: The TCP backlog setting of 511 cannot be enforced because/proc/sys/net/core/somaxconn are set to the lower value of 128.

This means: TCP backlog Set the value, 511 did not succeed, because/proc/sys/net/core/somaxconn this set is smaller 128.

Temporary workaround: (that is, you need to modify this value the next time you start)

Echo 511 >/proc/sys/net/core/somaxconn

Persistent Workaround: (that is, you will need to modify this value later)

Write it to the/etc/rc.local file.

The Baklog parameter actually controls the size of the accept queue that has been successfully shook for 3 times.

Refer to Linux in the backlog detailed

Second warning: overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ' vm.overcommit_memory = 1 ' to/etc/sysctl.conf and then reboot or run the command ' Sysctl Vm.overcomm It_memory=1 ' for this to take effect.

This means: The Overcommit_memory parameter is set to 0. In the case of low memory, daemon save may fail. It is recommended that overcommit_memory be modified to 1 in file/etc/sysctl.conf.

Interim workaround: Echo "Vm.overcommit_memory=1" >/etc/sysctl.conf

Permanent workaround: Write it to the/etc/sysctl.conf file.

Reference: Questions about Redis overcommit_memory under Linux

A third warning: you have transparent Huge Pages (THP) support is enabled in your kernel. This would create latency and memory usage issues with Redis. To fix thisissue run the command ' echo never >/sys/kernel/mm/transparent_hugepage/enabled ' as root, and add it to your /etc/rc.local in the order of retain thesetting after a reboot. Redis must be restarted the THP is disabled.

You are using a large transparent page that may cause redis latency and memory usage issues. Perform echo never >/sys/kernel/mm/transparent_hugepage/enabled to fix the problem.

Temporary workaround:

echo Never >/sys/kernel/mm/transparent_hugepage/enabled.

Permanent Solution:

Write it to the/etc/rc.local file.

Reference transparent large page introduction.

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.