Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Larger swap needed

Status
Not open for further replies.

grega

Programmer
Feb 2, 2000
932
GB
More theoretical than practical - I have a m/c running Solaris 8 with 1Gb memory and a single 36Gb disk, partitioned as follows:
Code:
Total disk cylinders available: 24620 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm     363 -  4718        6.00GB    (4356/0/0)  12584484
  1       swap    wu       0 -   362      512.06MB    (363/0/0)    1048707
  2     backup    wm       0 - 24619       33.92GB    (24620/0/0) 71127180
  3       home    wm    4719 - 24618       27.41GB    (19900/0/0) 57491100
  4 unassigned    wm       0                0         (0/0/0)            0
  5 unassigned    wm       0                0         (0/0/0)            0
  6 unassigned    wm       0                0         (0/0/0)            0
  7 unassigned    wm   24619 - 24619        1.41MB    (1/0/0)         2889
How do I get more swap space? Can I "take" space from the "home" partition?

Without reformatting, is my only option to create an additional swap file in either root or home and add it to the swap space?

Ideally, whoever built the m/c should have partitioned the swap slice to 2-3Gb initially ... aaaaaaaghhhhh

Any thought appreciated.

Greg.
 
Are you having a problem with lack of swap space? The rule of thumb about swap being 2 x memory does not really apply to todays large memory systems. If your system is running it's normal load and there is still space shown by swap -s you may not need to increase it. If you are running memory hungry applications or memory resident databases, then you may need to increase it. As you suggested you can add space at will in another filesystem and use it when needed - this is not very efficient since it is using normal file I/O. Your only other alternative is to repartition.

Depending on how much space is used in your root partition you may be able to temporarily copy your home partition into it and then repartition. Increase slice 1 and decrease slice 3. You should also consider creating a separate /var partition (500Mb+) at the same time, since you may get problems later with runaway log files and suchlike filling up root.
 
No problems to report yet. A colleague is installing Oracle 9i Application Server and it's complaining about lack of swap. I know nothing about Oracle so whether the lack of swap is an actual problem or not is anybodys guess.

Agree about the efficiency aspect of file swap space. If I had partitioned the disk myself I would have done it differently :). If my colleague wants me to I will have a go at re-partitioning.

Thanks,

Greg.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top