Memory usage 100% = auto log out :(

Well I have searched the forums, looked through google and still cannot find the answer. My memory usage keeps building up and up as time goes by, when it hits 100% it logs me out. I have a tad over 9 Gib in swap, that is how it was set up when I did auto install and let it do the partitions. I have 4Gib memory. When i first log in it shows about about 800+ MB being used and starts adding more from there. I can run applications for about 6-8 hours before it hits the 100% marker. At first I was blaming this on the video player, but when I put on a play list each song seems like it gets stuck in memory also adding about .02% per song to max memory. This seems to pertain to each application I do.

http://a.imageshack.us/img230/3198/desktopmemory.th.png](http://img230.imageshack.us/i/desktopmemory.png/)

Uploaded with ImageShack.us

This pic shows my Computer setting and usage through system monitor and conky script. In another note, I never see my Swap partition being used at all. I am real green to linux and not sure if I was suppose to turn something on. In the partitioner it shows it being mounted and as swap.

OpenSuse version ???

9 gig is over kill for swap but should real not cause a problem.

also might want to see if you are running out of space on root due to temp files.

df /

opensuse version 11.3
Linux Artista3 2.6.35-20-default #1 SMP 2010-08-11 06:08:17 +0200 x86_64 x86_64 x86_64 GNU/Linux

I did a fresh install yesterday to see if it would fix the problem, yet no luck, I have tried the 2.6.35 kernel default and desktop, same results. I upgraded to kde 4.5 day before yesterday and it crashed a lot faster (auto log)

Is there a way to log memory usage, that tells me what is going into memory and what is leaving so I can see if one or more items is stacking up?

/root is 4.7Gib out of 98.4Gib and /home is on its own partition still 84% free space

@Artista: which KDE Widget is it you have running on the right side of the desktop? I really like that: it shows “top processes”, etc.

that is Conky, really lite weight script to keep track of everything. If you want to know how to set it up easy let me know, can show you how to make it transparent on KDE. You need to download Conky and Feh both are on opensuse download page.

On 2010-08-13 17:36, Artista wrote:
>
> Well I have searched the forums, looked through google and still cannot
> find the answer. My memory usage keeps building up and up as time goes
> by, when it hits 100% it logs me out. I have a tad over 9 Gib in swap,
> that is how it was set up when I did auto install and let it do the
> partitions. I have 4Gib memory. When i first log in it shows about about
> 800+ MB being used and starts adding more from there. I can run
> applications for about 6-8 hours before it hits the 100% marker. At
> first I was blaming this on the video player, but when I put on a play
> list each song seems like it gets stuck in memory also adding about .02%
> per song to max memory. This seems to pertain to each application I do.

Use “top” on a terminal, sorting by memory (key ‘M’) to find out what applications are using that
amount of memory. You are probably using a buggy application that eats it.

There is also a system that can log usage data to files. I think it is “sysstat”, but I don’t really
know how to make use of it.

> In another note, I never see my Swap partition being used
> at all. I am real green to linux and not sure if I was suppose to turn
> something on. In the partitioner it shows it being mounted and as swap.

The partitioner can say that swap was reserver for use, but doesn’t say if it is really activated
for use. Do

grep swap /etc/fstab

You need a line similar to this:

LABEL=a_swap swap swap pri=-1 0 0

(because I named or labeled the swap partition, but that is not the only method)


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

My /etc/fstab was made by defualt and it looks like this

/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part5 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part1 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-WDC_WD6400AAKS-00A7B2_WD-WCASY6559646-part2 /Storage             ntfs-3g    default               0 0
/dev/disk/by-id/ata-WDC_WD6400AAKS-00A7B2_WD-WCASY6559646-part1 /Windows7            ntfs-3g    default               0 0
/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part3 /home                ext4       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

So the the line that you are showing I do not see. so guess mine looks more like swap swap defaults 0 0

On a side note, early early this morning a got a patch that downloaded, not sure what the patch was for but after its fix I have yet to encounter the issue of auto-logging out. Though memory will stand around 99% while watching a dvd, but at least now it drops back down to 63% memory use when I turn it off.

Swap at this point is still not accepting anything and sits a 0% used.

xorg #1 143Mib give or take + - 5Mib jumps
FireFox #2 128Mib give or take + - 5Mib jumps
Plasma-desktop 21Mib and they start dropping from there, those are the top 3

On 2010-08-15 05:36, Artista wrote:
>
> My /etc/fstab was made by defualt and it looks like this
>
>
> Code:
> --------------------
> /dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part5 swap swap defaults 0 0

This is the line.

Does it have an empty space at the start? Remove it.

Do


file -s /dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part5

The answer should be something like:

/dev/sda6: Linux/i386 swap file (new style) 1 (4K pages) size 2620594 pages Label a_swap

If it says something else, your line in fstab is bad. Either the swap partition is another one, or
it is not a swap.

You can run something like this:


file -s /dev/sda* | grep swap

To find where it is. Then find the correct ID and correct the fstab line.

If fstab is indeed correct, and it points to a swap partition, run:


swapon -s

If it says nothing, then activate the swap partition with “swapon -a”. See if it complains of
something and report back. You can also give swapon the device name of the partition to activate as
swap. If this one also fails, perhaps the swap partition is bad: then remake it:


mkswap -c L A_name_you_choose /dev/whatever

Don’t give the incorrect device name or you will destroy another partition.

Once done, activate that swapspace with swapon as above.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

Ok I tried what you said and still no luck. Here is a little better view of what is going on.
http://a.imageshack.us/img838/1404/fstab.th.png](http://img838.imageshack.us/i/fstab.png/)

If I go to the partitioner and look at the fstab options it shows no selected options in the fstab file. (as you can see in the picture) I am not sure but all the other mount points have “/” in front of them other the swap one is that right? I also ran the commands you told me too and I keep getting errors.

 jennifer@Artista3:~> sudo mkswap -c L swap /dev/sdb5
sudo: mkswap: command not found 

Or do I need to run that as init 3? or can I add the commands through the partitioner. When you said I could destroy another partition it made me a tad nervous.

print out for other command…

jennifer@Artista3:~> file -s /dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part5
/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part5: symbolic link to `../../sdb5'

Sorry for all the questions, the last Fstab file I did I remade with all UUID and the way this one is set up has me all mixed up…I do not recall swap having the default option? I may go ahead and try to re-do this one from scratch and write it all in UUID, though I have heard some problems going that route. But the 5 times I have installed Opensuse (re-installs from trial and error) it has done this set up with the swap partition.

ok rewrote the /etc/fstab file and got to the point were you were showing.

jennifer@Artista3:~> su -l root
Password: 
Artista3:~ # file -s /dev/sdb5
/dev/sdb5: Linux/i386 swap file (new style) 1 (4K pages) size 2456319 pages
Artista3:~ # file -s /dev/sdb* | grep swap
/dev/sdb5: Linux/i386 swap file (new style) 1 (4K pages) size 2456319 pages
Artista3:~ # swapon -s
Filename                                Type            Size    Used    Priority
/dev/sdb5                               partition       9825276 0       -1
Artista3:~ # 

I opened up a web browser (fire fox) started a dvd (kafeine) and have sys monitor up and a terminal trying to put a load on the sys, but swap still shows no activity. So am I still missing something or does it take a heavy load? I was also looking around and found people in Ubuntu forums same problem, no answer…As far as swap not doing anything.

I only have 3gb of memory and usually just delete the swap (at the expense of suspend features) so I think your issue is not the swap not working so much as some memory leak. Try installing ksystemlog it makes reading various log files fairly easy.

I downloaded that program to give it a shot. So far I see nothing that should be alarming. I do not let my computer go into suspend at all. figured swap acted like windows virtual memory. If it does crash again I hope to be able to catch it with this utility. Other then that it has now been staying around 52% used memory, even though only 1.1gb out of 4Gib is actually showing under process. But I read that it sets memory aside for other process to expand or start or something to that affect. I just hate to watch it hit 99% cause that is when it makes me nervous. also seems to be running a bit better after redoing the /etc/fstab file. I re did it all to UUID minus the swap partition i changed to Dev setting. “/dev/sdb5”

Linux memory usage is different then Windows. If there is free unused memory Linux will use this for cache, dropping or adding to the cache as required by process usage. So the kernel tries to always keep the memory busy.

On 2010-08-16 18:52, Artista wrote:
>
> Ok I tried what you said and still no luck. Here is a little better view
> of what is going on.
> ‘[image: http://a.imageshack.us/img838/1404/fstab.th.png]’
> (http://img838.imageshack.us/i/fstab.png/)

I don’t see any error there.

> If I go to the partitioner and look at the fstab options it shows no
> selected options in the fstab file. (as you can see in the picture) I
> am not sure but all the other mount points have “/” in front of them
> other the swap one is that right? I also ran the commands you told me
> too and I keep getting errors.
>
>
> Code:
> --------------------
> jennifer@Artista3:~> sudo mkswap -c L swap /dev/sdb5
> sudo: mkswap: command not found
> --------------------

Sigh… I did not intend you to use sudo. What a fixating you people have with sudo!

Sudo searchs for files in the caller user’s path - not in root’s path. And it is in root’s path, so
it is not found unless you give sudo the full path to the command.

I intended you to use “su -”, and don’t you forget the dash.

> Or do I need to run that as init 3? or can I add the commands through
> the partitioner. When you said I could destroy another partition it made
> me a tad nervous.

Obvously, if you format sdb4 you will destroy something. Better nervous than sorry, no? :wink:

So, I gave you the commands to find out where is the swap, before attempting to reformat it.

> print out for other command…
>
> Code:
> --------------------
> jennifer@Artista3:~> file -s /dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part5
> /dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part5: symbolic link to `…/…/sdb5’
>
> --------------------

So, it is telling you that it is a symlink to sdb5. Then, you should have tested that sdb5.

> Sorry for all the questions, the last Fstab file I did I remade with
> all UUID and the way this one is set up has me all mixed up…I do not
> recall swap having the default option? I may go ahead and try to re-do
> this one from scratch and write it all in UUID, though I have heard some
> problems going that route. But the 5 times I have installed Opensuse
> (re-installs from trial and error) it has done this set up with the swap
> partition.

It is apparently correct, but I told you to run several other commands, that would have told us some
info.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

yeah a few threads back I figured that out about the whole sudo thing LOL. Got use to use sudo to install this and that…figured is what the all knowing god command LOL. After further reading I found out about the su - one >.< I did run those commands that you were talking about on my post a few threads back also and posted the information. Everything checked out fine and everything has been running a a bit better after redoing the fstab file. Plus it is easier for me to read this way.

#/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part5 swap                 swap       defaults              0 0
#UUID=99f7cc7d-ea7c-4419-bf8b-b6f13e87f2fc		swap                 swap       defaults              0 0
/dev/sdb5						swap		swap		defaults			0 0
#/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part1 /                    ext4       acl,user_xattr        1 1
UUID=7c9a2ffd-5519-48a7-87a1-95e32457b4a8		/                    ext4       acl,user_xattr        1 1
#/dev/disk/by-id/ata-WDC_WD6400AAKS-00A7B2_WD-WCASY6559646-part2 /Storage             ntfs-3g    default               0 0
UUID=969449089448EC75 					/Storage             ntfs-3g    defaults               0 0
#/dev/disk/by-id/ata-WDC_WD6400AAKS-00A7B2_WD-WCASY6559646-part1 /Windows7            ntfs-3g    default               0 0
UUID=EE3E73433E73043D					/Windows7            ntfs-3g    defaults               0 0
#/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part3 /home                ext4       acl,user_xattr        1 2
UUID=17024fe7-e444-4df7-83b8-bea542fd979b		/home                ext4       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

I found out that swap did not like being called by UUID so used device.

I greatly appreciate your help in my trials to better understand linux. I am an old 3.1 to windows 7 user and have been trying to escape the clutches of a once lovely operating system to a heavy bog downed peace of filth. Pretty much fed up with windows anymore.

So thank you Carlos E. R., Goga, and others that have been assisting me with my questions. Hopefully one day I can help others out as you all have helped me. :slight_smile:

On 2010-08-17 02:36, Artista wrote:
>
> yeah a few threads back I figured that out about the whole sudo thing
> LOL. Got use to use sudo to install this and that…figured is what the
> all knowing god command LOL. After further reading I found out about the
> su - one >.< I did run those commands that you were talking about on my
> post a few threads back also and posted the information. Everything
> checked out fine and everything has been running a a bit better after
> redoing the fstab file. Plus it is easier for me to read this way.
>
> Code:
> --------------------
> #/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part5 swap swap defaults 0 0
> #UUID=99f7cc7d-ea7c-4419-bf8b-b6f13e87f2fc swap swap defaults 0 0

This second line will not work unless you precede it with the path /dev/disk/by-uuid/, or “UUID=…”.

> /dev/sdb5 swap swap defaults 0 0

And this one can stop working when the device nodes change. Some computers, like mine, change,
depending on the number of external drives present during booting. What one day is sda on the next
is sdf.

My preferred mode is mounting by label (LABEL=mydisk), for which you have to give lables to each
partition.

> I greatly appreciate your help in my trials to better understand linux.
> I am an old 3.1 to windows 7 user and have been trying to escape the
> clutches of a once lovely operating system to a heavy bog downed peace
> of filth. Pretty much fed up with windows anymore.
>
> So thank you Carlos E. R., Goga, and others that have been assisting me
> with my questions. Hopefully one day I can help others out as you all
> have helped me. :slight_smile:

Welcome.

We still do not know if swap is working (swapon -s).

By the way: having swap helps finding a leaking memory problem, as it gives you quite some time
more. WHile the system is trashing, it gets slow and you have time to kill the runaway process.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

I will give the label one a try also, and check the swap. I am getting ready to head to class here in a tad.

Artista3:~ # swapon -s
Filename                                Type            Size    Used    Priority
/dev/sdb5                               partition       9825276 0       -1

is this what it should look like?

I have my main original fstab backed up. So later one will read on on using labels. Trying to grab every aspect of this. Plus may help with class too.

On 2010-08-18 01:06, Artista wrote:
>
> I will give the label one a try also, and check the swap. I am getting
> ready to head to class here in a tad.
>
>
> Code:
> --------------------
> Artista3:~ # swapon -s
> Filename Type Size Used Priority
> /dev/sdb5 partition 9825276 0 -1
>
> --------------------
>
> is this what it should look like?

Yes. You have swap activated.

With 4 GiB RAM you should see little or none of it used, but if you do have a memory leak, you will
have more time to react.

> I have my main original fstab backed up. So later one will read on on
> using labels.

I wrote a sample line on a previous post.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

OK, I’ve come to this thread a bit late, so forgive me for going over some areas that have already been discussed:

Well, that is either going to be a memory leak, or you are using more and more apps that are using more and more memory. if you just start the system up and leave it running for a while, does the memory usage increase?

when it hits 100% it logs me out. I have a tad over 9 Gib in swap, that is how it was set up when I did auto install and let it do the partitions. I have 4Gib memory.

Which should be enough for you to do reasonable amounts of stuff without it ever needing to use swap. But it seems that your memory usage increases and increases and when it gets to the point that it should use swap, it is unable to do so. I’m not clear why this should be, but it isn’t really the primary problem; the primary problem is why the memory usage keeps increasing.

When i first log in it shows about about 800+ MB being used and starts adding more from there. I can run applications for about 6-8 hours before it hits the 100% marker. At first I was blaming this on the video player, but when I put on a play list each song seems like it gets stuck in memory also adding about .02% per song to max memory. This seems to pertain to each application I do…

Is there a way to log memory usage, that tells me what is going into memory

Yes, and you are already doing it. In your screenshot, you have the KDE system monitor running, and if you go to the processes tab, it shows you what is in memory, and if you click on ‘memory’ it will order the processes by memory usage (ascending or descending). This should tell you where to look.

The other thing that you can do is to run the tab which shows you the graph of memory usage with a rather slow timebase and there you should see the memory usage slowly growing (or not).

Note that it could also be that the number of processes is gradually increasing (imagine a process being started, apparently unsuccessfully, and new processes being added every second or minute).

Note also that a more command-line-orintated person would be advising the use of
ps and vmstat, but the gui tools are friendlier, if you are sure that the tools themselves aren’t part of the problem. (Although, if you want something to post in this thread, the command line tools give you something easy to post…in code tags, of course.)

I never see my Swap partition being used at all. I am real green to linux and not sure if I was suppose to turn something on. In the partitioner it shows it being mounted and as swap.

The output from ‘swapon’ seems to show your swap as being enabled, although the practical results seem to show the opposite. To be frank, I don’t know why, but it is the secondary problem.

/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part5 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part1 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-WDC_WD6400AAKS-00A7B2_WD-WCASY6559646-part2 /Storage             ntfs-3g    default               0 0
/dev/disk/by-id/ata-WDC_WD6400AAKS-00A7B2_WD-WCASY6559646-part1 /Windows7            ntfs-3g    default               0 0
/dev/disk/by-id/ata-WDC_WD2500KS-00MJB0_WD-WCANK3670031-part3 /home                ext4       acl,user_xattr        1 2

You have two hard disks, but swap, / and /home are all on the same disk, so it can’t be a disk/cable/interface error, or you’d have all sorts of other problems.