网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Swap交换分区概念-创新互联

转载自潇湘隐者
原文链接:/tupian/20230522/5246383.html />
什么是Linux swap space呢?我们先来看看下面两段关于Linux swap space的英文介绍资料:

 

在海勃湾等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供网站建设、成都网站设计 网站设计制作按需定制开发,公司网站建设,企业网站建设,成都品牌网站建设,全网整合营销推广,成都外贸网站制作,海勃湾网站建设费用合理。

Linux divides its physical RAM (random access memory) into chucks of memory called pages. Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory. The combined sizes of the physical memory and the swap space is the amount of virtual memory available.

Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. Swap space is located on hard drives, which have a slower access time than physical memory.Swap space can be a dedicated swap partition (recommended), a swap file, or a combination of swap partitions and swap files.

 

Linux内核为了提高读写效率与速度,会将文件在内存中进行缓存,这部分内存就是Cache Memory(缓存内存)。即使你的程序运行结束后,Cache Memory也不会自动释放。这就会导致你在Linux系统中程序频繁读写文件后,你会发现可用物理内存变少。当系统的物理内存不够用的时候,就需要将物理内存中的一部分空间释放出来,以供当前运行的程序使用。那些被释放的空间可能来自一些很长时间没有什么操作的程序,这些被释放的空间被临时保存到Swap空间中,等到那些程序要运行时,再从Swap分区中恢复保存的数据到内存中。这样,系统总是在物理内存不够时,才进行Swap交换。

关于Swap分区,其实我们有很多疑问,如果能弄清楚这些疑问,那么你对Swap的了解掌握就差不多了。如何查看Swap分区大小? Swap分区大小应该如何设置?系统在什么时候会使用Swap分区? 是否可以调整? 如何调整Swap分区的大小?Swap分区有什么优劣和要注意的地方? Swap分区是否必要?那么我一个一个来看看这些疑问吧!

 

查看Swap分区大小

 

查看Swap分区的大小以及使用情况,一般使用free命令即可,如下所示,Swap大小为2015M,目前没有使用Swap分区

[root@DB-Server ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          1000        855        145          0         28        296
-/+ buffers/cache:        530        470
Swap:         2015          0       2015

名称栏目:Swap交换分区概念-创新互联
当前地址:http://bjjierui.cn/article/dhcdoe.html

其他资讯