LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-21-2006, 06:43 PM   #1
tripmix
Member
 
Registered: Nov 2004
Location: Norway
Distribution: Debian mostly
Posts: 107

Rep: Reputation: 16
Full swap make my box super slow


My swap disk seem to fill up way to fast making everything superslow. I have 1G ram and 1G swap. After only one day up my swap is full and it's not clearing when I kill apps useing alot of memory.
I tried "swapoff -a" to clear it but it gives me this error "swapoff: /dev/sda2: Cannot allocate memory" I don't know what that means, I guess it means it has no place to put the swap data.
Any way I could force it to use like only 90% of may swap space? Or would that cause the same slowdown? And when I say slow I mean so slow I can't even move the mouse pointer or type.
I have computers whit less ram and smaller swap and this do not happen to them.
 
Old 12-21-2006, 07:19 PM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
You shouldn't be swapping at all if you can avoid it. What programs are eating this much memory?
 
Old 12-21-2006, 07:24 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by tripmix
My swap disk seem to fill up way to fast making everything superslow. I have 1G ram and 1G swap. After only one day up my swap is full and it's not clearing when I kill apps useing alot of memory.
I tried "swapoff -a" to clear it but it gives me this error "swapoff: /dev/sda2: Cannot allocate memory" I don't know what that means, I guess it means it has no place to put the swap data.
Any way I could force it to use like only 90% of may swap space? Or would that cause the same slowdown? And when I say slow I mean so slow I can't even move the mouse pointer or type.
I have computers whit less ram and smaller swap and this do not happen to them.
Impossible to tell anything with the information you provide; what
tasks are you running, what does top say? Which tasks were running
(and hogging virtual memory *before* you 'closed all programs'?


Cheers,
Tink
 
Old 12-21-2006, 07:32 PM   #4
tripmix
Member
 
Registered: Nov 2004
Location: Norway
Distribution: Debian mostly
Posts: 107

Original Poster
Rep: Reputation: 16
Thats part of the problem, I don't know.
Now I'm running xorg, kde, firefox, konquror, amule and azureus. These are the only ones that seem to use alot of memory. And there is a stupid exe file called beagel something, don't know what that is. I also run apache2 mythtv mysql but they don't seem to be useing alot of memory.

Here is output from "ps u -A"
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 6120 84 ? S Dec20 0:02 init [2]
root 2 0.0 0.0 0 0 ? S Dec20 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN Dec20 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S Dec20 0:00 [watchdog/0]
root 5 0.0 0.0 0 0 ? S Dec20 0:06 [migration/1]
root 6 0.0 0.0 0 0 ? SN Dec20 0:00 [ksoftirqd/1]
root 7 0.0 0.0 0 0 ? S Dec20 0:00 [watchdog/1]
root 8 0.0 0.0 0 0 ? S< Dec20 0:00 [events/0]
root 9 0.0 0.0 0 0 ? S< Dec20 0:00 [events/1]
root 10 0.0 0.0 0 0 ? S< Dec20 0:00 [khelper]
root 11 0.0 0.0 0 0 ? S< Dec20 0:00 [kthread]
root 15 0.0 0.0 0 0 ? S< Dec20 0:06 [kblockd/0]
root 16 0.0 0.0 0 0 ? S< Dec20 0:00 [kblockd/1]
root 17 0.0 0.0 0 0 ? S< Dec20 0:00 [kacpid]
root 142 0.0 0.0 0 0 ? S< Dec20 0:00 [khubd]
root 185 0.0 0.0 0 0 ? S< Dec20 0:00 [aio/0]
root 184 0.0 0.0 0 0 ? D Dec20 0:54 [kswapd0]
root 186 0.0 0.0 0 0 ? S< Dec20 0:00 [aio/1]
root 784 0.0 0.0 0 0 ? S< Dec20 0:00 [kseriod]
root 1725 0.0 0.0 0 0 ? S< Dec20 0:00 [ata/0]
root 1726 0.0 0.0 0 0 ? S< Dec20 0:00 [ata/1]
root 1736 0.0 0.0 0 0 ? S< Dec20 0:00 [scsi_eh_0]
root 1737 0.0 0.0 0 0 ? S< Dec20 0:00 [scsi_eh_1]
root 1745 0.0 0.0 0 0 ? S< Dec20 0:00 [scsi_eh_2]
root 1746 0.0 0.0 0 0 ? S< Dec20 0:00 [scsi_eh_3]
root 1747 0.0 0.0 0 0 ? S< Dec20 0:00 [scsi_eh_4]
root 1748 0.0 0.0 0 0 ? S< Dec20 0:00 [scsi_eh_5]
root 2146 0.0 0.0 0 0 ? S Dec20 0:11 [kjournald]
root 2351 0.0 0.0 11480 12 ? S<s Dec20 0:00 udevd --daemon
root 3244 0.0 0.0 0 0 ? S< Dec20 0:00 [kpsmoused]
root 3288 0.0 0.0 0 0 ? S< Dec20 0:00 [ivtv_vbi/0]
root 3289 0.0 0.0 0 0 ? S< Dec20 0:00 [ivtv_vbi/1]
root 3388 0.0 0.0 0 0 ? S< Dec20 0:00 [msp34xx]
root 3413 0.0 0.0 0 0 ? S< Dec20 0:00 [ivtv-enc]
root 3414 0.0 0.0 0 0 ? S< Dec20 0:00 [ivtv-enc-vbi]
root 3425 0.0 0.0 0 0 ? S< Dec20 0:00 [ivtv-dec-vbi]
root 3424 0.0 0.0 0 0 ? S< Dec20 0:00 [ivtv-dec]
root 3739 0.0 0.0 0 0 ? S Dec20 0:34 [lirc_dev]
root 3791 0.0 0.0 0 0 ? S< Dec20 0:00 [kmirrord]
root 3844 0.0 0.0 0 0 ? S Dec20 0:03 [kjournald]
root 3846 0.0 0.0 0 0 ? S Dec20 0:08 [kjournald]
root 3848 0.0 0.0 0 0 ? S Dec20 0:00 [kjournald]
daemon 4208 0.0 0.0 4816 4 ? Ss Dec20 0:00 /sbin/portmap
root 4558 0.0 0.0 6760 224 ? Ss Dec20 0:00 /sbin/syslogd
root 4575 0.0 0.0 2652 76 ? Ss Dec20 0:00 /sbin/klogd -x
root 4588 0.0 0.0 9428 16 ? Ss Dec20 0:00 /usr/sbin/lircd --device=/dev/lirc0
root 4622 0.0 0.0 10108 16 ? S Dec20 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 4659 0.0 0.3 149068 4036 ? Sl Dec20 0:12 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/
root 4660 0.0 0.0 2636 12 ? S Dec20 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
root 4778 0.0 0.0 2652 196 ? Ss Dec20 0:00 /usr/sbin/acpid -c /etc/acpi/events -s /var/run/acpid.socket
root 4812 0.0 0.0 31836 28 ? Ss Dec20 0:00 /usr/sbin/cupsd
103 4869 0.0 0.0 9520 24 ? Ss Dec20 0:00 /usr/bin/dbus-daemon --system
110 4883 0.0 0.0 24308 792 ? Ss Dec20 0:03 /usr/sbin/hald
root 4884 0.0 0.0 11268 28 ? S Dec20 0:00 hald-runner
110 4890 0.0 0.0 9264 12 ? S Dec20 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
110 4897 0.0 0.0 9264 12 ? S Dec20 0:00 hald-addon-keyboard: listening on /dev/input/event2
110 4901 0.0 0.0 9268 80 ? S Dec20 0:02 hald-addon-keyboard: listening on /dev/input/event1
root 4913 0.0 0.0 4948 56 ? S Dec20 0:08 hald-addon-storage: polling /dev/hdb
root 4941 0.0 0.0 9944 156 ? Ss Dec20 0:03 /usr/bin/dirmngr --daemon --sh
100 4999 0.0 0.0 26472 100 ? Ss Dec20 0:00 /usr/sbin/exim4 -bd -q30m
lp 5051 0.0 0.0 10060 12 ? Ss Dec20 0:00 /usr/sbin/lpd -s
root 5075 0.0 0.0 8940 8 ? Ss Dec20 0:00 /usr/sbin/inetd
root 5089 0.0 0.0 28764 612 ? Ss Dec20 0:02 /usr/sbin/nmbd -D
root 5091 0.0 0.0 40572 340 ? Ss Dec20 0:00 /usr/sbin/smbd -D
root 5096 0.0 0.0 40572 8 ? S Dec20 0:00 /usr/sbin/smbd -D
statd 5167 0.0 0.0 7884 12 ? Ss Dec20 0:00 /sbin/rpc.statd
ntp 5187 0.0 0.0 18164 480 ? Ss Dec20 0:04 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 109:112 -g
root 5198 0.0 0.0 36468 840 ? Ss Dec20 0:01 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
daemon 5219 0.0 0.0 9048 36 ? Ss Dec20 0:00 /usr/sbin/atd
root 5233 0.0 0.0 11496 212 ? Ss Dec20 0:00 /usr/sbin/cron
root 5354 0.0 0.0 2652 12 tty2 Ss+ Dec20 0:00 /sbin/getty 38400 tty2
root 5355 0.0 0.0 2648 12 tty3 Ss+ Dec20 0:00 /sbin/getty 38400 tty3
root 5356 0.0 0.0 2652 12 tty4 Ss+ Dec20 0:00 /sbin/getty 38400 tty4
root 5357 0.0 0.0 2648 12 tty5 Ss+ Dec20 0:00 /sbin/getty 38400 tty5
root 5358 0.0 0.0 2652 12 tty6 Ss+ Dec20 0:00 /sbin/getty 38400 tty6
root 2129 0.0 0.0 55864 12 ? Ss Dec20 0:00 gdm
root 2130 0.0 0.0 62436 100 ? S Dec20 0:02 gdm
root 2133 7.0 49.1 1263072 505476 tty7 SLs+ Dec20 152:17 /usr/X11R6/bin/X :0 -dpi 96 -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
mythtv 2154 0.0 0.0 8576 16 ? Ss Dec20 0:00 /bin/sh /usr/bin/startkde
mythtv 2208 0.0 0.0 17812 76 ? Ss Dec20 0:01 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session /usr/bin/startkde
mythtv 2211 0.0 0.0 9516 12 ? Ss Dec20 0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
mythtv 2212 0.0 0.0 7848 8 ? S Dec20 0:00 /usr/bin/dbus-launch --exit-with-session /usr/bin/startkde
root 2241 0.0 0.0 2496 72 ? S Dec20 0:00 start_kdeinit --new-startup +kcminit_startup
mythtv 2242 0.0 0.1 75500 1440 ? Ss Dec20 0:00 kdeinit Running...
mythtv 2245 0.0 0.1 77452 1448 ? S Dec20 0:08 dcopserver [kdeinit] --nosid
mythtv 2247 0.0 0.2 79892 2208 ? S Dec20 0:01 klauncher [kdeinit] --new-startup
mythtv 2249 0.8 0.3 145824 3544 ? S Dec20 17:55 kded [kdeinit] --new-startup
mythtv 2251 0.0 0.0 11408 664 ? S Dec20 0:00 /usr/lib/gamin/gam_server
mythtv 2256 0.0 0.0 2632 40 ? S Dec20 0:00 kwrapper ksmserver
mythtv 2258 0.0 0.1 84052 1448 ? S Dec20 0:15 ksmserver [kdeinit]
mythtv 2259 0.0 0.2 88840 2068 ? S Dec20 0:01 kwin [kdeinit] -session 10cae17562000116637974300000055400000_1166531861_179653 -d
mythtv 2260 0.1 0.5 100280 5368 ? S Dec20 3:51 kwin [kdeinit] -session 10cae17562000116637974300000055400001_1166531861_180026 -d
mythtv 2262 0.0 0.3 118172 3176 ? S Dec20 0:21 knotify [kdeinit]
mythtv 2267 0.0 0.5 94620 5200 ? S Dec20 0:32 /usr/bin/artsd -F 10 -S 4096 -s 60 -m artsmessage -l 3 -f
mythtv 2270 0.0 0.3 98404 3584 ? S Dec20 0:02 kdesktop [kdeinit]
mythtv 2272 0.1 0.3 95820 3524 ? S Dec20 2:47 kdesktop [kdeinit]
mythtv 2277 0.0 0.4 104556 4448 ? S Dec20 0:33 kicker [kdeinit]
mythtv 2278 0.1 0.7 121748 7384 ? S Dec20 3:45 kicker [kdeinit]
mythtv 2284 0.0 0.1 86420 1652 ? S Dec20 0:00 khotkeys [kdeinit]
mythtv 2285 0.0 0.2 86552 2160 ? S Dec20 0:52 khotkeys [kdeinit]
mythtv 2294 0.0 0.1 84928 1300 ? S Dec20 0:02 kaccess [kdeinit]
mythtv 2296 1.2 9.3 292804 96504 ? D Dec20 26:37 konqueror [kdeinit] -session 10cae17562000116638031000000055400019_1166531861_1518
mythtv 2297 2.0 0.5 94956 5216 ? S Dec20 43:36 superkaramba -session 10cae17562000116653134600000055260014_1166531861_151926 -dis
mythtv 2300 0.0 0.9 125988 9696 ? Sl Dec20 0:23 beagled /usr/lib/beagle/BeagleDaemon.exe --bg
mythtv 2305 0.0 0.2 88068 2252 ? S Dec20 0:05 klipper [kdeinit]
mythtv 2307 0.0 0.3 107072 3156 ? S Dec20 0:01 korgac --miniicon korganizer
root 7413 0.0 0.0 25280 308 tty1 Ss Dec20 0:00 /bin/login --
mythtv 9012 6.5 0.6 407340 6468 ? SLl Dec20 141:02 /usr/bin/mythfrontend
mythtv 15922 0.0 0.3 93292 3920 ? S Dec20 0:07 kio_uiserver [kdeinit]
mythtv 23368 0.0 0.0 57368 20 ? S Dec20 0:00 /usr/bin/kdesud
mythtv 14879 0.0 0.2 230344 2936 ? Ssl Dec20 0:40 /usr/bin/mythbackend --daemon --logfile /var/log/mythtv/mythbackend.log --pidfile
mythtv 10323 0.0 0.0 13180 440 pts/1 Ss Dec20 0:00 /bin/sh
mythtv 17322 4.6 4.7 203876 49272 ? Sl Dec21 24:54 amule
root 24946 0.0 0.0 60876 108 ? Ss Dec21 0:00 /usr/sbin/apache2 -k start
www-data 24947 0.0 0.0 61008 276 ? S Dec21 0:00 /usr/sbin/apache2 -k start
www-data 24949 0.0 0.0 61008 464 ? S Dec21 0:00 /usr/sbin/apache2 -k start
www-data 24951 0.0 0.0 61008 280 ? S Dec21 0:00 /usr/sbin/apache2 -k start
www-data 24952 0.0 0.0 61008 236 ? S Dec21 0:00 /usr/sbin/apache2 -k start
www-data 24953 0.0 0.0 61008 240 ? S Dec21 0:00 /usr/sbin/apache2 -k start
www-data 18876 0.0 0.0 61008 296 ? S Dec21 0:00 /usr/sbin/apache2 -k start
www-data 24077 0.0 0.0 61008 348 ? S Dec21 0:00 /usr/sbin/apache2 -k start
root 27809 0.0 0.1 12612 1096 tty1 S+ 00:11 0:00 -bash
root 27976 0.0 0.0 0 0 ? S 00:11 0:00 [pdflush]
mythtv 25164 3.4 11.0 670036 113576 ? Sl 00:54 3:03 java -Xmx1024M -Djava.library.path=.:/usr/lib/jni:/usr/lib -classpath Azureus2.jar
root 27024 0.0 0.0 0 0 ? S 00:58 0:00 [pdflush]
mythtv 29024 3.5 7.1 287652 73212 ? Sl 01:01 2:55 /usr/lib/firefox/firefox-bin
mythtv 29145 0.0 0.1 24788 1212 ? S 01:01 0:00 /usr/lib/libgconf2-4/gconfd-2 10
root 31327 0.0 0.0 20256 540 pts/1 S 01:05 0:00 su
root 31369 0.0 0.1 12596 1412 pts/1 S 01:05 0:00 bash
mythtv 31438 0.0 0.2 83300 2712 ? S 01:52 0:00 kio_file [kdeinit] file /tmp/ksocket-mythtv/klauncherhEzSRb.slave-socket /tmp/ksoc
root 21240 0.0 0.1 10736 1060 pts/1 R+ 02:24 0:00 ps u -A

These lists allways get messed up when I post them so sorry.
 
Old 12-21-2006, 07:35 PM   #5
rufius
Member
 
Registered: Oct 2002
Location: Miami, FL
Distribution: Ubuntu
Posts: 184

Rep: Reputation: 30
You could decrease the swappiness of the system... its probably defaulting to 60. Check with the command:
Code:
cat /proc/sys/vm/swappiness
If its at 60, you can probably knock it down to 10, which is what I usually put it at. Use the following command to do so while the system is running:
Code:
sysctl -w vm.swappiness=10
Then you can set that permanently in /etc/sysctl.conf by adding the line at the bottom or wherever:
Code:
vm.swappiness=10
Hope that helps. Regards.
 
Old 12-21-2006, 07:37 PM   #6
tripmix
Member
 
Registered: Nov 2004
Location: Norway
Distribution: Debian mostly
Posts: 107

Original Poster
Rep: Reputation: 16
Top output for the one that asked

Tasks: 133 total, 2 running, 131 sleeping, 0 stopped, 0 zombie
Cpu(s): 4.8%us, 1.8%sy, 0.0%ni, 89.2%id, 3.8%wa, 0.0%hi, 0.3%si, 0.0%st
Mem: 1028688k total, 1013384k used, 15304k free, 3356k buffers
Swap: 979956k total, 979572k used, 384k free, 70720k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17322 mythtv 15 0 199m 48m 6648 S 5 4.9 25:24.26 amule
2133 root 15 0 1290m 491m 2396 S 3 48.9 152:54.06 Xorg
2249 mythtv 18 0 142m 3744 1692 S 1 0.4 18:01.16 kded
2297 mythtv 16 0 94956 5208 3112 S 1 0.5 43:50.88 superkaramba
25164 mythtv 15 0 654m 113m 7092 S 1 11.3 3:20.58 java
1 root 16 0 6120 84 52 S 0 0.0 0:02.53 init
2 root RT 0 0 0 0 S 0 0.0 0:00.64 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.14 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0
5 root RT 0 0 0 0 S 0 0.0 0:06.63 migration/1
6 root 34 19 0 0 0 S 0 0.0 0:00.33 ksoftirqd/1
7 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/1
8 root 10 -5 0 0 0 S 0 0.0 0:00.21 events/0
9 root 10 -5 0 0 0 S 0 0.0 0:00.06 events/1
 
Old 12-21-2006, 07:41 PM   #7
tripmix
Member
 
Registered: Nov 2004
Location: Norway
Distribution: Debian mostly
Posts: 107

Original Poster
Rep: Reputation: 16
Set it to 10 like you said. I hope that helps. Thanks.
 
  


Reply



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
nfs write == super slow; read == super fast - problem? BrianK Linux - Networking 4 08-23-2007 10:59 PM
Super Dual Box GameboyHippo Linux - Hardware 3 06-04-2005 07:13 PM
Super slow network XxSpaceBoyxX Linux - Newbie 8 01-02-2005 01:38 AM
Super slow 3D Accel. Zujin Slackware 3 11-25-2004 03:45 AM
3D Games Super Slow. Mr. Eek Linux - Software 6 05-14-2003 08:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:46 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration