Since I switched my old server to my desktop, I got a desktop with 4G RAM, and I’m running, of cause FreeBSD-amd64 on it.
However after several days of usage I found I can only use 2G~3G memory on typical days. The rest are free or intact. This might because I’m still using the config files I tweaked for my old notebook, where I have only 256M memory. I was thinking once to switch back to FreeBSD-i386 to get the Binaries like Google Earth or win32-codecs, or something that couldn’t compile on amd64 like audio/beep or textproc/sdcv.
But I’ve got another idea: I could use the extra RAM to build a RAM disk, and mount it on /tmp. Thus I could take advantage of this much faster /tmp. Of cause all the content on a RAM disk is lost if I do a reboot, but I already have
in my /etc/rc.conf so I got nothing to lose.
And it turns to be easier to setup than I thought. Just add one line
into /etc/fstab and do a reboot. Among other things the “-s” option tells how big I want the RAM disk to be. And I think 512M is good for me. Also a RAM disk won’t take all the 512M memory all the time. This is just the max size of the RAM disk. And when I have only a little files in /tmp, it takes only a little RAM. Check md(4) for all the details.
Tags: freebsd
Post a Comment
You could use <code type="name"> to get your code colorized