Re: Installing with no swap partition
Question 1: In the Debian manual it says a swap partition isn't needed but recommended for efficiency. Anyone else installed without swap and had success? Is my installation a ticking time bomb if I don't have a swap partition? Recommended for efficiency clearly means your installation is not a time bomb, but may simply be less efficient than it could be. If you have a lot of RAM space, it probably won't make a difference. On a 128MB machine, it makes a significant difference. The reason why it's inefficient is that you may have a lot of data in tmpfs (or in some process) which is not actively used: if you have swap, this data can be moved to disk to free up RAM for more disk buffer cache. If you don't have swap, the system may end up thrashing madly, constantly having to access the disk to read the next piece of code to run, and then immediately hving to flush it from RAM in order to make room for the next piece of code to run, ... Question 2: I've had recent clean Lenny installations on DBAN'd disks hang at activating swap file upon boot up, where I needed to force shut down the computer. Without the separate swap partition this isn't an issue, so is this the right solution? These are completely fresh installs with no other OS's so I can't imagine the swap partition being corrupt. Don't know what's DBAN, so I can't help you there. this (always have used guided partitioning before), I set one logical partition the size of the entire 14 GB free space - no swap partition, as I couldn't see where to add that in via the partition options during installation. Installation went great, linux runs perfectly fine, with 2 primary partitions within the logical partition. That's fine. You can also use files for swap (I find it to be a better choice than separate partitions, because it's a lot more flexible), so you can add swap without repartitioning/reinstalling. Stefan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: Installing with no swap partition
In 631fe46c0907271347g341e048udf74d5ee643e1...@mail.gmail.com, Mark wrote: A couple of questions (background is below the questions if you want to read): Question 1: In the Debian manual it says a swap partition isn't needed but recommended for efficiency. Anyone else installed without swap and had success? Is my installation a ticking time bomb if I don't have a swap partition? Usually, no. Either the OOM killer will kick in or malloc/calloc/realloc will start failing earlier, so you might want to add swap if either of those happens. You'll get OOM messages in /var/log/messages; applications will either crash or notify you they are out of memory if malloc/calloc/realloc fails. You can use a swap file instead of a swap partition/disk. Just create a file of the appropriate size with dd, use mkfs.swap on it, and add it to your fstab. -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/\_/ signature.asc Description: This is a digitally signed message part.
Re: Installing with no swap partition
Mark: Question 1: In the Debian manual it says a swap partition isn't needed but recommended for efficiency. Anyone else installed without swap and had success? Is my installation a ticking time bomb if I don't have a swap partition? I ran my previous laptop with 768MB of RAM for several months without swap. That never was a problem. But I don't run Gnome, KDE, OpenOffice or any of those applications that require inordinate amounts of RAM on a daily basis -- except for Firefox, of course. ;-) The worst that can happen is that you get an out-of-memory-situation more easily. Then, the kernel's OOM killer will kick in and kill a process of choice (usually the biggest memory hog). This means data loss if the application had important information in memory that haven't been saved to disk yet. Question 2: I've had recent clean Lenny installations on DBAN'd disks hang at activating swap file upon boot up, where I needed to force shut down the computer. Without the separate swap partition this isn't an issue, so is this the right solution? These are completely fresh installs with no other OS's so I can't imagine the swap partition being corrupt. Even if it is, this shouldn't happen. But you would need to provide more information for us to analyze the situation. To answer the question whether going without swap is the right solution: I wouldn't call it a solution, instead you chose to evade the problem. (Which, of course, is fine.) Whether it is a wise decision depends on the amount of RAM in your system and how you use it. For a regular desktop (Gnome, KDE etc.) I would recommend at least 1GB RAM when you want to go without swap. I am running a more or less slim system with awesome as window manager, Firefox, xfce4-terminals and a few Gnome daemons, but 'free' still shows a memory usage of almost 700MB (w/o filesystem cache). I am currently playing with the thought to get rid of swap, too. No matter how hard I try, I cannot find a use for my 4GB of RAM. ;-) The only thing that keeps me from doing that is that I might decide that I should look at suspens-to-disk some time in the future (this is a laptop). Thanks for any input. This was actually for a Ubuntu install side-by-side with xp, I hope this doesn't break any mailing list rules so I apologize if it is considered off-topic. Some people get annoyed when Ubuntu users ask Ubuntu-specific questions. Some people get annoyed when Debian users ask general linux questions which aren't strictly Debian-specific. I belong to neither of them, as long as it's somehow applicable to Debian. J. -- I often play sports / do exercise. [Agree] [Disagree] http://www.slowlydownward.com/NODATA/data_enter2.html signature.asc Description: Digital signature
Re: Installing with no swap partition
I like this idea of using a swap file instead of partition (for both my Debian and Ubuntu machines). Is the following code correct for creating the swap file (assuming 1 GB swap file size)? # dd if=/dev/zero of=/swapfile bs=1024 count=65536 And would the correct use of mkswap be: # mkswap /swapfile Then add this to /etc/fstab: # /swapfile swapswapdefaults0 0 Thanks, Mark On Mon, Jul 27, 2009 at 2:09 PM, Boyd Stephen Smith Jr. b...@iguanasuicide.net wrote: In 631fe46c0907271347g341e048udf74d5ee643e1...@mail.gmail.com, Mark wrote: A couple of questions (background is below the questions if you want to read): Question 1: In the Debian manual it says a swap partition isn't needed but recommended for efficiency. Anyone else installed without swap and had success? Is my installation a ticking time bomb if I don't have a swap partition? Usually, no. Either the OOM killer will kick in or malloc/calloc/realloc will start failing earlier, so you might want to add swap if either of those happens. You'll get OOM messages in /var/log/messages; applications will either crash or notify you they are out of memory if malloc/calloc/realloc fails. You can use a swap file instead of a swap partition/disk. Just create a file of the appropriate size with dd, use mkfs.swap on it, and add it to your fstab. -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/\_/
Re: Installing with no swap partition
In 631fe46c0907271429n387f32bp42606b1755eae...@mail.gmail.com, Mark wrote: I like this idea of using a swap file instead of partition (for both my Debian and Ubuntu machines). Is the following code correct for creating the swap file (assuming 1 GB swap file size)? # dd if=/dev/zero of=/swapfile bs=1024 count=65536 1024 x 65536 = 1Ki x 64Ki = 64Mi. So, that would make a 64M swap file. I'd use: dd if=/dev/zero of=/swapfile bs=$((1 12)) count=$((1 18)) (1 12) x (1 18) = (1 30) = 1GiB. [1] And would the correct use of mkswap be: # mkswap /swapfile You can specify a label if you like. Otherwise, good. Then add this to /etc/fstab: # /swapfile swapswapdefaults 0 0 Looks good. -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/\_/ [1] (x y) means x*(2^y). So, (1 10) = 1Ki; (1 20) = 1Mi; (1 30) = 1Gi. signature.asc Description: This is a digitally signed message part.
[SOLVED] Re: Installing with no swap partition
Thanks for the help! Mark On Mon, Jul 27, 2009 at 2:46 PM, Boyd Stephen Smith Jr. b...@iguanasuicide.net wrote: In 631fe46c0907271429n387f32bp42606b1755eae...@mail.gmail.com, Mark wrote: I like this idea of using a swap file instead of partition (for both my Debian and Ubuntu machines). Is the following code correct for creating the swap file (assuming 1 GB swap file size)? # dd if=/dev/zero of=/swapfile bs=1024 count=65536 1024 x 65536 = 1Ki x 64Ki = 64Mi. So, that would make a 64M swap file. I'd use: dd if=/dev/zero of=/swapfile bs=$((1 12)) count=$((1 18)) (1 12) x (1 18) = (1 30) = 1GiB. [1] And would the correct use of mkswap be: # mkswap /swapfile You can specify a label if you like. Otherwise, good. Then add this to /etc/fstab: # /swapfile swapswapdefaults 0 0 Looks good. -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/\_/ [1] (x y) means x*(2^y). So, (1 10) = 1Ki; (1 20) = 1Mi; (1 30) = 1Gi.