Find the answer to your Linux question:
Results 1 to 9 of 9
Hi all, We have problem with swap space. RAM-2GB and Swap apce is 1GB. Their is no free spce available to increase the free space. Because of that server hang ...
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Location
    Riyadh Saudi-Arabia
    Posts
    32

    Post Swap Space

    Hi all,
    We have problem with swap space. RAM-2GB and Swap apce is 1GB.
    Their is no free spce available to increase the free space. Because of that server hang several time.
    Please any one have solution for this critical situation or any other sript for avoid the hang server.

    Thank you.

  2. #2
    Just Joined!
    Join Date
    Oct 2007
    Posts
    37
    Install more ram? Or install a second drive and use some of it for swap? I'd just go with more ram if it was me and avoid swap.

  3. #3
    Linux Newbie bunty82's Avatar
    Join Date
    Sep 2007
    Location
    Asia
    Posts
    130
    well
    i think
    swap space should be double of ur Ram
    so its better to install a new hard drive or create more space
    System Configuration
    OS#Windows Xp pro Sp2
    Intel Core 2 Duo 2.2ghz
    Intel motherboard DG965ry
    Nvidia graphic card 512mb
    2 gb ram
    250gb Sata segate HDD
    160gb sata segate hdd
    D link ethernetcard
    Lg dvd writer
    Lg cd writer

  4. #4
    Linux Engineer valemon's Avatar
    Join Date
    Oct 2006
    Location
    Volos
    Posts
    934
    Well, swap size should be double of ram. But with 2 gigs of ram your swap can be as less as 256mb. Buying a second hard disk should be a good idea though.
    Linux is like a Teepee, No Windows, No Gates, Only Apache Inside!
    Arch Linux
    Linux user #442041

  5. #5
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Quote Originally Posted by valemon View Post
    Well, swap size should be double of ram. But with 2 gigs of ram your swap can be as less as 256mb. Buying a second hard disk should be a good idea though.
    SWAP should not be double the size of your RAM unless you have a very, very small amount of RAM (less than 256MB total I'd say). Since your system only uses SWAP space when it runs out of physical memory, increasing your swap really only wastes harddrive space on a modern machine with a healthy amount of RAM.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  6. #6
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    I don't know if the hang is due to the lack of swap space, but I'm willing to take your word for it.

    How your box is used may affect how much swap to allocate. Below is what RedHat recommends for RHEL 4. It's not double the RAM for all amounts of RAM, but it starts out there, and it's not small. (I had earlier this year installed RHEL on a number of SunFires, and I followed RedHat's recommendations. We have not had any problems related to swap as far as I can tell.)

    Disk space is really inexpensive, especially when compared to the time and trouble it takes to untangle your system. If it isn't needed, then you might never use a few GB, but that's not a high price to pay for peace of mind.

    The LVM in most systems allows you to do some dynamic re-sizing -- perhaps something to keep in mind for your next install.

    On one of my desktop systems, I have 1 GB of memory, but I almost always have some swap space being used -- currently it's at 160+ MB. I do have 6 virtual desktops running on that box.

    Best wishes ... cheers, drl

    The size of your swap should be equal to twice your computer's
    physical RAM for up to 2 GB of physical RAM. For physical RAM
    above 2 GB, the size of your swap should be equal to the amount
    of physical RAM above 2 GB. The size of your swap should never
    be less than 32 MB.

    Using this basic formula, a system with 2 GB of physical RAM
    would have 4 GB of swap, while one with 3 GB of physical RAM
    would have 5 GB of swap.

    https://www.redhat.com/docs/manuals/...wap_Space.html
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  7. #7
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,095
    Quote Originally Posted by drl View Post
    On one of my desktop systems, I have 1 GB of memory, but I almost always have some swap space being used -- currently it's at 160+ MB. I do have 6 virtual desktops running on that box.
    The subject of SWAP partitions and the correct size for individual users is really interesting, because it's just the opposite of your situation for me. I have 1 GB of RAM and a 512 MB SWAP partition that never gets touched by the system. However, I rarely use more than two desktops at any one time, and I don't run lots of memory intensive apps at any one time.

    I'm thinking that actual need might all boil down to the individual user, and their intended usage of any particular machine.

    That said, I do still create the SWAP partition just in case it should be needed for anything I do out of the ordinary.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  8. #8
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    You don't necessarily need a new hard drive or free partition in order to add more swap space. As long as you have free space in your current partitions, you can create a swap file. More info is available here.

  9. #9
    Just Joined!
    Join Date
    Jun 2007
    Location
    Riyadh Saudi-Arabia
    Posts
    32

    thank you

    Thank you!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...