Slowness, intensive hdd activity, high ram usage

Hi guys,
I’m not sure if this is the right place to post this topic but…

Please help me out figuring out the cause of my PC running very slow sometimes and taking up huge amounts or RAM, immediately associated with intensive hdd activity ( I can actually hear it ).

First, my workstation is comprised of:
Athlon X2 240 running at 3.0 Ghz
4GB DDR3 1333
160GB SATA II
openSUSE 12.2 X64, EXT4 fs

I experience high RAM usage when opening PDFs for example, a 30MB PDF is making Ocular using up to 1.5GB of RAM and I can’t scroll the PDFs pages wthout locking up the PC and having to either kill the process or wait several minutes to catch its breath. I open up Firefox on 9gag and that also takes up over 1GB of ram and scrolling is not smooth. Meanwhile I notice high hdd activity ( swap ? ). Now I know 4GB of RAM is not rocket performance but I cannot read PDFs by scrolling them, I have to wait for each page to load up, and if I force a scroll it causes the whole session to lock up and struggle, even the mouse pointer goes haywire.
I did a check on my HDD and it shows healty. Could this be a swap configuration error or is there a “checklist” of things for me to check in finding the issue ?

Thank You !

On 2013-09-10 01:36, robertot5 wrote:
>
> Hi guys,
> I’m not sure if this is the right place to post this topic but…
>
> Please help me out figuring out the cause of my PC running very slow
> sometimes and taking up huge amounts or RAM, immediately associated with
> intensive hdd activity ( I can actually hear it ).
>
> First, my workstation is comprised of:
> Athlon X2 240 running at 3.0 Ghz
> 4GB DDR3 1333
> 160GB SATA II
> openSUSE 12.2 X64, EXT4 fs

Leave a terminal running (xterm, for example, it is small), and it it
run “top”, which displays running tasks. Press uppercase “M” to sort by
memory, then continue with

> I experience high RAM usage when opening PDFs for example, a 30MB PDF is
> making Ocular using up to 1.5GB of RAM and I can’t scroll the PDFs pages
> wthout locking up the PC and having to either kill the process or wait
> several minutes to catch its breath.

Does it happen with any PDF, or just with some?

I have a PDF sized 100 MB, with a really huge photo in six pages. With
evince, it takes a bit less than 1.5 GB to display. It is reasonably
fast. I have 8 GiB, not that much (I have several big apps loaded).
Sometimes I use another 3GB in swap.

Okular takes about 650M only, it is just a trifle slower.

Acroread, despite its fame, takes only 250 MB, and it is not slow.

> I open up Firefox on 9gag and that
> also takes up over 1GB of ram and scrolling is not smooth.

FF takes a lot of RAM, but I find it reasonable fast. It is my internet
which is slow :-}

> Meanwhile I
> notice high hdd activity ( swap ? ). Now I know 4GB of RAM is not rocket
> performance but I cannot read PDFs by scrolling them, I have to wait for
> each page to load up, and if I force a scroll it causes the whole
> session to lock up and struggle, even the mouse pointer goes haywire.
> I did a check on my HDD and it shows healty. Could this be a swap
> configuration error or is there a “checklist” of things for me to check
> in finding the issue ?

Using swap when “needed” is normal. The thing is finding what are you
running normally that takes so much ram. With 4GB you should be able to
do those things, unless the rest of your system is using a lot already.

Copy here the top 5 lines of the “top” display, it might show something.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

You must have other things running. Until a month ago I run openSUSE 12.2 with KDE in 1 Gb. Loading new taks (starting a program) took some time and frantic disk access. Thus I decided that swap was involved. I increased memeory to 2 Gb and it all is running fine now. No problem looking into PDFs at all. So IMHO, you having 4 Gb must have somthing else eating resources.

Although PDFs and Ocular almost certainly isn’t the full picture,

You should know that there were major architectural improvements with 12.3 which moved practically all run-time storage into RAM and off the disk.

So, regardless of the true and complete nature of your problem, it’s almost certain that upgrading to 12.3 would make a major impact in how your system utilizes resources and reduces disk use.

TSU

Here’s a couple of suggestions for your current situation…

Run “free” as a starting point to understand your memory usage, and also provide a baseline before attempting any remedies.

free

The following command will clear your memory buffers and cache without rebooting. This can be useful for instance if you have been running some heavy, intensive programs and then close them and want to do something else that is heavy and intensive. The old cached memory would never be useful again with the new programs you’re running so forcibly clearing them would be good practice

sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"

The above command usually does a good job of “clearing the decks” for new and different heavy use, the following can also be run to push the contents of swap back into RAM. Note that the command doesn’t remove the swap contents, short of executing a time-consuming delete/re-create of the swap that can’t be done (AFAIK). But, if you’ve got room in RAM and want to move stuff out of “slow” swap,

swapoff -a && swapon -a

You can now run “free” again (or earlier) to view the changes to your available and committed memory resources.

HTH,
TSU

On 2013-09-10 18:06, tsu2 wrote:

> the following can also be run to push the
> contents of swap back into RAM. Note that the command doesn’t remove the
> swap contents, short of executing a time-consuming delete/re-create of
> the swap that can’t be done (AFAIK). But, if you’ve got room in RAM and
> want to move stuff out of “slow” swap,

Don’t do that. Your system will be slower.
If you don’t believe me, measure speed.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

All depends on the swap content. If it’s usable, then you should be faster. But if it’s “dead” then your system will work to push it back to disk.

TSU

On 2013-09-10 23:06, tsu2 wrote:
>
> robin_listas;2583970 Wrote:
>> On 2013-09-10 18:06, tsu2 wrote:
>>
>>> the following can also be run to push the
>>> contents of swap back into RAM. Note that the command doesn’t remove the
>>> swap contents, short of executing a time-consuming delete/re-create of
>>> the swap that can’t be done (AFAIK). But, if you’ve got room in RAM and
>>> want to move stuff out of “slow” swap,
>>
>> Don’t do that. Your system will be slower.
>> If you don’t believe me, measure speed.

> All depends on the swap content. If it’s usable, then you should be
> faster. But if it’s “dead” then your system will work to push it back to
> disk.

No, forcing the contents of swap to go to ram makes the system slower in
any case.

Think: on a normal computer, of nowdays, everything in swap is something
that is not needed. Not needed for seconds, maybe minutes, hours, or
even days. It makes no sense to force into ram something you do not need
because you are not using it now.

When you do that swap off command, watch the amount of ram used for
buffers, cache, and free; you will see it correspondingly diminish - and
that makes filesystem operation slower. There is actually LESS memory
available for operations that do need ram.

Let the system claim the contents of swap when it really needs it. It
will do it more efficiently than any human :wink:

Think of it this way:

  • A system with 8 GiB of RAM will be faster than another with 4 GiB of RAM.
  • A system with 4 GiB of RAM and no swap will be slower than another
    with 4 GiB of RAM and 4 GiB of swap.

Which is contrary to what many people think.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Carlos E. R. wrote:

> On 2013-09-10 23:06, tsu2 wrote:
>>
>> robin_listas;2583970 Wrote:
>>> On 2013-09-10 18:06, tsu2 wrote:
>>>
>>>> the following can also be run to push the
>>>> contents of swap back into RAM. Note that the command doesn’t remove
>>>> the swap contents, short of executing a time-consuming delete/re-create
>>>> of the swap that can’t be done (AFAIK). But, if you’ve got room in RAM
>>>> and want to move stuff out of “slow” swap,
>>>
>>> Don’t do that. Your system will be slower.
>>> If you don’t believe me, measure speed.
>
>> All depends on the swap content. If it’s usable, then you should be
>> faster. But if it’s “dead” then your system will work to push it back to
>> disk.
>
> No, forcing the contents of swap to go to ram makes the system slower in
> any case.
>
> Think: on a normal computer, of nowdays, everything in swap is something
> that is not needed. Not needed for seconds, maybe minutes, hours, or
> even days. It makes no sense to force into ram something you do not need
> because you are not using it now.
>
> When you do that swap off command, watch the amount of ram used for
> buffers, cache, and free; you will see it correspondingly diminish - and
> that makes filesystem operation slower. There is actually LESS memory
> available for operations that do need ram.
>
> Let the system claim the contents of swap when it really needs it. It
> will do it more efficiently than any human :wink:
>
>
> Think of it this way:
>
> * A system with 8 GiB of RAM will be faster than another with 4 GiB of
> RAM. * A system with 4 GiB of RAM and no swap will be slower than another
> with 4 GiB of RAM and 4 GiB of swap.
>
> Which is contrary to what many people think.
>

Finally back on line and this sounds familiar - I was getting clobbered with
12GB of RAM. When I finally tracked it down, the Nvidia driver was leaking
memory in a big way. I still don’t see what triggers this as the system
runs like a charm - no memory issues - for several days. Then something
bites the Nvidia driver and it gobbles up something like 10GB of RAM over
the course of 5-6 hours.

Look real hard at the memory usage. I run ksysguard as root and watch the
memory. It shows up as belonging to xorg but the breakdown tracks it to the
Nvidia stuff. I’m just now getting the things I broke switching to the
nuveau driver - but that’s another commedy of errors…


Will Honea
whonea@yahoo.com

On 2013-09-11 07:08, Will Honea wrote:
> Then something
> bites the Nvidia driver and it gobbles up something like 10GB of RAM over
> the course of 5-6 hours.

That’s nasty.

For me, the nouveau driver just works (because I don’t normally use 3D).
When I do, it is a real pain to switch back and forth.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Carlos E. R. wrote:

> That’s nasty.
>
> For me, the nouveau driver just works (because I don’t normally use 3D).
> When I do, it is a real pain to switch back and forth.
>

I still use my backup machine a lot and the old Nvidia 6100 video chip (and
some associated hardware/APCI oddities) make nouveau a non-starter so I have
been sticking with the native Nvidia drivers on both the backup and main
machine, at least until this popped up. It took me a full day of screwing
around between the two machine to clean up the mess caused by changing
drivers! At least I confirmed that the latest version of nouveau finally
fixes the irq dance that messed up the old Lenovo box with the old Nvidia
chip.


Will Honea