Does LMDE need a swap partition?

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read this

Does LMDE need a swap partition?

Postby rdonnelly on Tue Mar 29, 2011 6:16 pm

Lately my system has been acting weird on resume. It does not do it every time, but when it does the system is very sluggish, and the HD is running constantly. I checked the system monitor showing all processes including root, and nothing is showing high CPU or Memory usage, so it is all in the HD. What would be a good way to isolate this?

Another thing is, my root partition is 9.6 GB, 6.0 GB is being used, could it be getting too tight to properly resume? Does suspend write any info to the root partition?

I also have no swap partition on this machine.
The OS: Linux Mint Debian 64 KDE Plasma 4.10.5
The Hardware: Dell 17R Special Edition, Intel Quad Core, i7 - 3.40 GHz, 8 GB Ram, HD 1TB
Video NVIDIA GeForce GT 650M 2GB
The Name: Bob
User avatar
rdonnelly
Level 4
Level 4
 
Posts: 409
Joined: Thu Nov 27, 2008 9:38 pm

Linux Mint is funded by ads and donations.
 

Re: Does LMDE need a swap partition?

Postby richyrich on Tue Mar 29, 2011 8:32 pm

If you do not have any swap partition at all, then I recommend that you turn off the swappiness parameter in the kernel.
Swappiness is a value between 0 and 100 which controls the priority of your system using ram vs. swap. A swappiness value of 0 means avoid swap as much as possible and only use ram.
My Mint 9's default was 60 ! which is way too high !, and since I always have a swap partition, I set mine to 10, what a performance improvement !
To check the settings on your machine, use this terminal command :
Code: Select all
cat /proc/sys/vm/swappiness


Now, a little bit of editing from that open terminal :
Code: Select all
sudo nano /etc/sysctl.conf


Add this line, exit, and then reboot :
Code: Select all
vm.swappiness=0


richy
User avatar
richyrich
Level 13
Level 13
 
Posts: 4635
Joined: Mon May 04, 2009 8:31 pm

Re: Does LMDE need a swap partition?

Postby dawgdoc on Tue Mar 29, 2011 10:54 pm

Richyrich, I am asking questions to learn, not to start an argument. Would the swappiness settings apply to resuming from suspend? I understand how it works with a computer with a low or large amount of ram. (I think.)

It seems that rdonnelly was referring to Suspend To Ram (suspend/sleep) as opposed to Suspend To Disk (hibernate). Because I would think it would be impossible to Suspend To Disk or to resume from it without either a swap partition or a swap file, known as a page file in windows. By definition, it sounds like a swap partition is not needed for Suspend to Ram, is my assumption correct? Is it possible to have a situation where there is insufficient Ram to recover from suspend? I am sure this would depend on the processes and programs running when the computer is suspended.

In answer to the title of the thread, I have seen posts where others run Mint w/o a swap partition. It is possible to create a swap file without repartitioning, see this post by DrHu and the one following it.
Image

SYSTEM: Compaq Presario CQ62 Dual-Boot: Mint 13 Gnome x32 PAE, LMDE
READING: The Autobiography of Benvenuto Cellini
User avatar
dawgdoc
Level 9
Level 9
 
Posts: 2690
Joined: Mon Oct 05, 2009 12:53 am
Location: Kentucky, USA the land of Mint Juleps

Re: Does LMDE need a swap partition?

Postby asymmetros on Wed Mar 30, 2011 3:32 pm

@ richy:

just a question to help me understand: a swappiness value=0, you said that means "avoid swap as much as possible". But if i have the swap line commented into fstab file, that thing doesnt produce the very same result?
After all, catfish command returns 0 as a result.
Secondly, i rarely use as much more than 500 Mb's ram. If i activate the swap partition (and set swapiness=10), this will helps in any way? (i do not care for hibernation, or suspend)
Sid Mint Xfce -32, Openbox, KDE, Enlightenment, Liquorix Kernel
HP Compaq Presario cq71, Intel Core 2 Duo T4400 @ 2.2 GHz, 3 GB DDR2 RAM, Nvidia Geforce G 103M
asymmetros
Level 4
Level 4
 
Posts: 310
Joined: Tue Jun 01, 2010 5:34 pm
Location: athens


Re: Does LMDE need a swap partition?

Postby richyrich on Wed Mar 30, 2011 4:52 pm

edit:
My reasoning; the OP has no swap partition, thus there is no need for the kernel to attempt writing swap on the hd to free up ram memory. On my old IBM A31p laptop with Mint 9 Xfce and 1 gig of ram, I rarely have more than 2 or 3 apps running at the same time. I don't need to use/write to the hd swap to free up ram . . . If ram is needed for whatever reason (my swappiness of 10), it will write to swap as it should. My sleep/hibernate uses my swap partition just as it does with the default 60 setting. It just isn't trying to free up ram to the hard drive all the time. On my desktop where I often am multitasking, my swappiness is set to 50.
richy
User avatar
richyrich
Level 13
Level 13
 
Posts: 4635
Joined: Mon May 04, 2009 8:31 pm

Re: Does LMDE need a swap partition?

Postby dawgdoc on Wed Mar 30, 2011 6:06 pm

You did not say what type of laptop you are using, so some of this may be of use.

Code: Select all
important bugs of pm-utils (1.4.1-6 -> ) <unfixed>
 #567253 - [pm-utils] screens stay black after resume from pm-suspend on Compal FL90 (GeForce 8600M GT) from tty or X/nv. kernel
 #580080 - acpi-support: suspend to ram results in black screen and need full restart to restore machine
 #607317 - pm-utils: Lenovo T140 fails to resume after toram or todisk
 #491202 - linux-image-2.6.25-2-686: Dell Latitude D610 laptop doesn't resume with 2.6.25
 #561877 - pm-utils: Resume from suspend stopped working on Sony Vaio laptop
 #574054 - pm-utils: Resume from suspend not working on Sony Vaio VGN-NW21SF
 #529378 - pm-utils: Lenovo T61 fails to suspend
 #574814 - pm-utils: system does not switch back to X11 after resume

I found this using apt-listbugs list pm-utils -s all, but you will need to install the apt-listbugs package to have this terminal command available
Image

SYSTEM: Compaq Presario CQ62 Dual-Boot: Mint 13 Gnome x32 PAE, LMDE
READING: The Autobiography of Benvenuto Cellini
User avatar
dawgdoc
Level 9
Level 9
 
Posts: 2690
Joined: Mon Oct 05, 2009 12:53 am
Location: Kentucky, USA the land of Mint Juleps

Re: Does LMDE need a swap partition?

Postby rdonnelly on Wed Mar 30, 2011 6:07 pm

Thanks, I will try and change the swap to zero like you suggested. Being my PC only does the excessive HD activity and lag on a few occasions and most of the time it don't I assume I do not need a swap file for suspend. It seems like it does it most when I am running a Vbox with windoze 7. When I have that running I am using about 2 of my 4 GB or ram according to system resources. When I pause the Vbox, it seems to be less of a problem. I have had the problem just from a suspend occurring with only Firefox and Thunderbird running?
The OS: Linux Mint Debian 64 KDE Plasma 4.10.5
The Hardware: Dell 17R Special Edition, Intel Quad Core, i7 - 3.40 GHz, 8 GB Ram, HD 1TB
Video NVIDIA GeForce GT 650M 2GB
The Name: Bob
User avatar
rdonnelly
Level 4
Level 4
 
Posts: 409
Joined: Thu Nov 27, 2008 9:38 pm

Re: Does LMDE need a swap partition?

Postby rdonnelly on Wed Mar 30, 2011 8:32 pm

dawgdoc wrote:You did not say what type of laptop you are using, so some of this may be of use.

Code: Select all
important bugs of pm-utils (1.4.1-6 -> ) <unfixed>
 #567253 - [pm-utils] screens stay black after resume from pm-suspend on Compal FL90 (GeForce 8600M GT) from tty or X/nv. kernel
 #580080 - acpi-support: suspend to ram results in black screen and need full restart to restore machine
 #607317 - pm-utils: Lenovo T140 fails to resume after toram or todisk
 #491202 - linux-image-2.6.25-2-686: Dell Latitude D610 laptop doesn't resume with 2.6.25
 #561877 - pm-utils: Resume from suspend stopped working on Sony Vaio laptop
 #574054 - pm-utils: Resume from suspend not working on Sony Vaio VGN-NW21SF
 #529378 - pm-utils: Lenovo T61 fails to suspend
 #574814 - pm-utils: system does not switch back to X11 after resume

I found this using apt-listbugs list pm-utils -s all, but you will need to install the apt-listbugs package to have this terminal command available


I am using a Lenovo A700 all in one desktop, many of the components are made from notebook parts to keep the machine slim. It could have the T140 or T61 MB in it? I have ATI graphics. I do not need to reboot if it happens, a simple ctrl + alt + backspace logs me out, and the problem goes away.
The OS: Linux Mint Debian 64 KDE Plasma 4.10.5
The Hardware: Dell 17R Special Edition, Intel Quad Core, i7 - 3.40 GHz, 8 GB Ram, HD 1TB
Video NVIDIA GeForce GT 650M 2GB
The Name: Bob
User avatar
rdonnelly
Level 4
Level 4
 
Posts: 409
Joined: Thu Nov 27, 2008 9:38 pm

Re: Does LMDE need a swap partition?

Postby dawgdoc on Wed Mar 30, 2011 10:48 pm

rdonnelly wrote:Another thing is, my root partition is 9.6 GB, 6.0 GB is being used, could it be getting too tight to properly resume? Does suspend write any info to the root partition?

I don't guess either of us answered the questions you asked. No, your root partition is not to tight for resume purposes because Suspend (to ram) does not write to the hard drive and Hibernate (Suspend to Disk), which you do not seem to be using, is not going to work unless you had either a /swap partition or a swap file. It does not write to the / root partition. If you think the root partition is filling up for unknown reasons, check to see that you are getting excessive log files. They are in /var/log/

Thanks RichyRich for the two links. It would seem that swappiness does not address Suspend issues only swapping pages when actively using the system.

@ rdonnelly It almost sounds like you may have 2 issues. One is the Resume from Suspend and the second is the hard drive activity issue. If you were strictly in a Linux environment, Richyrich's swappiness solution should help. Since you are seeing it most when using Win7 in a VM, I do not know if swappiness will help. VMs were not addressed in the two pages linked to above. I do not know how VMs address memory. Concerns would be total RAM (4Gb), RAM assigned to the VM, the Linux swappiness, and how the Win7 VM addresses its pagefile. Is the 2Gb or 4Gb you reported the total with VM in use or is it the amount assigned to the VM? I am throwing out thoughts to consider, I can not check into it as I have not started using VMs.
Image

SYSTEM: Compaq Presario CQ62 Dual-Boot: Mint 13 Gnome x32 PAE, LMDE
READING: The Autobiography of Benvenuto Cellini
User avatar
dawgdoc
Level 9
Level 9
 
Posts: 2690
Joined: Mon Oct 05, 2009 12:53 am
Location: Kentucky, USA the land of Mint Juleps

Re: Does LMDE need a swap partition?

Postby rdonnelly on Sun Apr 03, 2011 10:38 am

I see an upadate the acpi-support-base today, it also says installing acpi-support it will help with the functions of laptops. Being my All in one is a hybrid of laptop and PC parts, I installed it. Hopefully this will fix the problem LMDE users are having with resume?
The OS: Linux Mint Debian 64 KDE Plasma 4.10.5
The Hardware: Dell 17R Special Edition, Intel Quad Core, i7 - 3.40 GHz, 8 GB Ram, HD 1TB
Video NVIDIA GeForce GT 650M 2GB
The Name: Bob
User avatar
rdonnelly
Level 4
Level 4
 
Posts: 409
Joined: Thu Nov 27, 2008 9:38 pm

Re: Does LMDE need a swap partition?

Postby rdonnelly on Wed Apr 13, 2011 12:32 pm

I have noticed this resume has become more frequent with updates. Also one time I saw a dialog about a script problem come up after I hit CTRL+ALT+BACKSPACE of course it was too late to read it by then.
The OS: Linux Mint Debian 64 KDE Plasma 4.10.5
The Hardware: Dell 17R Special Edition, Intel Quad Core, i7 - 3.40 GHz, 8 GB Ram, HD 1TB
Video NVIDIA GeForce GT 650M 2GB
The Name: Bob
User avatar
rdonnelly
Level 4
Level 4
 
Posts: 409
Joined: Thu Nov 27, 2008 9:38 pm

Re: Does LMDE need a swap partition?

Postby dawgdoc on Wed Apr 13, 2011 6:20 pm

Check the LMDE Breakage thread re: the init scripts issue. I seem to recall something about a package named insserv having a bug causing the system to 'barf' with some scripts.

Having looked at your original post again, another thought occurred to me re: your root partition filling up. Every time you update a package, its deb file is placed in /var/cache/apt/archives. The old deb files are not deleted by default. You could run either the more conservative
Code: Select all
sudo apt-get autoclean

or
Code: Select all
sudo apt-get clean

check man apt-get for the exact differences.
Image

SYSTEM: Compaq Presario CQ62 Dual-Boot: Mint 13 Gnome x32 PAE, LMDE
READING: The Autobiography of Benvenuto Cellini
User avatar
dawgdoc
Level 9
Level 9
 
Posts: 2690
Joined: Mon Oct 05, 2009 12:53 am
Location: Kentucky, USA the land of Mint Juleps

Re: Does LMDE need a swap partition?

Postby rdonnelly on Wed Apr 13, 2011 7:31 pm

dawgdoc wrote:Check the LMDE Breakage thread re: the init scripts issue. I seem to recall something about a package named insserv having a bug causing the system to 'barf' with some scripts.

Having looked at your original post again, another thought occurred to me re: your root partition filling up. Every time you update a package, its deb file is placed in /var/cache/apt/archives. The old deb files are not deleted by default. You could run either the more conservative
Code: Select all
sudo apt-get autoclean

or
Code: Select all
sudo apt-get clean

check man apt-get for the exact differences.


Thanks dawgdoc, I gave it a try and it deleted alot of files, it freed up about 1.2GB on my / partition. Now 4.8GB used, and 4.3GB free. I will see how it suspends now. After a reboot. I also removed the insserv package. I was lucky to catch a glimpse of that complaint about a script not be able to run, hopefully this will help. I notice the update manager is not only updating, but adding new packages all the time as well?
The OS: Linux Mint Debian 64 KDE Plasma 4.10.5
The Hardware: Dell 17R Special Edition, Intel Quad Core, i7 - 3.40 GHz, 8 GB Ram, HD 1TB
Video NVIDIA GeForce GT 650M 2GB
The Name: Bob
User avatar
rdonnelly
Level 4
Level 4
 
Posts: 409
Joined: Thu Nov 27, 2008 9:38 pm

Re: Does LMDE need a swap partition?

Postby rdonnelly on Wed Apr 13, 2011 9:21 pm

Well removing insserv was a mistake, lucky I had a 10 day old clone of my / partition. I could not get it insserv to install from command line. That Clonezilla is a life saver, only two minutes to restore the partition image :lol:

So do I have to live with insserv even if it causes problems, or was it all the extra files in / causing my problem?
The OS: Linux Mint Debian 64 KDE Plasma 4.10.5
The Hardware: Dell 17R Special Edition, Intel Quad Core, i7 - 3.40 GHz, 8 GB Ram, HD 1TB
Video NVIDIA GeForce GT 650M 2GB
The Name: Bob
User avatar
rdonnelly
Level 4
Level 4
 
Posts: 409
Joined: Thu Nov 27, 2008 9:38 pm

Re: Does LMDE need a swap partition?

Postby dawgdoc on Thu Apr 14, 2011 7:59 pm

rdonnelly wrote:So do I have to live with insserv even if it causes problems, or was it all the extra files in / causing my problem?

I guess after restoring you cleaned up with apt-get autoclean. Is the resume problem fixed after loading your restore image?
Does the restored image have the newest insserv package or the one from prior to the package being upgraded?

Trial and error may be what tells you the source of the problem.
Restore. Autoclean. Test system. Update system. Test system.
If a full update starts causing the problem again, then update related groups of packages while testing the system between groups of updates.
Image

SYSTEM: Compaq Presario CQ62 Dual-Boot: Mint 13 Gnome x32 PAE, LMDE
READING: The Autobiography of Benvenuto Cellini
User avatar
dawgdoc
Level 9
Level 9
 
Posts: 2690
Joined: Mon Oct 05, 2009 12:53 am
Location: Kentucky, USA the land of Mint Juleps

Re: Does LMDE need a swap partition?

Postby rdonnelly on Thu Apr 14, 2011 9:25 pm

My system is at the same level it was on 4/3/11, and the fortunes and screen savers work. I will not update it for a while if it is working well. I have not had enough suspend resume cycles to know if the old package files were causing the problem, but I will let you know in a day or two. My innserv is version 1.14.0-2.1 installed 3/26. I tried the kernel upgrade 2.6.38-2 and it screwed up my whole system. I back at 2.6.32-5
The OS: Linux Mint Debian 64 KDE Plasma 4.10.5
The Hardware: Dell 17R Special Edition, Intel Quad Core, i7 - 3.40 GHz, 8 GB Ram, HD 1TB
Video NVIDIA GeForce GT 650M 2GB
The Name: Bob
User avatar
rdonnelly
Level 4
Level 4
 
Posts: 409
Joined: Thu Nov 27, 2008 9:38 pm

Re: Does LMDE need a swap partition?

Postby rdonnelly on Sat Apr 16, 2011 8:22 am

dawgdoc wrote:Does the restored image have the newest insserv package or the one from prior to the package being upgraded?


Problem still persists on resume, I think it has always been a problem on my hardware ever since I installed LMDE as I remember? I have some older clones, might give one of them a try?
The OS: Linux Mint Debian 64 KDE Plasma 4.10.5
The Hardware: Dell 17R Special Edition, Intel Quad Core, i7 - 3.40 GHz, 8 GB Ram, HD 1TB
Video NVIDIA GeForce GT 650M 2GB
The Name: Bob
User avatar
rdonnelly
Level 4
Level 4
 
Posts: 409
Joined: Thu Nov 27, 2008 9:38 pm

Re: Does LMDE need a swap partition?

Postby ivan_rookie on Tue May 17, 2011 9:59 am

richyrich wrote:If you do not have any swap partition at all, then I recommend that you turn off the swappiness parameter in the kernel.
Swappiness is a value between 0 and 100 which controls the priority of your system using ram vs. swap. A swappiness value of 0 means avoid swap as much as possible and only use ram.
My Mint 9's default was 60 ! which is way too high !, and since I always have a swap partition, I set mine to 10, what a performance improvement !
To check the settings on your machine, use this terminal command :
Code: Select all
cat /proc/sys/vm/swappiness


Now, a little bit of editing from that open terminal :
Code: Select all
sudo nano /etc/sysctl.conf


Add this line, exit, and then reboot :
Code: Select all
vm.swappiness=0


richy

Thanks, man. I never had swap, but after I (just in case) set my swappiness to 0 I think I started to feel a bit of a difference in performance and responsiveness (Mint 10 Gnome). Is this possible?
"Running Windows on a Core i7 is like having a brand new Porsche,
but only be able to drive backwards with the handbrake on."
User avatar
ivan_rookie
Level 2
Level 2
 
Posts: 92
Joined: Wed Dec 08, 2010 2:51 pm
Location: Berlin

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 3 guests