linux flushing file system caches
We may drop the file system caches on Linux to free up memory for applications. Kernels 2.6.16 and newer provide a mechanism via the /proc/ to make the kernel drop the page cache and/or inode and dentry caches on command. We can use this mechanism to free up the memory. However, this is a non-destructive operation that only free things that are completely unused and dirty objects will not be freed until written out to disk. Hence, we should flush these dirty objects to disk first. We can run sync to flush them out to disk. And the drop operations by the kernel will free more memory.
We can flush caches of the file systems by two steps:
Flush file system buffers
Call the sync command:
# sync
Free pagecache, dentries and inodes
Just echoing a number to /proc/sys/vm/drop_caches:
# echo 3 > /proc/sys/vm/drop_caches
linux flushing file system caches的更多相关文章
- Oracle:ORA-09925 and linux Read-only file system error
今天上午有同事反映应用数据库连接不上:于是排查数据库: [oracle@db ~]$ sqlplus / as sysdba SQL*Plus: Release - Production on Thu ...
- File System Design Case Studies
SRC=http://www.cs.rutgers.edu/~pxk/416/notes/13-fs-studies.html Paul Krzyzanowski April 24, 2014 Int ...
- Linux 执行partprobe命令时遇到Unable to open /dev/sr0 read-write (Read-only file system)
在使用fdisk创建分区时,我们会使用partprobe命令可以使kernel重新读取分区信息,从而避免重启系统,但是有时候会遇到下面错误信息"Warning: Unable to open ...
- 磁盘、分区及Linux文件系统 [Disk, Partition, Linux File System]
1.磁盘基础知识 1.1 物理结构 硬盘的物理结构一般由磁头与碟片.电动机.主控芯片与排线等部件组成:当主电动机带动碟片旋转时,副电动机带动一组(磁头)到相对应的碟片上并确定读取正面还是反面的碟面,磁 ...
- Linux File System
目录 . Linux文件系统简介 . 通用文件模型 . VFS相关数据结构 . 处理VFS对象 . 标准函数 1. Linux文件系统简介 Linux系统由数以万计的文件组成,其数据存储在硬盘或者其他 ...
- Linux文件虚拟机系统只读Read-only file system的快速解决方法
问题描述:上周公司的私有云(底层架构是Openstack+KVM,目前稳定性还不够好,开发团队在改进中)一个计算节点挂掉,之后恢复后发现这个计算节点的所有Linux系统都变成只读了,复制文件提示:Re ...
- Linux操作系统报:read-only file system
在对集群测试过程中发现系统中某一节点中的磁盘变成read-only file system,从而导致测试任务出错,从网上查找资料,找到以下解决方案: 这个报错的意思是硬盘属性变成只读,不可写入: VO ...
- Linux出现Read-only file system错误的解决方法
造成这个问题的解决办法大多数是由于非正常关机后导致文件系统受损引起的,在系统重新启动之后,受损分区就会被Linux自己主动挂载为仅仅读.解决办法是通过fsck来修复文件系统,然后重新启动就可以,下面是 ...
- 云服务器 linux文件系统异常an error occurren during the file system check导致服务器启动失败
云服务器 linux文件系统异常an error occurren during the file system check导致服务器启动失败 文件系统宕机,重启后报错,无法启动 处理流程: 1.编辑 ...
随机推荐
- docker 命令详解(cp篇)
docker cp :用于容器与主机之间的数据拷贝. 1.从容器里面拷文件到宿主机 答:在宿主机里面执行以下命令 docker cp 容器名:要拷贝的文件在容器里面的路径 要拷贝到宿主机的相应路径 ...
- cpp中memset函数的注意点
可参考: C++中memset函数的用法 C++中memset函数的用法 C++中memset()函数的用法详解 c/c++学习系列之memset()函数 透彻分析C/C++中memset函数 mem ...
- Java基础11-数组
1.使用数组步骤: (1)声明数组 int[] a; (2)分配空间 a=new int[5]; (3)赋值 a[0]=1; int类型数组如果没有赋值,默认值为0,String类型数组默认为nul ...
- Vertex And Fragment Shader(顶点和片段着色器)
Vertex And Fragment Shader(顶点和片段着色器) Shader "Unlit/ Vertex_And_Fragment_Shader " { Proper ...
- If you are tired...
如果你累了 1. 深呼吸 放松身体,深呼吸五分钟. 2. 听音乐 静静地听几首歌放松一下就好了,比如王豪学长推荐的追梦赤子心,骄傲的少年. 3. 冥想 放松身体,处于冥想状态. 4. 干洗脸.鸣天鼓. ...
- DEDE [field:global name=autoindex/] 按序列号递增
在用织梦仿站的时候,有些class样式是btn1.btn2这样的样式循环的,这个时候1.2可以用[field:global name=autoindex/ ] 循环得到,[field:global n ...
- java连接数据库驱动代码综合共享
1.Oracle8/8i/9i数据库(thin模式)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();S ...
- Spring Boot2中Spring Security导致Eureka注册失败
将Spring Boot升级到2.0,Spring Cloud升级到Finchley.M8时,Eureka注册就报错了 Eureka Server配置: server.port=9011 spring ...
- Python常用模块一
一. os模块 os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径 os.chdir("dirname") 改变当前脚本工作目录:相当于shell下cd ...
- ASP.NET操作DataTable各种方法
转:http://www.cnblogs.com/isking/p/6178268.html http://www.cnblogs.com/sntetwt/p/3496477.html public ...