建议对4G内存默认开启交换空间
Tofloor
poster avatar
sunshine-wc
deepin
2019-04-10 04:59
Author
Deepin 系统速度真的很快,也很流畅,但是4g内存完全不够用,一旦内存不够就会直接死机,最有效的办法就是直接强行关掉电源重启。比较影响使用体验。后来发现开启swap交换空间问题得到解决,建议深度对小内存默认开启交换空间。
另附上开启交换空间方法:https://ywnz.com/linuxjc/3241.html

Reply Favorite View the author
All Replies
avatar
nero28
deepin
2019-04-10 05:24
#1
安装时我就分swap和/
Reply View the author
avatar
jianguo922
deepin
2019-04-10 05:43
#2
这个可以考虑一下,搞个自动识别内存大小,自动设置swap交换空间的程序,在安装时自动完成
Reply View the author
avatar
海鸥
deepin
2019-04-10 05:58
#3
支持一下。这个方法试一下。
Reply View the author
avatar
shenyichong
deepin
2019-04-10 06:35
#4
这个提议很不错!
Reply View the author
avatar
宾利
deepin
2019-04-10 17:08
#5
感谢!是个好办法。
Reply View the author
avatar
aida
deepin
2019-04-10 18:00
#6
如果没分swap分区的话,可以启用swap交换文件,在性能上和swap没有区别。
用root账号,使用 fallocate 命令来创建一个所需大小的交换文件。例如,创建一个1024MB的交换文件:
# fallocate -l  1G  /swapfile
为交换文件设置权限:
# chmod 600 /swapfile
创建好交换文件后,将其格式化:
# mkswap /swapfile
启用交换文件:
# swapon /swapfile
最后,编辑 /etc/fstab, 在其中添加如下的一行:
/swapfile none swap defaults 0 0

如果要删除一个交换文件,必须先停用它。
作为root运行:
# swapoff -a
然后即可删除它:
# rm -rf /swapfile
最后从 /etc/fstab 中删除相关条目
Reply View the author
avatar
wzjxm
deepin
2019-04-10 18:01
#7
我4g内存,分了10g的交换空间,图像界面依然很卡
Reply View the author
avatar
Amadeus
deepin
2019-04-10 18:05
#8
https://bbs.deepin.org/post/176574
我4g内存,分了10g的交换空间,图像界面依然很卡

你这个是显卡驱动问题吧。
Reply View the author
avatar
181******81
deepin
2019-04-11 00:48
#9
4g内存没有swap,那是要死机的节奏吧?
Reply View the author
avatar
nego8009
deepin
2019-04-11 02:18
#10
https://bbs.deepin.org/post/176574
你这个是显卡驱动问题吧。

设备信息及驱动在那里可以看到。
Reply View the author
avatar
sunshine-wc
deepin
2019-04-11 04:50
#11
https://bbs.deepin.org/post/176574
4g内存没有swap,那是要死机的节奏吧?

就是会死机
Reply View the author
Comments
aida
2019-05-20 17:27
不会死机的,内核会把内存不够进程杀掉
avatar
Amadeus
deepin
2019-04-11 21:32
#12
https://bbs.deepin.org/post/176574
设备信息及驱动在那里可以看到。

深度显卡驱动管理器。
Reply View the author
avatar
nego8009
deepin
2019-05-14 23:25
#13
https://bbs.deepin.org/post/176574
如果没分swap分区的话,可以启用swap交换文件,在性能上和swap没有区别。
用root账号,使用 fallocate 命令 ...

请教一下,我的主机4G内在,交换空间4G与8G有区别吗?怎样修改?
Reply View the author
avatar
wtz
deepin
2019-05-15 00:29
#14
https://bbs.deepin.org/post/176574
请教一下,我的主机4G内在,交换空间4G与8G有区别吗?怎样修改?

没有显著区别。
Reply View the author
avatar
jianguo922
deepin
2019-05-15 03:42
#15
搞个自动识别内存大小,自动设置swap交换空间的程序,在安装时自动完成
Reply View the author
avatar
pho
deepin
2019-05-16 04:12
#16
自动做的工作还是不要,再怎么也要用户做出选择才好,每发布一次更新时,同步提供系统安装须知就好了
Reply View the author
avatar
sunshine-wc
deepin
2019-05-16 05:37
#17
https://bbs.deepin.org/post/176574
自动做的工作还是不要,再怎么也要用户做出选择才好,每发布一次更新时,同步提供系统安装须知就好了 ...

像我这样的小白不懂的话可能会选择默认设置,经常卡死真的会对这个系统的稳定性产生怀疑。在Windows上内存不够用大不了就慢点,在linux上就是直接卡到不能动啊。
Reply View the author
avatar
nego8009
deepin
2019-05-20 17:04
#18
https://bbs.deepin.org/post/176574
如果没分swap分区的话,可以启用swap交换文件,在性能上和swap没有区别。
用root账号,使用 fallocate 命令 ...

你好,我的重装系统本身就有8G的交换空间,我没有注意到,运行上面的命令把交换空间改成4G了。我想在改成8G。怎么操作
Reply View the author