View previous topic :: View next topic |
Author |
Message |
dstrebel Tux's lil' helper
Joined: 19 Feb 2004 Posts: 76 Location: Carbondale
|
Posted: Sat May 22, 2004 7:06 am Post subject: Swap space never gets used |
|
|
My swap space never gets used. I will have like 2-3mb of memory and the swap space still shows 0 used in top and in free -m. I am a noob at this so if anybody could this. I would greatly appreciate it. |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Sat May 22, 2004 7:42 am Post subject: |
|
|
My swap never seems to go over 30 MB. Try opening a bunch of programs that take up memory and then switching between them. Watch top and see what happens. |
|
Back to top |
|
|
Earthwings Bodhisattva
Joined: 14 Apr 2003 Posts: 7753 Location: Germany
|
Posted: Sat May 22, 2004 7:43 am Post subject: |
|
|
Quote: |
I will have like 2-3mb of memory
|
You mean your memory gets used except 2-3 MB? This is nothing to worry about. IIRC for example the disk cache is kept in main memory and not cleared until there's need to. So your memory looks full, but there's still room for new processes. |
|
Back to top |
|
|
dstrebel Tux's lil' helper
Joined: 19 Feb 2004 Posts: 76 Location: Carbondale
|
Posted: Sat May 22, 2004 7:52 am Post subject: |
|
|
I have tried opening up about 10 apps my memory just gets used and my system barely responds.
When I just have mozilla open and xmms the system can barely play sound and the cursor slips. Could this be a mis-config some where. |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Sat May 22, 2004 8:00 am Post subject: |
|
|
But what happens to your swap? If you're putting a heavy strain on your computer, it's normal for things to slow down. When the CPU performs context switches, it will need to read from disk, which is WAY slower than getting the info from RAM. |
|
Back to top |
|
|
Earthwings Bodhisattva
Joined: 14 Apr 2003 Posts: 7753 Location: Germany
|
Posted: Sat May 22, 2004 8:32 am Post subject: |
|
|
Can you tell us something about your hardware? Processor, RAM size, ... |
|
Back to top |
|
|
Nate_S Guru
Joined: 18 Mar 2004 Posts: 414
|
Posted: Sat May 22, 2004 3:45 pm Post subject: |
|
|
I believe you can change how much your virtual memory is used by changing a setting in /proc/sys/vm/swappieness (or something like that) but I think this is a kernel feature that you can only find in certian patchsets. Love-sources used to have it (I think,) but it seems that this current release (2.6.6-love4) doesn't. |
|
Back to top |
|
|
dstrebel Tux's lil' helper
Joined: 19 Feb 2004 Posts: 76 Location: Carbondale
|
Posted: Sat May 22, 2004 9:16 pm Post subject: |
|
|
I have a athalon xp 1800 and 256mb a ram I know upgrading the ram would help but should it slow the computer down that much by just having fluxbox and mozilla and xmms up. |
|
Back to top |
|
|
Earthwings Bodhisattva
Joined: 14 Apr 2003 Posts: 7753 Location: Germany
|
Posted: Sat May 22, 2004 10:21 pm Post subject: |
|
|
I doubt upgrading RAM would help, looks like there's something misconfigured. First thing to check: Is DMA activated? |
|
Back to top |
|
|
andrewy l33t
Joined: 07 Apr 2004 Posts: 602
|
Posted: Sat May 22, 2004 11:32 pm Post subject: |
|
|
dstrebel wrote: | I have a athalon xp 1800 and 256mb a ram I know upgrading the ram would help but should it slow the computer down that much by just having fluxbox and mozilla and xmms up. |
The output of "hdparm /dev/hd?" would be helpful |
|
Back to top |
|
|
Jeremy_Z l33t
Joined: 05 Apr 2004 Posts: 671 Location: Shanghai
|
Posted: Sun May 23, 2004 12:07 am Post subject: |
|
|
I mistyped when configuring the swap partition, as a result i have 3 Go of swap, and not a bit of it that is used by the system....
At least i can host multiple X servers with a lt of OO _________________ "Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals |
|
Back to top |
|
|
dstrebel Tux's lil' helper
Joined: 19 Feb 2004 Posts: 76 Location: Carbondale
|
Posted: Sun May 23, 2004 12:26 am Post subject: |
|
|
heris the output from hdparm:
/dev/hda:
multcount = 16 (on)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 12161/255/63, sectors = 195371568, start = 0 |
|
Back to top |
|
|
KiTaSuMbA Guru
Joined: 28 Jun 2002 Posts: 430 Location: Naples Italy
|
Posted: Sun May 23, 2004 2:30 am Post subject: |
|
|
dstrebel wrote: | heris the output from hdparm:
/dev/hda:
multcount = 16 (on)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 12161/255/63, sectors = 195371568, start = 0 |
and here is mine:
Code: | /dev/hdc:
multcount = 16 (on)
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 65535/16/63, sectors = 120103200, start = 0 |
As you can see, you have no DMA and running Input/Output from your disk at 16-bit: that's slow! Have you enabled support for your Mobo's chipset in your kernel? Have you said "yes" to the option "use dma when available"? If yes on both, then play around a bit with hdparm's options. When you get sattisfied with the options you get on your disk, modify the /etc/init.d/hdparm script to reflect them and add it to the default runlevel with rc-update.
As for the swap never getting used unless you finish up all your memory that's the default behaviour of the linux kernel: When the kernel needs to store temporary stuff (what under windows would be a galaxy of temp files burried somewhere under C:\windows\) it prefers ram to hard disk. This is called cache. Only when you need more ram for _real_ work it drifts that stuff on the swap partition which is fairly slower (even when the disk runs at optimal speeds). Open a terminal and type "free": the "usefully free" (intended as the amount of memory you could potentially expend on processes) ram you have is the second line as it subtracts the cached pages. However, you can change this behaviour if you have a 2.6 kernel as others indicated. _________________ Need to flame people LIVE on IRC? Join #gentoo-otw on freenode! |
|
Back to top |
|
|
sapphirecat Guru
Joined: 15 Jan 2003 Posts: 376
|
Posted: Mon May 24, 2004 1:22 pm Post subject: |
|
|
KiTaSuMbA wrote: | When you get sattisfied with the options you get on your disk, modify the /etc/init.d/hdparm script to reflect them and add it to the default runlevel with rc-update. |
You mean /etc/conf.d/hdparm? _________________ Former Gentoo user; switched to Kubuntu 7.04 when I got sick of waiting on gcc. Chance of thread necro if you reply now approaching 100%... |
|
Back to top |
|
|
dstrebel Tux's lil' helper
Joined: 19 Feb 2004 Posts: 76 Location: Carbondale
|
Posted: Mon May 24, 2004 2:36 pm Post subject: |
|
|
I there any tutorials that you know of on hdparm and dma |
|
Back to top |
|
|
sapphirecat Guru
Joined: 15 Jan 2003 Posts: 376
|
Posted: Tue May 25, 2004 5:47 pm Post subject: |
|
|
dstrebel wrote: | I there any tutorials that you know of on hdparm and dma |
Not really. The Ultra-DMA-HOWTO basically says "read the hdparm man page" and refers to the 2.2.x kernels as new.... _________________ Former Gentoo user; switched to Kubuntu 7.04 when I got sick of waiting on gcc. Chance of thread necro if you reply now approaching 100%... |
|
Back to top |
|
|
|