LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 05-02-2004, 01:31 PM   #1
debian_dummy
Member
 
Registered: Apr 2004
Distribution: Debian SID and Woody
Posts: 77

Rep: Reputation: 15
Swappiness of kernel


I read this at Slahdot http://slashdot.org/article.pl?sid=04/04/30/1238250 and it refers to a thread at http://kerneltrap.org/node/view/3000 about adjusting the value of swapping stuff out of RAM and into the swap file

1) The thread sort of confused me - I'm not that technical
2) Is this why my dekstop seems sluggish ?

I have a 2.4ghz laptop with a1gb of RAM using Debian SID with a 'standard" 2.4.22 and 2.4.25 kernel with Gnome and KDE desktops. No flames please but my Windows XP is a far more responsive desktop experience than Debian. It feels like it's quicker and more responsive than Debian and Fedora Core 1 (eg: minimising , maximising, opening apps)

Is this because of the swappiness thing they are discussing ?

Should I just kill the swap file/partiton ?

And if I do away with the swap partition, what happens when an application expects a swap file ? crash city ?

Andrew Morton does now what he's taking about (he wrote the low latency patches - are they in my kernel ?) but his point of view/explanation seems contradictory. Move the app out of RAM and back to the super slow hard disk.

With 1gb of memory, I don't think I should need to do that. I should have buckets of free memory. At this very moment, under XP I opened the task manager and see all my applications, under the Processes tab, using a total of 250mb or so of memory . However, under the Performance tab, my physical memory says 1gb total, 556mb available and 666mb system cache and that's more than 1gb. Total kernel memory 160mb, paged (swap ?) 123mb and non paged 37mb.

Sorry for the long post but as I said in Point 1) I'm confused

Some directions and a few tips to getting my Debian dekstop revved up would be most appreciated.

Last edited by debian_dummy; 05-02-2004 at 01:35 PM.
 
Old 05-02-2004, 01:55 PM   #2
feend
Member
 
Registered: Nov 2003
Location: williamsburgland
Distribution: Slackware
Posts: 61

Rep: Reputation: 15
Check out 2.6.5 preemtive kernels.... They seem to be more responsive on the desk top.
 
Old 05-02-2004, 04:07 PM   #3
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
Re: Swappiness of kernel

Quote:
Originally posted by debian_dummy
No flames please but my Windows XP is a far more responsive desktop experience than Debian. It feels like it's quicker and more responsive than Debian and Fedora Core 1 (eg: minimising , maximising, opening apps)
For minimizing and maximizing, I think this has more to do with the video drivers than anything else. Windows video drivers are more mature and complete. If you are using generic video drivers, try switching to one that is specific to your video card. It makes a world of difference with respect to window response times. For the time being, Windows will be more responsive and probably will continue to be so for some time.
 
Old 05-02-2004, 04:25 PM   #4
sterrenkijker
Member
 
Registered: Mar 2004
Location: the Netherlands
Distribution: Debian Sarge
Posts: 302

Rep: Reputation: 30
Interesting discussion .

paging=swapping indeed

as for memory: is XP really using that much memory? I'm using Debian sarge with kernel 2.6.3 of 2.6.4, gnome and 256 MB RAM, which is usually enough, unless I do big installs or recompile a kernel (quite a heavy taks). If you have 1 GB of RAM you don't really need swap, and your kernel won't use it.

Never notice my minimizing/maximizing costs time, maybe because I don't like having lot's of programs opened (gives such a mess). It's just my style...

To see how much memory your computer uses, try gnome system monitor (can also be embedded in the taskbar!) or gkrellm. These apps show how much your processor is used, how much memory is used, and much more...

If you really don't like a sluggish desktop, try another windowmanager: I know fluxbox is really fast, but the looks and userfriendlyness may be a bit worse. Fluxbox's latest version (not yet in the debian packages of sid) is much better! Xfce could be nice too, haven't really tried it yet, but I've heard it is pretty fast. Gnome and KDE are known for being slow .

Greetings!

Corien

Last edited by sterrenkijker; 05-02-2004 at 04:37 PM.
 
Old 05-02-2004, 10:31 PM   #5
zuralin
Member
 
Registered: Sep 2003
Distribution: Debian testing/unstable
Posts: 225

Rep: Reputation: 30
if you want to stay with the 2.4 series than try building your own kernel with the lowlatency and preemptive patches (apt-get install kernel-patch-2.4-lowlatency kernel-patch-2.4-preempt) and build your kernel with make-kpkg --added_patches="lowlatency,preempt" --append_to_version="DATE" kernel_image. Say yes to both questions (no for the sysctl question however).. See http://newbiedoc.sourceforge.net/system/kernel-pkg.html for help on building your own kernel and make-kpkg. Should increase your desktop responsiveness.
 
Old 05-02-2004, 11:35 PM   #6
hypnos
Member
 
Registered: May 2004
Distribution: debian
Posts: 52

Rep: Reputation: 15
Run "dpkg-reconfigure xserver-common" and set the nice value for xserver. For kernel 2.4.x it should be -10 and for 2.6.x it should be 0.
 
Old 05-03-2004, 02:17 AM   #7
debian_dummy
Member
 
Registered: Apr 2004
Distribution: Debian SID and Woody
Posts: 77

Original Poster
Rep: Reputation: 15
Excellent tips ! Thank you everyone !

I'll check them out, config a 2.4 and also a 2.6 kernel from the tips above and then post my results.

Thinking forward, to post my results I would need to measure my current performance as a benchmark.

Anyone know of a test suite or should I just use the commands that Andrew Morton mentioned in his posts ?

With regards to my original post, in hindsight, Andrew Morton is a developer so he probably compiles kernels on a daily/hourly basis so his need to free up his RAM" and swap out would seem excessive compared to the normal usage of a dekstop.

Thanks again ..
 
Old 05-08-2004, 07:56 AM   #8
Booster
Member
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: Gentoo, Suse
Posts: 59

Rep: Reputation: 15
The first thing I'd test is just turning off the swapfile and see how it runs. Run (as root): swapoff /dev/hda2 (using the correct swap partition for your installation), and see how it goes. I'd say that you'd likely be fine all the time with 1 GB of RAM - I have 512 MB, and I normally run with swapping off - including running games (ie: Americas Army), doing imaging and 3D modelling and rendering.
 
Old 05-15-2004, 01:55 PM   #9
scbdev
LQ Newbie
 
Registered: May 2004
Location: europe
Distribution: red hat linux, fedora, knoppix
Posts: 1

Rep: Reputation: 0
in my experience linux kernels always behaved quite stupid, when in comes to swapping. on my old computer i have 192 mb ram and the kernel usually uses up to half of that as disk cache and start to swap, when the other half rans out. with early 2.4 kernels it was possible to set some parameters in /proc/sys/vm but these were removed in latter versions. disabling swap is not the best option because sometimes i really do run out of memory and really need it (the computer stops responding to user inputs and constantly accesses the harddisk till reboot if this happens). on my new computer (1gb ram) my usual memory usage is about 400 - 600 megs and after disk intensive taks (which blow out cache mem usage to several 100 megs) the kernel too tends to use the 512 meg swap file.

now my question: can i use this /proc/sys/vm/swappiness parameter to lessen this problems? thanx
 
Old 05-16-2004, 05:16 AM   #10
urzumph
Member
 
Registered: Jan 2004
Location: Australia
Distribution: Debian
Posts: 168

Rep: Reputation: 30
debian_dummy :

I suspect your video drivers. Can you post the device section of your x config? (/etc/x11/xf86config-4) My bet is you have it set to vesa / vga / nv.
You should get and install the correct drivers from nvidia / ati / your vid manufacturor.
 
Old 06-10-2004, 03:46 PM   #11
TobiX
LQ Newbie
 
Registered: Jun 2004
Posts: 1

Rep: Reputation: 0
Re: Swappiness of kernel

Woah! I read the same article the original poster is refering to, did a Google search for 'swappiness' and found this thread here!

YES, the swappiness setting would improve things a lot, but they fail to mention it's only available in 2.6 kernels.

YES, you should get rid of the swap partition, or at least unmount it (swapoff -a) so that you can quickly mount it back (swapon -a) in case you suddenly (and BRIEFLY) need more RAM than you have.

My main PC is a Debian-only box with 1 GHz Athlon and 512 MB RAM (so lesser specs than you!), kernel 2.4 and I don't use any swap at all. I leave X11 and KDE open for months (yeah I'm lazy so what) with browsers, multimedia apps, shells and stuff left open all over the place. It's never sluggish and I've never run out of memory.

The whole swap file/partition thing has always been a bad idea in my eyes. One of the first things I do to friends/relatives PCs, if they have WinXP and at least 512 MB RAM, is turning off the swap file entirely (YES, you can do that in WinXP, AT LAST!) You should really give it a try, especially with 1 GB of RAM, on both Linux and Windows. I guarantee you will be amazed at the results!

One last note: if you need more RAM than you have, use lighter programs, use fewer programs at a given time or go buy more RAM. There's no way around it. There's no excuse in using HARD DISK SPACE instead of RAM. It's not meant to do that.

Quote:
And if I do away with the swap partition, what happens when an application expects a swap file? crash city?
No application is supposed to know if you have a swap file or not, so no application expects it. Swap (or lack thereof) is something the kernel deals with, and ONLY the kernel. So yeah, try it out, it won't crash anything.

On the other hand, get in the habit of keeping a memory meter or graph open on your desktop/taskbar/traybar/whatever at all times, then you will be able to keep the situation under complete control.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel 2.4 in Zipslack (Waring: unable to open an initial console | Kernel Panic...) kurtamos Linux - General 2 05-10-2006 12:58 PM
Swappiness Jake_B Red Hat 1 10-21-2005 02:59 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
Changing swappiness on SUSE-9.3 srivastava Linux - Software 2 06-05-2005 12:41 PM
How to run vm.swappiness=10 to /etc/sysctl.conf on SUSE-9.3? srivastava Linux - Software 3 05-27-2005 11:10 PM


All times are GMT -5. The time now is 06:50 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration