Previously in windows, I uses ramdisk, to accelerate chrome browsing. However, in linux, this is made possible by tmpfs/ramfs already by default.

Also can be specified (according to archwiki)by running:

echo "tmpfs    /tmp    tmpfs    defaults,size=100M    0 0" >> /etc/fstab 

Let us use tmpfs by:

mount -t tmpfs -o size=20M tmpfs /dir

Where we can see this dir by df -h command. The /dir lookes like a 'real' disk on our server.

We can use ramfs by:

mount -t ramfs -o size=20M ramfs /dir

After this we can only check this dir as ramfs by:

mount -l | grep dir

Note:

The 2 file sytems are exactly the same except for 2 differences:

1. tmpfs's size option is the maximum size of the dir (starting as 0kb), but ramfs's is the starting size of the dir;

2. ramfs always be on ram, tmpfs might use SWAP area.

The above 2 differences make tmpfs may come across speed problem and ramfs meet with out of ram exception.

un-mount these partitions by:

umount /dir

ramfs/tmpfs: Linux RAM filesystems的更多相关文章

  1. tmpfs——Linux的一种虚拟内存文件系统

    虚拟内核文件系统(VirtualKernel File Systems),是指那些是由内核产生但不存在于硬盘上(存在于内存中)的文件系统.例如 1.proc proc文件系统为操作系统本身和应用程序之 ...

  2. Linux下tmpfs与ramfs的区别

      ramfs是Linux下一种基于RAM做存储的文件系统.在使用过程中你就可以把ramfs理解为在普通的HDD上建立了一个文件系统,而现在HDD被替换成了RAM,因为是RAM做存储所以会有很高的存储 ...

  3. Linux的tmpfs和ramfs

    tmpfs tmpfs是一种虚拟内存文件系统, 它的存储空间在VM里面,现在大多数操作系统都采用了虚拟内存管理机制, VM(Virtual Memory) 是由Linux内核里面的VM子系统管理. V ...

  4. linux之tmpfs

    1.概述 tmpfs是ramfs的衍生品,ramfs是基于RAM的文件系统,不能使用swap空间:tmpfs可以动态释放空间.可以使用swap空间.ramfs不能控制使用内存的大小容易使内存爆掉:而t ...

  5. linux中的rootfs/initrd/ramfs/initramfs

    什么是ramfs?ramfs是空间规模动态变化的RAM文件系统.它非常简单,是用来实现Linux缓存机制(缓存page cache and dentry cache)的文件系统.通常情况下,Linux ...

  6. ramfs 和 tmpfs 以及 ramdisk相关调研

    最近需要使用到 ramfs 和 tmpfs 做内存文件系统,下面对这两个文件系统相关的信息,做一下总结: 参考链接: https://www.thegeekstuff.com/2008/11/over ...

  7. 【Linux】tmpfs简介及增加方式

    一. 什么是tmpfs? tmpfs是一种基于内存的文件系统,它和虚拟磁盘ramdisk比较类似,但不完全相同,和ramdisk一样,tmpfs可以使用RAM,但它也可以使用swap分区来存储.而且传 ...

  8. linux概念之分区与文件系统

    分区类型 [root@-shiyan dev]# fdisk /dev/sda WARNING: DOS-compatible mode is deprecated. It's strongly re ...

  9. linux内存文件系统之指南

    内存文件系统使用及示例:ramdisk, ramfs, tmpfs 第一部分在Linux中可以将一部分内存mount为分区来使用,通常称之为RamDisk. RamDisk有三种实现方式: 第一种就是 ...

随机推荐

  1. DEV gridcontrol 设置行数据超宽换行

    第一 在main > columns 的 某个gridcolumn下的 columnEdit为新建为 repositoryitemmemoedit 第二 repositor下的optionvie ...

  2. Source Insight使用小技巧小结

    Source Insight是一款强大的代码查看工具,本身支持扩展性很好.下面我们就介绍2个扩展用例. 1.快速打开当前文件所在的目录,这个功能类似于eclipse的easyshell插件,就是能快速 ...

  3. 学习ORM框架—hibernate(三):跟踪持久化对象状态,掌握对象持久化

    准备工作 在上篇博客中学习ORM框架—hibernate(一):初识hibernate,通过简单的实例说明O和R的映射过程.本篇博客将要介绍hibernate中持久化对象的状态,并使用hibernat ...

  4. 【翻译+整理】.NET Core的介绍

    .NET Core 是一个通用开发平台,它由微软和开源社区共同管理(git hub的.NET开源社区): 他支持Windows,macOS和Linux,并且可以运行在硬件设备中.云平台上和物联网嵌入式 ...

  5. [ios2][转]iOS摇动检测 (UIAccelerometer)

    加速计(UIAccelerometer)是一个单例模式的类,所以需要通过方法sharedAccelerometer获取其唯一的实例. 加速计需要设置的主要有两个: 一个是设置其代理,用以执行获取加速计 ...

  6. 用PopWindow做下拉框

    最近在做下拉框,本来想用spinner,可是spinner达不到项目要求,跟同学同事问了一圈,都在用popwindow, 网上看了一下,popwindow挺简单的,可定制性挺强的,符合我的要求,所以, ...

  7. 微信公众平台开发之基于百度 BAE3.0 的开发环境搭建(MyEclipse + SVN)

    等待加载完成后,在"Personal Sites" 栏目中会显示你加载的SVN的相关内容,展开"SVN"分别选择"Core SVNKit Librar ...

  8. 字典(Tire树)

    4189 字典  时间限制: 1 s  空间限制: 256000 KB  题目等级 : 大师 Master     题目描述 Description 最经,skyzhong得到了一本好厉害的字典,这个 ...

  9. 原生js

  10. D3.js:力导向图

    var nodes = [ { name: "桂林" }, { name: "广州" }, { name: "厦门" }, { name: ...