Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2002 10:45:55 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        alexus <ml@db.nexgen.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: out of swap space
Message-ID:  <20020126102130.C59495-100000@catalyst.sasknow.net>
In-Reply-To: <003401c1a671$e7801250$faa0b542@noc>

next in thread | previous in thread | raw e-mail | index | archive | help
alexus wrote to freebsd-questions@FreeBSD.ORG:

> hi
>
> is there a way to increase size of swap space?
>
> i have 512mb of ram and 512mb of swap space
>
> i had 256mb of ram before so i created 512mb of swap space now i put
> another 256mb in and i'm still running out of space

Suggestion #1: If you can reduce the memory consumption of your
system, that should be your first task. Make sure you don't have any
processes that are eating/leaking memory. Is it better after a reboot,
and gradually winds down to a crash?


> so i was asking if there is a way to increase size of swap space?
>
> this is live server and i can't afford for it to be down, so place
> no suggestions like partion magic.. this is so windowish:) unless
> thats the only one solution then i might consider..

Suggestion #2: Using your existing drives, you WILL need to mess with
filesystems. If you have any slices which you are NOT using, or are
not using nearly to capacity, you can move all those files to another
filesystem, symlink things appropriately, and use the slice for swap
(swapon(8), disklabel(8)). If the slice is adjacent to an existing
swap partition, use disklabel(8) (or /stand/sysinstall, for the
uninitiated). You'll probably want to do some of this in single-user
mode, but your total downtime shouldn't be that significant.


> and yes i'm going to put more physical memory, but i still would
> like to know if there is a way to increase swap size

Suggestion #3: Add another disk and use it as a new swap device. To do
this with only 45 seconds of downtime, add the entry to /etc/fstab
before you shut down, pop the drive in, and turn the power on. If you
have any hot swap bays, this isn't even an issue. :-)

Suggestion #4: Share the load with another machine.


> thank you in advance

I'm currently building a router/firewall/proxy for a client, using
FreeBSD 3.5 on a 486DX/2-66 that they supplied with 3072K + 640K +
256K = 3968K RAM, and a 180MB HDD. After getting the kernel ~1MB,
disabling almost everything on boot (ps -ax | wc = 9 :-), it is soon
to be serving an entire floor of office machines. So, what is it you
can't do with several orders of magnitude more memory than that? :-)

- Ryan

-- 
  Ryan Thompson <ryan@sasknow.com>
  Network Administrator, Accounts

  SaskNow Technologies - http://www.sasknow.com
  #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2

        Tel: 306-664-3600   Fax: 306-664-1161   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020126102130.C59495-100000>