Terrible problem!

I'm experiencing a terrible problem at my home computer.
For example: I start using Netscape, it's fast... Then a few clicks later, it starts to get slower and slower, disk activity starts like mad, up to the point when it renders the machine almost inopperable, then I have to do a CTRL+ATL+BACKSPACE to kill X and get back to the console then the infamous disk activity will stop. I don't know, it's strange, it's just like something starts eating all the memory, then goes to the swap, etc.... Funny is that I turned my swap partition off and it didn't help either. The same experience happens with The Gimp. I don't know about other programs, these two are nearly the only ones I use.

I'm almost thinking about formatting and re-installing... I need a quick solution and I don't know how much time it would take to hunt the bug between the mess...

Help!
LVL 2
EatEmAndSmileAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mixerfix122699Commented:
You do not say how much physical memory you have, but this sounds like you have a severe memory problem - you do not have enough.

how much memory _do_ you have and does linux see all of it?
0
j2Commented:
"Funny is that I turned my swap partition off and it didn't help either." -- that will make everything worse if the problem is lack of physical memory.
0
EatEmAndSmileAuthor Commented:
Case is: It worked just fine sometime ago. I've got 32Mb of RAM, there's no excuse to be slow with all that memory.

 Wheter it see or not all the memory is something I've never thought of. Is there a command to see how much memory I have?

"that will make everything worse if the problem is lack of physical memory." - No, it would avoid Linux using disk swap in case it was a bug.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

j2Commented:
32Mbyte is nothing really.

" No, it would avoid Linux using disk swap in case it was a bug." - But the constant context switching would kill the CPU.
0
EatEmAndSmileAuthor Commented:
32 Mb of RAM for a home computer in a time when RAM is so expensive is quite something.

"But the constant context switching would kill the CPU" - but not the hard drive. Once the disk activity problem is solved I could turn the swap on again, I was just killing possibilities.
0
mixerfix122699Commented:
You are actually running netscape in 32MB RAM! To quote Sir Humphrey, "brave decision, Prime Minister."

Netscape is a memory hog... Look at this:

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
marc     11214  1.5  8.0 27184 20572 ?       S    15:39   0:35 /usr/lib/netscape
root       307  0.1  5.3 65972 13660 ?       S    Feb01   2:54 /usr/bin/X11/X

That's 20MB resident for netscape and 13MB resident for X11, with two netscape windows open and no girlie pix on screen.

I sometimes cause netscape to swamp the machine and I have 256MB...

0
j2Commented:
"but not the harddrives" Uhm, when the system runs out of RAM, and has no swap, and tries to allocate more RAM, you will get a totally unresponsive system in most cases. If you DO have swap, the system will remain responsive even with the I/O race in progress.


expensive? 128Mbyte is not even USD120 here?

The only machine with under 128Mbyte i run at home is an old RS/6000, and my "main workstation" has 640Mbyte  but thats besides the point. :)
0
mixerfix122699Commented:
And, if by any chance you're using an IDE disk, the constant swapping would not only context-switch-kill the CPU, it would also disk-io-management-kill the CPU.
0
j2Commented:
and then we add the fact that NS is prone to memory leaks, and you can easily see it allocate 140Mbyte of memory.. Good point about the disk-io misterfix, i just havent used IDE for a loong time.
0
EatEmAndSmileAuthor Commented:
What's NS? Ok... So what are your suggestions? How do I see how much memory it allocates? Again: Is there a command to see the total/free memory?
0
j2Commented:
NS = Netscape

How to see memory = 'free' (total)

To see if for a certain process you could use top.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mixerfix122699Commented:
NS is netscape.

`free` will show you the memory usage.


glamis[marc]: free
             total       used       free     shared    buffers     cached
Mem:        257552     199848      57704      50364      82904      37984
-/+ buffers/cache:      78960     178592
Swap:       790296       3972     786324

As for concrete suggestions... I am phrasing this as a comment and not an answer but you have TWO courses of action:

1. Get much more memory
2. Use Lynx

If you decide to award points, they should be dividied between me and j2.
0
mixerfix122699Commented:
if you also want to see a per-process breakdown of memory usage, use

`ps u`

balk:/amd/balk/home/marc$ ps u
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
marc       431  0.0  0.0  1988    0 pts/0    SW   Feb01   0:00 [bash]
marc       936  0.0  0.4  1996 1268 pts/2    S    Feb01   0:00 -bash
marc       939  0.0  0.5  2012 1308 pts/3    S    Feb01   0:00 -bash
marc      1260  0.0  0.3  1788  896 pts/2    S    Feb01   0:00 telnet halder
marc      1285  0.0  0.4  1996 1264 pts/5    S    Feb01   0:00 -bash
marc      1286  0.0  0.3  1784  892 pts/5    S    Feb01   0:00 telnet halder

The important bits are VSZ and RSS. VSZ is what the program wants and RSS is what is actual resident...

0
EatEmAndSmileAuthor Commented:
Ok, thanks for the tip on the "free" command. I just found out that I can see how much memory Linux detects on boot-up and with top, also.

 But I won't get more memory nor change to Lynx. I'm right now using a Pentium 100 machine with 32 Mb of RAM, running Netscape. It runs just fine. And that machine used to run fine too, until yesterday, when the problem happened.

 Sorry, I can't divide the points between you. I'll award j2 as he mentioned "free" first.

 Thanks for all of your input.
0
EatEmAndSmileAuthor Commented:
You didn't solve my problem, but the "free" command will surely be a good contribution on my Linux dictionary.
0
mixerfix122699Commented:
No problem, I do not grudge the points, I rather thought my answer will come in first and thought to credit j2....

0
EatEmAndSmileAuthor Commented:
Just to let you know... I've just solved the problem. My swap partition wasn't correctly set up. It was once a Linux Native partition, that I've freed and then turned it to a Linux Swap partition. I've added it to the /etc/fstab and the machine really worked fine for several weeks, until yesterday. Note that I've missed the step of formatting it as a swap partition with mkswap. I guess Linux handled it just fine for all this time but maybe due to the difference in the filesystem something unexpected happened and then... Blows... I've then formatted it correctly with mkswap -c /dev/hda2 and re-enabled it. The machine is flying again... I could finally finish my work with The Gimp.

 Thanks for the input.
0
j2Commented:
Out of curiosity, how much does your machine swap with gimt an NS running? Gotta be a ton.
0
EatEmAndSmileAuthor Commented:
bash-2.03$ free
             total       used       free     shared    buffers     cached
Mem:         29952      29460        492      17768        664      12472
-/+ buffers/cache:      16324      13628
Swap:       128516       1200     127316
bash-2.03$

 Not that much, I'd say... Note that right now I'm using Netscape open with the Messenger, from where I've got the EE notification and another Navigator window with the EE website. The HD is stopped all the time while browsing, no swapping slowdowns. The same situation goes when I'm browsing on multiple windows too.
0
j2Commented:
ah, but with only 664k in buffers, your system is still pretty much "maxed out" since everything has to be 're-fetched'
0
EatEmAndSmileAuthor Commented:
Well, now you're expecting too much from me. :) What do you mean with that? I really don't know what the "buffers" section represent in a practical understanding.
0
j2Commented:
here is the stats from my firewall / router / mail / web / ssh / fax server at home

[j2@animal]$free
             total       used       free     shared    buffers     cached
Mem:        128012     124172       3840      22500      43900      48664
-/+ buffers/cache:      31608      96404
Swap:       136512       5736     130776
[j2@animal]$

read it like this

"I have 128Mbyte of physical RAM. Of those 124Mbyte are used. 4Mbyte is unallocated. 43Mbyte is in buffers and 48Mbyte is in the diskcache".

Lets say an application tries to allocate 16Mbyte of RAM, the kernel will now transfer 16Mbyte from the buffers and allocate from there. The amout of "free" mem will continue to be between 3-4Mbyte regardless of how much RAM you have. (Since it is more usefull to have it as buffers / cache then to do nothing with it). If it cannot allocate space from the buffers, it will try to reduce the size of the cache to do the same, but that will cost you disk I/O.
0
j2Commented:
the reason my system uses swap at all is becuase it seem to have swapped out some of the httpd processes since they have not been used in ages, guess i should reduce the "minium free processes" of apache.
0
j2Commented:
"The amout of "free" mem will continue to be between 3-4Mbyte regardless of how much RAM you have." should of cource be "The amout of free ram will contiune to be pretty low, sinc the mem is more useful as buffers / cache"
0
EatEmAndSmileAuthor Commented:
Hmmm... I understand now. Yes, I must run in the limit of what I could do with my memory.

 I'd love to upgrade to 128Mb, but considering the price of memory chips... No way by now.

 I'm more concerned on upgrading my video board right now. It's a Trident 9680. Very poor video card. I'm thinking about a Voodoo 3 2000 PCI, because it's a dual board. Works both as a 2D card as a 3D card.
0
j2Commented:
Uhm, what i have read they do not recommend running the current V3 X-server on a system with less then 64MByte available RAM tho :-/
0
lurwasCommented:
Check out:
www.operasoft.com
Soon...the excellent opera-web browser will be available under Linux (in technology preview phase), it will definitly run better than Netscape!

(Netscape/Internet Explorer doesn't have a check for allocating memory that doesn't exist, which results in crashes when you run out of memory, which is easy with these memory intensive browsers, if you don't beleiver me, start one instance of a browser, browse to a web page with lots of pictures, create instances of this browser until your system crashes...if you have nothing better to do....;)
0
j2Commented:
tried that with IE4 and IE5 (running on NT) I do not see that problem, i just get the "Your system is running low of virtual memory" and it refuse to spawn another instance.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.