https://www.gravatar.com/avatar/5f48da38e786436afece6f2e46196202?s=240&d=mp

Linux Shell

Understanding Redis Background Memory Usage

Author: Tiago Ilieve

Via: Here

A closer look at how the Linux kernel influences Redis memory management

Recently, I was talking to a long-time friend, previous university colleague and former boss, who mentioned the fact that Redis was failing to persist data to disk in low memory conditions. For that reason, he advised to never let a Redis in-memory dataset to be bigger than 50% of the system memory. Thinking about how wasteful that practice would be, it’s interesting to understand why this can happen and look for alternatives to assure that Redis will be able to use as much memory as there’s available to it, without sacrificing its durability.

rsync 原理

最近研究如何实时的通过rsync传输日志文件,找到下面的文章,很详细。

在开始分析算法原理之前,简单说明下rsync的增量传输功能。

假设待传输文件为A,如果目标路径下没有文件A,则rsync会直接传输文件A,如果目标路径下已存在文件A,则发送端视情况决定是否要传输文件A。rsync默认使用"quick check"算法,它会比较源文件和目标文件(如果存在)的文件大小和修改时间mtime,如果两端文件的大小或mtime不同,则发送端会传输该文件,否则将忽略该文件。

在google voice app上接听电话

一朋友刚到漂亮国的前几天,因没提前准备当地的电话卡,网申又需要好几天,而他又需要买买买,我给他推荐了google voice,又因为自己是键盘出国,当使用时才发现别人呼叫进来的全进了语音信箱,遂研究解决方案并记录一下。

SSH 多路复用加速Ansible

前言

最近发现ansible 执行速度非常慢,执行一次playbook任务部分服务器甚至7秒以上,开启 facts 缓存、pipelining 、mitogen plugin等提升均不大,pipelining 会影响 sudo,而 mitogen 又会影响 api 的执行;正一筹莫展时,灵机一动想到了为什么不建立SSH长连接呢?这样就只需要建立一次连接,第二次直接复用大大减少ssh连接时间。遂上网查资料,并记录一下

2021,平平淡淡

https://statics.lshell.com/images/vaccination-g7bf5b1576_640.jpg

工作

公司继续效益下滑,仅有的几个项目,上线后,效果也并不好,我去看了一下,发现是新瓶装老酒,作为一个不玩游戏的技术,我都知道这一套已经过时了;之前的高仿项目也全部关停了。不过新成立的盲盒貌似还不错。