linux缓存nscd
1、安装 yum -y install nscd
2、配置文件: /etc/nscd.conf
3、缓存文件:缓存DB文件在/var/db/nscd下。可以通过nscd -g查看统计的信息
4、清除缓存:nscd -i passwd/group/hosts; service nscd restart;service nscd reload
5、nscd可以缓存服务passwd group hosts等,对应库为/etc/passwd, /etc/hosts 和 /etc/resolv.conf等,每个库保存两份缓存,一份是找到记录的,一份是没有找到记录的。每一种缓存都保存有生存时间(TTL)。其作用就是在本地增加cache ,加快如DNS的解析等的速度。
6、但是,很多情况下,可能开启nscd之后,会发现命中率一直为0。原因在于很多linux服务会采用直接访问的模式来读取缓存, 直读的模式性能更好,但因为不经过daemon,所以无法进行统计。解决办法是把shared的属性关闭
参考:1、http://octopresszhangyu.herokuapp.com/blog/2015/06/19/nscd/
2、https://www.hi-linux.com/posts/9461.html
linux缓存nscd的更多相关文章
- [转载]Linux缓存机制
[转载]Linux缓存机制 来源:https://blog.csdn.net/weixin_38278334/article/details/96478405 linux下的缓存机制及清理buffer ...
- linux开启nscd服务缓存加速
在我使用的阿里云主机上有观察到开启了一个服务nscd ,后来谷哥了下该服务的作用.了解到nscd会缓存三种服务passwd group hosts,所以它会记录三个库,分别对应源/etc/passwd ...
- linux 缓存手动清除
linux下怎么清理缓存 free -m 命令可以查看内存使用情况 sysctl 命令可以临时改变某个系统参数 如:sysctl -w net.ipv4.ip_f ...
- 清空Linux缓存
清空Linux的缓存 sync > /proc/sys/vm/drop_caches > /proc/sys/vm/drop_caches > /proc/sys/vm/drop_c ...
- linux缓存手动清理
一般情况下不建议这么做, 如果你确定向的话还是可以的首先运行sync把未存盘的cache都写入磁盘,稍等片刻, 或者是直接运行sync 两遍 然后echo 1 试试应该大部分缓存可以释放 释放ca ...
- 清除linux缓存命令
命令 #sync #echo 3 > /proc/sys/vm/drop_caches 查看内存情况: # more /proc/meminfo Kernels 2.6.16 and newer ...
- 释放Linux系统缓存
清理Linux缓存使用下面的命令 sync; echo 3 > /proc/sys/vm/drop_caches 需求与原理 下面介绍buffer与cache的差别: A buffer is s ...
- Linux主机解析顺序
1.介绍 本篇文章由于因公司项目上线,需要对项目环境进行压力测试.在压测过程中,所有打压机从公网对目标项目服务器进行压力测试,发现和内网压力测试的性能结果差距10倍左右,在调整主机对DNS的解析顺序之 ...
- Linux吃掉我的内存
在Windows下资源管理器查看内存使用的情况,如果使用率达到80%以上,再运行大程序就能感觉到系统不流畅了,因为在内存紧缺的情况下使用交换分区,频繁地从磁盘上换入换出页会极大地影响系统的性能.而当我 ...
随机推荐
- 解决Ubuntu的错误提示
如果你是一个Ubuntu用户,也许偶尔甚至经常,遇到这样一个错误提示“System Program problem detected”. Ubuntu有一个内建的实用程序叫做Apport, 当一个程序 ...
- thinkphp5 消息队列thinkphp-queue扩展
1.简介 thinkphp-queue是thinkphp的一个第三方扩展, 内置了 Redis,Database,Topthink ,Sync这四种驱动,推荐使用redis 2. 下载 和安装 com ...
- [PAT] 1147 Heaps(30 分)
1147 Heaps(30 分) In computer science, a heap is a specialized tree-based data structure that satisfi ...
- 176. Second Highest Salary
Write a SQL query to get the second highest salary from the Employee table. +----+--------+ | Id | S ...
- Linux下服务器搭建
一.安装前准备工作 yum -y install gcc yum -y install gcc-c++ yum -y install make yum -y install ncurses-d ...
- CrudRepository.findOne报错
踩坑,写controller,用到了Repository.findOne(id);一直报错,发现CrudRepository没有方法. 排查原因是JAR包的原因. 我之前是2.0.1 springbo ...
- hdu 1698 Just a Hook(线段树区间修改)
传送门:Just a Hook Problem Description In the game of DotA, Pudge’s meat hook is actually the most horr ...
- 转:x64与x86的改变
http://tieba.baidu.com/p/1250470248 x64与x86的改变 硬件要求就是64位的CPU.操作系统也必须是64位的,如果在64位的CPU上安装了32位的操作系统,就算编 ...
- 转:Spring学习笔记---Spring Security登录页
转:http://axuebin.com/blog/2016/06/21/spring-security/?utm_source=tuicool&utm_medium=referral. 提示 ...
- thinkphp下实现ajax无刷新分页
1.前言 作为一名php程序员,我们开发网站主要就是为了客户从客户端进行体验,在这里,thinkphp框架自带的分页类是每次翻页都要刷新一下整个页面,这种翻页的用户体验显然是不太理想的,我们希望每次翻 ...