Debian This forum is for the discussion of Debian Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-02-2004, 01:31 PM
|
#1
|
|
Member
Registered: Apr 2004
Distribution: Debian SID and Woody
Posts: 77
Rep:
|
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.
|
|
|
|
05-02-2004, 01:55 PM
|
#2
|
|
Member
Registered: Nov 2003
Location: williamsburgland
Distribution: Slackware
Posts: 61
Rep:
|
Check out 2.6.5 preemtive kernels.... They seem to be more responsive on the desk top.
|
|
|
|
05-02-2004, 04:07 PM
|
#3
|
|
Member
Registered: Feb 2004
Posts: 467
Rep:
|
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.
|
|
|
|
05-02-2004, 04:25 PM
|
#4
|
|
Member
Registered: Mar 2004
Location: the Netherlands
Distribution: Debian Sarge
Posts: 302
Rep:
|
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.
|
|
|
|
05-02-2004, 10:31 PM
|
#5
|
|
Member
Registered: Sep 2003
Distribution: Debian testing/unstable
Posts: 225
Rep:
|
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.
|
|
|
|
05-02-2004, 11:35 PM
|
#6
|
|
Member
Registered: May 2004
Distribution: debian
Posts: 52
Rep:
|
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.
|
|
|
|
05-03-2004, 02:17 AM
|
#7
|
|
Member
Registered: Apr 2004
Distribution: Debian SID and Woody
Posts: 77
Original Poster
Rep:
|
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 ..
|
|
|
|
05-08-2004, 07:56 AM
|
#8
|
|
Member
Registered: Sep 2003
Location: Ontario, Canada
Distribution: Gentoo, Suse
Posts: 59
Rep:
|
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.
|
|
|
|
05-15-2004, 01:55 PM
|
#9
|
|
LQ Newbie
Registered: May 2004
Location: europe
Distribution: red hat linux, fedora, knoppix
Posts: 1
Rep:
|
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
|
|
|
|
05-16-2004, 05:16 AM
|
#10
|
|
Member
Registered: Jan 2004
Location: Australia
Distribution: Debian
Posts: 168
Rep:
|
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.
|
|
|
|
06-10-2004, 03:46 PM
|
#11
|
|
LQ Newbie
Registered: Jun 2004
Posts: 1
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:10 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|