How Redis's persistent--rdb works and issues that arise

Source: Internet
Author: User

How Redis persistent RDB mode works:

Redis Persistent RDB mode,Redis with the copy on write mechanism of the fork command. When the snapshot is generated, the entire current process is copied out, fork out a subprocess, and then loop through all the data in the child process, writing the data to an RDB file.

Redis Persistent RDB mode issues that are raised:

RDB mode requires 1 time times as much memory as the Redis service takes up

For example, a machine with a total of 16G of memory, using 10G of memory to do Redis service, if this 10G of memory is fully occupied

Then run the Save command, then the 10G process will be copied again, into 20G, more than 16G to generate exchange,

If the virtual memory is set to 4G, so save can also be completed, due to trigger a large number of exchanges, will be very slow;

If the virtual memory is set to less than 4G, Redis crashes and the data is not fully saved to the snapshot file.

Restart, you will find that the data has been lost a lot.

How Redis's persistent--rdb works and issues that arise

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.