Odd problem - runaway swap.

Questions about applications and software
Forum rules
Before you post please read this

Odd problem - runaway swap.

Postby optimize me on Sat Oct 24, 2009 6:15 pm

Once in a while - every couple days or so - I'll be working along at my computer and out of nowhere, I'll see my hard-disk activity light going off and my system slows to a crawl. On the occasions where I can get a terminal up and get an htop output, X is hogging 98% of my cpu and doing something with swap space, as my swap partition fills to the absolute max. I have 1GB ram, which when this happens, is usually hovering between 500 and 700MB usage, but my 1.5GB swap file is filled to the brim.

The only way I can stop this is to restart X with either ctrl-alt-backspace, or sometimes a ctrl-alt-sysrq-k command.

Has anybody ever heard of such a thing? I can't think of anything I'm doing that might trigger it.. I usually have a browser open and torrents running, but it sometimes happens when the comp is idle or when I'm watching a video.
AMD Phenom II X6 1045T 2.8GHz 8GB DDR3 RAM ATI Radeon HD6970
User avatar
optimize me
Level 5
Level 5
 
Posts: 639
Joined: Wed Jun 03, 2009 5:25 pm

Linux Mint is funded by ads and donations.
 

Re: Odd problem - runaway swap.

Postby lagagnon on Sat Oct 24, 2009 6:27 pm

That is strange - I am not experiencing anything like that. Have you checked the /var/log/Xorg.0.log file to see if there is anything untoward in it that might give you a clue?
User avatar
lagagnon
Level 7
Level 7
 
Posts: 1888
Joined: Wed Jun 17, 2009 7:38 pm
Location: an island in the Pacific...

Re: Odd problem - runaway swap.

Postby DrHu on Sat Oct 24, 2009 7:06 pm

optimize me wrote:I usually have a browser open and torrents running, but it sometimes happens when the comp is idle or when I'm watching a video.
    That could do it Torrents
    That could do it video
--might depend on the video processing capability of your system & CPU, of course
Does it ever happen with regular browsing, that is Internet searches
http://kerneltrap.org/node/3660
--might also depend on which mix of applications you are using

I have about 1GB on an older computer with a geforce 5x graphic card
--and don't have any swap happening
Mine...
In terminal, check
Code: Select all
]inxi -F
System:    Host tux Kernel 2.6.28-16-generic i686 (32 bit) Distro Linux Mint 7 Gloria - Main Edition
CPU:       Single core AMD Athlon XP1500+ (UP) cache 256 KB flags (sse) bmips 2685.68 clocked at 1342.842 MHz
Graphics:  Card nVidia NV36.2 [GeForce FX 5700] X.Org 1.6.0 Res 1600x1200@50.0hz
           GLX Renderer GeForce FX 5700/AGP/SSE/3DNOW! GLX Version 2.1.2 NVIDIA 173.14.16
Audio:     Card Creative Labs SB Live! EMU10k1 driver EMU10K1_Audigy at port d000
           Sound: Advanced Linux Sound Architecture Version 1.0.18rc3
Disks:     HDD Total Size: 183.0GB (2.2% used) 1: /dev/sda Maxtor 6Y120L0 122.9GB 2: /dev/sdb MAXTOR 6L060J3 60.0GB
Partition: ID:/ size: 53G used: 3.7G (8%) ID:swap-1 size: 2.49GB used: 0.00GB (0%)
Info:      Processes 101 Uptime 5 min Memory 198.4/1002.6MB Client Shell inxi 1.0.6

free -m
             total       used       free     shared    buffers     cached
Mem:          1002        407        594          0         16        192
-/+ buffers/cache:        198        803
Swap:         2376          0       2376
Last edited by DrHu on Sat Oct 24, 2009 7:20 pm, edited 4 times in total.
User avatar
DrHu
Level 16
Level 16
 
Posts: 6611
Joined: Wed Jun 17, 2009 8:20 pm

Re: Odd problem - runaway swap.

Postby optimize me on Sat Oct 24, 2009 7:11 pm

lagagnon wrote:That is strange - I am not experiencing anything like that. Have you checked the /var/log/Xorg.0.log file to see if there is anything untoward in it that might give you a clue?

I did. There wasn't anything that really jumped out at me - just the usual stuff about configuring keyboard, mouse, video, so on & so forth. I just looked through Xorg.0.log and Xorg.0.log.old, but I may have rebooted a couple times since it last happened. I never noticed anything unusual in the log there or in kern.log, faillog or dmesg (not that I'd expect to see anything there.)

It hasn't happened since yesterday, so tomorrow or the next day I'll be sure to grab the log and post it up while it's fresh.
AMD Phenom II X6 1045T 2.8GHz 8GB DDR3 RAM ATI Radeon HD6970
User avatar
optimize me
Level 5
Level 5
 
Posts: 639
Joined: Wed Jun 03, 2009 5:25 pm

Re: Odd problem - runaway swap.

Postby optimize me on Sat Oct 24, 2009 7:19 pm

DrHu wrote:
I usually have a browser open and torrents running, but it sometimes happens when the comp is idle or when I'm watching a video.

    That could do it Torrents
    That could do it video
--might depend on the video processing capability of your system & CPU, of course
Does it ever happen with regular browsing, that is Internet searches

I have about 1GB on an older computer with a geforce graphic card
--and don't have any swapping happening

Yeah, it's an oddball, for sure.

I just have on-board Intel graphics, but the videoram is OK. I have 1GB of RAM behind a 1.73GHz processor. Usually, my swap is all but unused - maybe a few MB of data there. If I run a VM, it climbs to 700 or so MB, but that's about the only time I see it in use. I even have vm_swappiness=10 in my /etc/sysctl.conf file.

As requested.. inxi -F
Code: Select all
System:    Host me Kernel 2.6.28-16-generic i686 (32 bit) Distro Linux Mint 7 Gloria - Main Edition
CPU:       Dual core Intel T2080 (SMP) cache 1024 KB flags (sse3 nx) bmips 6917.38
           Clock Speeds: (1) 800.00 MHz (2) 800.00 MHz
Graphics:  Card Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics Controller X.Org 1.6.0 Res: 1280x800@59.9hz
           GLX Renderer Mesa DRI Intel 945GM GEM 20090326 2009Q1 RC2 x86/MMX/SSE2 GLX Version 1.4 Mesa 7.4 Direct Rendering No
Audio:     Card Intel 82801G (ICH7 Family) High Definition Audio Controller driver HDA Intel
           Sound: Advanced Linux Sound Architecture Version 1.0.21
Network:   Card Atheros AR242x 802.11abg Wireless PCI Express Adapter driver ath5k_pci v: 0.9.4
Disks:     HDD Total Size: 870.2GB (43.9% used) 1: /dev/sda Hitachi HTS54161 120.0GB
           2: /dev/sdb USB_3.5" 750.2GB
Partition: ID:/ size: 8.8G used: 4.0G (48%) ID:/boot size: 1.8G used: 74M (5%) ID:/home size: 74G used: 33G (47%)
           ID:swap-1 size: 1.50GB used: 0.35GB (23%)
Sensors:   System Temperatures: cpu: 58.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes 157 Uptime 6:14 Memory 478.8/993.2MB Client Shell inxi 1.1.13

and free -m:
Code: Select all
             total       used       free     shared    buffers     cached
Mem:           993        957         35          0          9        478
-/+ buffers/cache:        470        523
Swap:         1427        334       1093
I see 330-some-odd MB in swap right now, but I just got done watching a full-screen movie off a USB drive and I have a dozen torrents screaming away at 200k+/each in the background. I'd expect to see a little swap usage in those conditions.
AMD Phenom II X6 1045T 2.8GHz 8GB DDR3 RAM ATI Radeon HD6970
User avatar
optimize me
Level 5
Level 5
 
Posts: 639
Joined: Wed Jun 03, 2009 5:25 pm

Re: Odd problem - runaway swap.

Postby DrHu on Sat Oct 24, 2009 7:31 pm

optimize me wrote:Usually, my swap is all but unused - maybe a few MB of data there. If I run a VM, it climbs to 700 or so MB, but that's about the only time I see it in use. I even have vm_swappiness=10 in my /etc/sysctl.conf file.

http://lkml.indiana.edu/hypermail/linux ... /2603.html
http://lwn.net/Articles/324894/

http://www.pythian.com/news/1913
    Set swappiness to 0 and the kernel is going to start swapping only when absolutely needed.
    Set swappiness to 100 and the kernel will preemtivelyswap out memory you are not using.
--some Andrew Morton data: ref swap
I might try 0 for swappiness to find out what is loading your system, when the problems start happening

Will be waiting to see additional result logs..
The swappiness value you selected might explain the anomaly you get
--since your application mix seems to be loading RAM (memory) to capacity

http://kerneltrap.org/node/1044
    The value in vm_swappiness is updated only when the vm is under pressure to
    swap and you can check the last vm_swappiness value under pressure by
    cat /proc/sys/vm/swappiness

Mine (default)
in terminal, check
    cat /proc/sys/vm/swappiness
    60
--my RAM (memory) isn't being stressed
User avatar
DrHu
Level 16
Level 16
 
Posts: 6611
Joined: Wed Jun 17, 2009 8:20 pm


Return to Software & Applications

Who is online

Users browsing this forum: PatH57 and 34 guests