Results 1 to 5 of 5

Thread: Swap size of default LVM install of 9.10?

  1. #1
    Join Date
    Sep 2005
    Location
    Davis, CA
    Beans
    266
    Distro
    Ubuntu 9.10 Karmic Koala

    Swap size of default LVM install of 9.10?

    I just installed 9.10 server on my HTPC and have done a good amount of configuration (setup mythtv, boxee, codecs, nfs share, webserver, etc). I have noticed a few times while watching HDTV through mythtv, the frontend would lock up and freeze my whole X env. I have to do a CTRL+ALT+BACKSPACE to regain control of my system. This has happened about 4 times so far, and it just happened again in Boxee.

    I'm thinking it's because my swap isn't big enough. I was wondering what the default size of the swap is for 9.10. My previous 9.04 install I custom partitioned with 3 gigs of swap and I never ran into this problem.

    Thanks for the help,
    -Hans

  2. #2
    Join Date
    Aug 2007
    Location
    Off the Alaskan Coast
    Beans
    794
    Distro
    Ubuntu Development Release

    Re: Swap size of default LVM install of 9.10?

    Good question, the wiki only says this:
    "The default partitioning recipe in the installer will in some cases allocate a swap partition that is smaller than the physical memory in the system. This will prevent the use of hibernation (suspend-to-disk) because the system image will not fit in the swap partition. If you intend to use hibernation with your system, you should ensure that the swap partition's size is at least as large as the system's physical RAM."

    So maybe it's based on free disk size and not RAM....Not sure though..

    Do a fdisk -l and see what your swap size is and go from there..Prolly double the RAM is good for a HTPC if you have =>2GB
    FIC K8-800T AMD64 3200+ 2GB PC3200 GeForce 6800GT Mandriva 2010 KDE+Compiz+Emerald
    MSI K9N2GM AMD 9950BE 4GB DDR2-800 GeForce 8200 10.10 WUSB600N
    Acer 6920 Core 2 Duo 4GB GeForce 9500GS 10.04 Ubuntu User #17586

  3. #3
    Join Date
    Sep 2005
    Location
    Davis, CA
    Beans
    266
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Swap size of default LVM install of 9.10?

    Yea, I have 2gbs in my system and I heard 1.5-2.5 times the ram size is good for HTPCs.

    Code:
    hansoffate@grunt:~$ fdisk
    
    Usage: fdisk [-l] [-b SSZ] [-u] device
    E.g.: fdisk /dev/hda  (for the first IDE disk)
      or: fdisk /dev/sdc  (for the third SCSI disk)
      or: fdisk /dev/eda  (for the first PS/2 ESDI drive)
      or: fdisk /dev/rd/c0d0  or: fdisk /dev/ida/c0d0  (for RAID devices)
      ...
    hansoffate@grunt:~$ fdisk -l
    hansoffate@grunt:~$ fdisk -l

    For some reason fdisk -l doesn't want to report anything back. I usually like setting up the partitioning scheme, but since I've never used LVM and it's the default now, I figured I'd give it a shot. Do you think I could resize my partitions in the LVM to make room for a bigger swap?

    -Hans

  4. #4
    Join Date
    Aug 2007
    Location
    Off the Alaskan Coast
    Beans
    794
    Distro
    Ubuntu Development Release

    Re: Swap size of default LVM install of 9.10?

    Sorry, ya gotta sudo it
    Code:
    sudo fdisk -l
    But come to think of it that will tell you sectors I think, System monitor will give you a nice gui

    And yes you can shrink or grow a partition in a LVM..gonna have to Google that though.
    Last edited by JBAlaska; November 1st, 2009 at 08:01 AM.
    FIC K8-800T AMD64 3200+ 2GB PC3200 GeForce 6800GT Mandriva 2010 KDE+Compiz+Emerald
    MSI K9N2GM AMD 9950BE 4GB DDR2-800 GeForce 8200 10.10 WUSB600N
    Acer 6920 Core 2 Duo 4GB GeForce 9500GS 10.04 Ubuntu User #17586

  5. #5
    Join Date
    Sep 2005
    Location
    Davis, CA
    Beans
    266
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Swap size of default LVM install of 9.10?

    Doh. That should have been obvious.

    Code:
    hansoffate@grunt:~$ cat /proc/swaps
    Filename                                Type            Size    Used    Priority
    /dev/mapper/grunt-swap_1                partition       6037496 53528   -1
    hansoffate@grunt:~$ free -m
                 total       used       free     shared    buffers     cached
    Mem:          2012       1870        142          0         60       1541
    -/+ buffers/cache:        268       1744
    Swap:         5895         52       5843
    It looks like the swap size by default was 6 gigs. This should be the good to run my system, it must be another problem. Time to do more troubleshooting. Thanks again.

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
  •