FreeBSD加大swap大小
来源:互联网 发布:whats up软件 编辑:程序博客网 时间:2024/05/04 04:33
Example 11-1. Creating a Swapfile on FreeBSD
Be certain that your kernel configuration includes the memory disk driver (md(4)). It is defaultin GENERIC kernel.
device md # Memory "disks"
Create a swapfile (/usr/swap0):
# dd if=/dev/zero of=/usr/swap0 bs=1024k count=64
Set proper permissions on (/usr/swap0):
# chmod 0600 /usr/swap0
Enable the swap file in /etc/rc.conf:
swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired.
Reboot the machine or to enable the swap file immediately, type:
# mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0
# 參考官網上如何加大 swap 方式
adding-swap-space
#先確認你的 FreeBSD kernel 有無開啟 md
#cd /usr/src/sys/i386/conf
#vi GENERIC
device md # Memory "disks"
# 查看 swap 的大小資訊
#swapinfo
Device 1K-blocks Used Avail Capacity
/dev/ad0s1b 524288 0 524288 0%
#在 /usr/swap0 中建立一個 512M 大小的虛擬 swap 記憶體空間 1024k x 512 = 536870912 約 512M
#dd if=/dev/zero of=/usr/swap0 bs=1024k count=512
512+0 records in
512+0 records out
536870912 bytes transferred in 32.979217 secs (16279068 bytes/sec)
# 更改權限只能讀
#chmod 0600 /usr/swap0
# 手動啟用新的 swap 空間
#mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0
# 查看新增加的 swap 是否加大
#swapinfo
Device 1K-blocks Used Avail Capacity
/dev/ad0s1b 524288 372 524288 0%
/dev/md0 524288 0 524288 0%
Total 1048576 372 1048204 0%
#將新 swap 空間加入開機自動啟動
#vi /etc/rc.conf
swapfile="/usr/swap0"
- FreeBSD加大swap大小
- 加大VirtualBox Image大小的办法
- 修改Swap分区大小
- Ubuntu修改Swap大小
- linux swap分区大小
- linux增加swap大小
- swap 增加分区大小
- 增加swap大小
- 关于swap分区大小
- 增加swap分区大小
- 关于swap分区大小
- 调整swap分区大小
- 修改Swap区间大小
- swap空间大小调整
- 调整swap分区大小
- AIX调整swap大小
- linux修改swap大小
- swap分区的大小
- onfocus时显示一个小的信息提示层
- 控制 Cookie 的作用范围
- MyEclipse6.0汉化
- 自用命名规则
- 通过odbc访问oracle的sql语句写法
- FreeBSD加大swap大小
- 技惊四座,全新视觉,强悍街舞!——[全美最佳舞团]第3季冠军! Quest Crew 表演合集 (清晰版) 【收藏】
- Tomcat服务设置为局域网内可访问
- asp.net 页面截取一定长度(显示长度)字符串函数
- static 用法小结
- 一句让老婆感动一生的脏话
- perl面向对象编程(参数篇)-@ARGV数组
- 锁是网络数据库中的一个非常重要的概念
- perl面向对象编程(参数篇)-子程序参数@_的使用