-[[!meta title="full page title"]] Setting up Swapcache
+[[!meta title="Setting up swapcache"]]
This page was created from my notes of setting up my SSD as a swapchache.
-The I used the Intel 40 GB X25-V SATA II MLC.
+I used the Intel 40 GB X25-V SATA II MLC.
[[!toc]]
#a: 4g 0 4.2BSD
#a: * * 4.2BSD
-After the last line add :
+After the last line you will add your SSD setup, see the WARNINGS section of [swapcache(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=swapcache§ion8) about leaving room on the drive for proper wear levelling. For the 40GB drive 32GB should be the max size used for the cache.
- b: * 0 swap
+Add this line.
-Now save the file.
-
-Create a new file system on your drive.
+ b: 32g 0 swap
- # newfs /dev/ad6s1b
+Now save the file.
# Adding Disk to fstab
Edit /etc/fstab and comment out any exisiting swap partitions. Just add a # in front of the line.
- # /dev/serno/JPC550HN25.s1b none swap sw 0 0
+ #/dev/serno/JPC550HN25.s1b none swap sw 0 0
Add your new device to fstab
# Setting swapcache to start on boot
-To enable swapcache on boot edit etc/sysctl.conf and add
+To enable swapcache on boot edit /etc/sysctl.conf and add
vm.swapcache.read_enable=1
vm.swapcache.meta_enable=1
- vm.swapcache.data_enable=1
-See [swapcache(8)](http://leaf.dragonflybsd.org/cgi/web-man?command#swapcache§ion8) for other sysctl options.
+See [swapcache(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=swapcache§ion8) for other sysctl options like vm.swapcache.data_enable
# Activating the swapcache
The easiest way at this point is to just reboot the machine.
+