Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: [SOLVED] What size for swap partition?

  1. #1
    Join Date
    Mar 2008
    Location
    PA
    Beans
    140
    Distro
    Ubuntu Studio 11.04 Natty Narwhal

    [SOLVED] What size for swap partition?

    I only have a 13G HDD for my Ubuntu (8.10). I installed with the defaults from the partitioner. It only gave me 510MB for the swap partition. Could this affect my downloads? Also, is there some kind of cache or temp storage where downloads are temporarily kept while the download is proceeding? I see Firefox has some cache for the size to be specified, but I'm talking about when I do the downloads for updates for Ubuntu. This is FTP and not involving the firefox browser. I ask this because it seems that when I do these downloads it gets so far and then slows down to a crawl. The downloads must have a timer because once they slow down they fail. Also, by that time Firefox browser won't work either any more. I use a TrendNet TEW-424UB (using the RealTek driver). Anyone have any ideas?
    Last edited by two4two; November 14th, 2008 at 04:01 PM. Reason: attach file

  2. #2
    Join Date
    Aug 2007
    Location
    Paris
    Beans
    5,538
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: What size for swap partition?

    The packages that you download via Ubuntu updates ultimately get stored at /var/cache/apt. It's possible that they're copied into memory first and stored there until all downloads complete, but I suspect that that's not the case; they're probably written directly to disk, or cached in memory to a certain point and then written to disk as needed. In other words, they should have nothing to do with swap. Firefox downloads I believe work the same way--they get stored directly on your desktop as the download happens, not cached temporarily anywhere else (Internet Explorer does it differently).

    From the behavior you're describing, it sounds more like your network interface is just crashing. This sometimes happen with certain devices when they're placed under heavy load, as yours would be if you're downloading a large number of updates at high speed for a sustained period of time.

    The next time the crash happens, please immediately open a terminal, run the following commands (in this order) and post the output here:
    Code:
    dmesg | tail
    lshw -C Network
    ifconfig
    ping -c 5 google.com
    ping -c 5 72.14.207.99
    lspci -nn
    lsusb
    That will help to figure out what's really going on when the downloads stop.

  3. #3
    Join Date
    Oct 2007
    Location
    Calgary, Alberta, Canada
    Beans
    202
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: What size for swap partition?

    If you suspect memory shortage problems, monitor swap behaviour to see if the swap device is actually being used. If it's not, then your problems are elsewhere. Use the free command, paying attention to the swap used metric. This value is typically zero. As you add memory load, you may start to see swap begin to be used as you run out of physical memory.

    Code:
    user@box:~$ free -s 1
                 total       used       free     shared    buffers     cached
    Mem:       2062192    1094792     967400          0      62236     638120
    -/+ buffers/cache:     394436    1667756
    Swap:      6040400          0    6040400
    For your specific case though, I suspect memory shortfall is not the problem and pytheas22 is most likely on the right track.
    -PointyWombat

  4. #4
    Join Date
    Apr 2008
    Beans
    11,707

    Re: What size for swap partition?

    It would help to know your full system specs.

    Processor speed:

    Code:
     cat /proc/cpuinfo
    Mem info:

    Code:
     cat /proc/meminfo

  5. #5
    Join Date
    Aug 2007
    Location
    India
    Beans
    161
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: What size for swap partition?

    swap size must be minimum of the size of ur RAM ...
    Requires Windows XP or better'. So I installed LINUX...

  6. #6
    Join Date
    Mar 2008
    Location
    PA
    Beans
    140
    Distro
    Ubuntu Studio 11.04 Natty Narwhal

    Re: What size for swap partition?

    Pointy, I entered the command as I think you wrote it and instead of just one reort back it just kept doing it over and over again and I didn't know how to stop it except for closing the terminal window. I see what you wrote as "free -s 1" (that's 1 as in one). What did I do wrong?

  7. #7
    Join Date
    Feb 2007
    Location
    Liverpool, UK
    Beans
    237
    Distro
    Ubuntu Mate 18.04 Bionic Beaver

    Re: What size for swap partition?

    Quote Originally Posted by two4two
    I see what you wrote as "free -s 1" (that's 1 as in one). What did I do wrong?
    It should be a lower case L, not a 1.

    A mistake I make on a regular basis! If in doubt; copy and paste are your friends
    Last edited by ChildOfMana; October 22nd, 2008 at 07:50 PM.
    Rig: MSI P67A-GD53 (B3), Intel Core i5 2500 @ 3.30Ghz, 8GB Corsair XMS 3 PC3-12800, nVidia GTX 770, Ubuntu 18.04
    Useful Firefox Extensions

  8. #8
    Join Date
    Mar 2008
    Location
    Deep South Texas, SpaceX
    Beans
    1,890
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: What size for swap partition?

    Quote Originally Posted by two4two View Post
    I entered the command as I think you wrote... instead of one reort it kept doing it over and over again and I didn't know how to stop it except for closing the terminal window.
    pressing
    <ctrl>-<alt>-c
    while the memory info is showing will stop the process.

  9. #9
    Join Date
    Mar 2008
    Location
    Deep South Texas, SpaceX
    Beans
    1,890
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: What size for swap partition?

    Quote Originally Posted by sazan View Post
    swap size must be minimum of the size of ur RAM ...
    If you have enough physical ram, no swap is needed.

    Swap comes into play when ram is lacking, or for 'sleep' or 'hibernation'.

  10. #10
    Join Date
    Apr 2008
    Beans
    359
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: What size for swap partition?

    I've heard a range from the size of your RAM to two times your amount of RAM.
    Desktop: AMD Phenom II X3 720 (3.2GHz), GSkill 4GB DDR2 1066 RAM, Sapphire Radeon HD 5870, OCZ Vertex 2 SSD (60GB), 750GB + 640GB WD Caviar Black; Windows 7 Pro / Ubuntu 9.04

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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