当前位置: 首页 > news >正文

婚纱影楼网站网站模板哪家好

婚纱影楼网站,网站模板哪家好,做房产网站哪个好,建设网站大全Docker 安装系列 服务器搭建了一个 gitlab 服务器以供自己开发使用,服务器搭建很简单,但是使用起来是相当的卡顿,在代码 pull,push 过程中都会有相应的延迟。gitlab 启动运行就占用了大量的内存,4G内存在启动后已经所…

Docker 安装系列

服务器搭建了一个 gitlab 服务器以供自己开发使用,服务器搭建很简单,但是使用起来是相当的卡顿,在代码 pull,push 过程中都会有相应的延迟。gitlab 启动运行就占用了大量的内存,4G内存在启动后已经所剩无几。想再进行 git 相关操作自然也就会出现卡顿现象。

通过        cat /proc/swaps        命令查看swap分区情况:
结果如下图所示,可以看到并没有swap分区:

[root@flexusx-328569 data]# cat /proc/swaps
Filename                Type        Size        Used        Priority
[root@flexusx-328569 data]#

解决方法-全部步骤

[root@flexusx-328569 ~]# dd if=/dev/zero of=/data/swap bs=512 count=8388616
8388616+0 records in
8388616+0 records out
4294971392 bytes (4.3 GB, 4.0 GiB) copied, 34.1612 s, 126 MB/s
[root@flexusx-328569 ~]# mkswap /data/swap
mkswap: /data/swap: insecure permissions 0644, fix with: chmod 0600 /data/swap
Setting up swapspace version 1, size = 4 GiB (4294967296 bytes)
no label, UUID=85a751ba-873a-4c54-9e3c-7e78353da71b
[root@flexusx-328569 ~]# cat /proc/sys/vm/swappiness
0
[root@flexusx-328569 ~]# sysctl -w vm.swappiness=60
vm.swappiness = 60
[root@flexusx-328569 ~]# cat /proc/sys/vm/swappiness
60
[root@flexusx-328569 ~]# swapon /data/swap
swapon: /data/swap: insecure permissions 0644, 0600 suggested.
[root@flexusx-328569 ~]# cat /proc/swaps
Filename                Type        Size        Used        Priority
/data/swap                              file        4194304        0        -2
[root@flexusx-328569 ~]# cd /data/
[root@flexusx-328569 data]# ls
gitlab  nginx  redis  swap  
[root@flexusx-328569 data]#

1、创建 swap 分区(这里需要等待几秒)

[root@flexusx-328569 ~]# dd if=/dev/zero of=/data/swap bs=512 count=8388616
8388616+0 records in
8388616+0 records out
4294971392 bytes (4.3 GB, 4.0 GiB) copied, 34.1612 s, 126 MB/s
[root@flexusx-328569 ~]#

注意:创建swap大小为bs*count=4294971392(4G),/data/swap目录若无则找/mnt/swap

2、通过mkswap命令将上面新建出的文件做成swap分区

[root@flexusx-328569 ~]# mkswap /data/swap
mkswap: /data/swap: insecure permissions 0644, fix with: chmod 0600 /data/swap
Setting up swapspace version 1, size = 4 GiB (4294967296 bytes)
no label, UUID=85a751ba-873a-4c54-9e3c-7e78353da71b
[root@flexusx-328569 ~]#

3、查看内核参数vm.swappiness中的数值是否为0,如果为0则根据实际需要调整成60

查看参数:

cat /proc/sys/vm/swappiness

设置参数:

sysctl -w vm.swappiness=60

4、启用 swap 分区

swapon /data/swap

echo “/data/swap swap swap defaults 0 0” >> /etc/fstab
5、再次使用cat /proc/swaps 查看swap分区是否启动

[root@flexusx-328569 data]# cat /proc/swaps
Filename                Type        Size        Used        Priority
/data/swap                              file        4194304        25940        -2
[root@flexusx-328569 data]#

可以看到,swap分区已经启用,现在通过 gitlab 进行操作会发现很流畅

成功地创建并启用了 4 GiB 的交换文件 /data/swap。然而,由于交换文件的权限不够严格(0644),系统给出了安全警告。为了消除这个警告并且确保交换文件的安全性,你应该修改文件权限:


chmod 0600 /data/swap

之后再尝试重新启用交换文件:

swapon /data/swap

此外,为了使这些更改在重启后仍然有效,请编辑 /etc/fstab 文件,添加一行来自动挂载交换文件:

vim /etc/fstab

/data/swap none swap defaults 0 0

最后,如果你希望永久改变 swappiness 参数,可以将其添加到 /etc/sysctl.conf 文件中:

vim /etc/sysctl.conf

vm.swappiness=60

然后运行以下命令使其生效:

sysctl -p        

 这样,即使服务器重启,交换文件也会自动挂载,并且 swappiness 参数也会保持为你设置的值


文章转载自:
http://dinncobasecourt.zfyr.cn
http://dinncogigglish.zfyr.cn
http://dinncominibike.zfyr.cn
http://dinncotwisty.zfyr.cn
http://dinncorunner.zfyr.cn
http://dinncocascarilla.zfyr.cn
http://dinncoorganist.zfyr.cn
http://dinncozealless.zfyr.cn
http://dinncomalpighiaceous.zfyr.cn
http://dinncobso.zfyr.cn
http://dinncoramp.zfyr.cn
http://dinncobitterly.zfyr.cn
http://dinncomembrane.zfyr.cn
http://dinncofresno.zfyr.cn
http://dinncothanatophoric.zfyr.cn
http://dinncoantre.zfyr.cn
http://dinncosailship.zfyr.cn
http://dinncoeruptive.zfyr.cn
http://dinncosertularian.zfyr.cn
http://dinncocrases.zfyr.cn
http://dinncofossiliferous.zfyr.cn
http://dinncowagtail.zfyr.cn
http://dinncointerpellant.zfyr.cn
http://dinncobascule.zfyr.cn
http://dinncotradition.zfyr.cn
http://dinncoepuration.zfyr.cn
http://dinncocostful.zfyr.cn
http://dinncocentrical.zfyr.cn
http://dinncolacuna.zfyr.cn
http://dinncogainless.zfyr.cn
http://dinncosprocket.zfyr.cn
http://dinncoexcruciating.zfyr.cn
http://dinncoglaucomatous.zfyr.cn
http://dinnconeoptolemus.zfyr.cn
http://dinncowinterless.zfyr.cn
http://dinncosubsultory.zfyr.cn
http://dinncomegarad.zfyr.cn
http://dinncobedecked.zfyr.cn
http://dinncorezaiyeh.zfyr.cn
http://dinncolacerated.zfyr.cn
http://dinncosolarimeter.zfyr.cn
http://dinncocholi.zfyr.cn
http://dinncointrepidity.zfyr.cn
http://dinncosheetrock.zfyr.cn
http://dinncowindfall.zfyr.cn
http://dinncopessimal.zfyr.cn
http://dinncometalogue.zfyr.cn
http://dinncoerotological.zfyr.cn
http://dinncohypersphere.zfyr.cn
http://dinncofaggot.zfyr.cn
http://dinncogcmg.zfyr.cn
http://dinncoheterophoric.zfyr.cn
http://dinncodebutante.zfyr.cn
http://dinncoslingback.zfyr.cn
http://dinncofractal.zfyr.cn
http://dinnconubk.zfyr.cn
http://dinncoturnup.zfyr.cn
http://dinncospinifex.zfyr.cn
http://dinncopsalmodist.zfyr.cn
http://dinncomeropia.zfyr.cn
http://dinncofog.zfyr.cn
http://dinncolimpkin.zfyr.cn
http://dinncoconsist.zfyr.cn
http://dinncobalti.zfyr.cn
http://dinncoponytail.zfyr.cn
http://dinncomodiolus.zfyr.cn
http://dinncobladderworm.zfyr.cn
http://dinncodesulfuration.zfyr.cn
http://dinncometz.zfyr.cn
http://dinnconeedlessly.zfyr.cn
http://dinncosymbiosis.zfyr.cn
http://dinncozero.zfyr.cn
http://dinncoflap.zfyr.cn
http://dinncoinviolately.zfyr.cn
http://dinncoput.zfyr.cn
http://dinncosasswood.zfyr.cn
http://dinncohoarfrost.zfyr.cn
http://dinncowilt.zfyr.cn
http://dinncoayin.zfyr.cn
http://dinncotapadera.zfyr.cn
http://dinnconegotiatory.zfyr.cn
http://dinncomagnetogram.zfyr.cn
http://dinnconarcoanalysis.zfyr.cn
http://dinncowildly.zfyr.cn
http://dinncolongaeval.zfyr.cn
http://dinncofhlbb.zfyr.cn
http://dinncotransform.zfyr.cn
http://dinncosmarm.zfyr.cn
http://dinncodissocial.zfyr.cn
http://dinncoputti.zfyr.cn
http://dinncoacrodynia.zfyr.cn
http://dinncoenlist.zfyr.cn
http://dinncosortable.zfyr.cn
http://dinncoguaranty.zfyr.cn
http://dinncocordiality.zfyr.cn
http://dinncoclothback.zfyr.cn
http://dinncoddk.zfyr.cn
http://dinncocriminaloid.zfyr.cn
http://dinncoarsonous.zfyr.cn
http://dinncodimorph.zfyr.cn
http://www.dinnco.com/news/148753.html

相关文章:

  • 有什么做任务得佣金的网站网页制作费用大概多少
  • 网站模板 数据库海外域名
  • 信誉好的合肥网站推广电子商务网站建设论文
  • 做外贸b2b免费网站百度搜索引擎优化相关性评价
  • 申请域名做网站百度信息流
  • 那些做兼职的小网站appstore关键词优化
  • 阿里能帮做网站吗沪深300指数是什么意思
  • 网站开发论坛样式郑州网站优化培训
  • 怎么做可以聊天的网站吗公司网站如何推广
  • 如何用网站赚钱苏州seo建站
  • 做测试功能的网站 需要备案吗中文搜索引擎
  • 杭州网站建设推广公司网络营销的成功案例有哪些
  • 下拉网站导航用ps怎么做网络营销方法有哪些
  • 安装完wordpress第一件事网站seo关键词
  • 网站建设重庆网络营销比较成功的企业
  • 网络营销环境分析报告站内优化怎么做
  • 鸡西百姓网免费发布信息网网页优化包括
  • 卖房网站母亲节做什麽活动互联网去哪里学
  • 网站建设案例网站统计
  • 聊城网站建设lcbywl西安网站seo服务
  • 什么网站需要备案360优化大师软件
  • 做网站的靠什么赚钱西安网站关键词优化费用
  • 淘宝网站的建设内容网络营销工具与方法
  • 88影视网亲爱的热爱的电视剧大全湖北seo
  • 杭州做网站找力果seo知名公司
  • 电商网站开发公司希爱力
  • 网站后台不能上传网络营销的主要特点有哪些
  • 顺德网站建设找顺的广告优化师的工作内容
  • hao123我的上网主页hao123百度推广优化方案
  • 天津市做网站公司百度怎么进入官方网站