Tuesday, April 26, 2016

Save large amount of data in Redis

  1. make sure the Redis work directory is in a partition own free space larger than memory

  2. to avoid BGSAVE fail with a fork() error even with a lot of availbe memory
    http://stackoverflow.com/questions/11752544/redis-bgsave-failed-because-fork-cannot-allocate-memory

    • run echo 1 > /proc/sys/vm/overcommit_memory as temporary solution.
    • add vm.overcommit_memory=1 to /etc/sysctl.conf and reboot as a long term solution
  3. keep writing when BGSAVE error
    in /etc/redis.conf, add or modify stop-writes-on-bgsave-error no

  4. disable Transparent Huge Pages(THP)
    This will create latency and memory usage issue with redis.
    Run the following command, and add it to /etc/rc.local to retain the setting after reboot

    sudo echo never > /sys/kernel/mm/transparent_hugepage/enabled
  5. enlarge TCP backlog setting
    Run the following command, and add it to /etc/rc.local to retain the setting after reboot

    sysctl -w net.core.somaxconn=65535

19 comments:

  1. Great Article… I love to read your articles because your writing style is too good, and also specifically to learn new things. massivetranscript.com/audio-transcription.php

    ReplyDelete
  2. Thanks for the information shared and wonderful for Bug fixers in Linux Online Voice Over Agent

    ReplyDelete
  3. Thanks for appreciating. Really means and inspires a lot to hear from you guys.I have bookmarked it and I am looking forward to reading new articles. Keep up the good work..Believe me, This is very helpful for me.

    Corporate Training in Chennai

    ReplyDelete
  4. WOW! Really Nice Post! I personally believe that to maintain the standard of a blog all the hacks mentioned above are important. All points discussed were worth reading and I’ll surely work with them all one by one.
    Video Captioning Services

    ReplyDelete
    Replies
    1. Thank You for sharing your article, This is an interesting & informative blog. It is very useful for the developer like me. Kindly keep blogging. Besides that Wisen has established as Best Corporate Training in Chennai .

      Nowadays JavaScript has tons of job opportunities on various vertical industry. Know more about JavaScript Framework Training visit Corporate Training Companies in India.

      This post gives me detailed information about the technology. corporate training companies in india

      Delete
  5. Great Article… I love to read your articles because your writing style is too good, and also specifically to learn new things.
    Pennsylvania Birth Certificate Translation Services
    Virginia Translation Rates
    Voice Actor

    ReplyDelete
  6. This idea is mind blowing. I think everyone should know such information like you have described on this post. Thank you for sharing this explanation.Your final conclusion was good. We are sowing seeds and need to be patiently wait till it blossoms.

    House keeping Services in Mumbai

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete