2017年5月31日

crontab使用进程锁解决冲突

摘要: 想到一个问题,如果在crontab里有个定时任务设置为一分钟执行一次,但是它执行的时间可能会超过一分钟,此时crontab一分钟后会再次运行该脚本吗?这样会不会出现冲突呢?网上找了下,说可以用Linux中的进程锁控制crontab执行的并发问题。 给一个shell脚本加锁,使用flock命令。 一般 阅读全文

posted @ 2017-05-31 21:43 Still water run deep 阅读(2251) 评论(0) 推荐(0) 编辑

Better Linux Disk Caching & Performance with vm.dirty_ratio & vm.dirty_background_ratio

摘要: In previous posts on vm.swappiness and using RAM disks we talked about how the memory on a Linux guest is used for the OS itself (the kernel, buffers, 阅读全文

posted @ 2017-05-31 17:39 Still water run deep 阅读(1347) 评论(0) 推荐(0) 编辑

导航