How to choose the size of swap?

Jeremy Chadwick freebsd at jdc.parodius.com
Mon Dec 6 21:42:26 UTC 2010


On Sun, Dec 05, 2010 at 07:53:04PM +0100, Ronald Klop wrote:
> On Sun, 05 Dec 2010 19:20:41 +0100, Vladislav V. Prodan
> <universite at ukr.net> wrote:
> 
> >We have several servers with 8|16 GB of memory, 2|4 harddrive
> >(RAID1|RAID10 using ZFS)
> >These servers will work with Mysql, the size of databases that are
> >several times larger than the size of memory.
> >
> >What would recommend to expose the size of swap?
> >On a separate partition or a file?
> >At hand is not loaded with servers that have the swap was over 20 MB ...
> >In an extreme case, let the output "top v" to this maillist
> 
> You might not need swap to run the database. But the swap space is
> also used for making a kernel dump in case of a problem. In that
> case swap space must be as large as the amount of memory in the
> machine. (As far as I know.)

And don't forget that (by default) you'll need a /var filesystem that
has enough physical room to hold the dump.  You can change this using
the "dumpdir" option in rc.conf(5) if your existing /var isn't large
enough.  Just make sure to copy /var/crash to /wherever, and make sure
the file/dir permissions are correct + minfree file exists.

-- 
| Jeremy Chadwick                                   jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |



More information about the freebsd-fs mailing list