Welcome! If this is your first visit, be sure to check out the FAQ. You will have to register before you can post in the forums. (Be aware the forums do not accept user names with a dash "-") Also, logging in lets you avoid the CAPTCHA verification when searching . Select Articles, Forum, or Blog. Posting in the Forums implies acceptance of the Terms and Conditions.

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 ?

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.

Re: Slowness, intensive hdd activity, high ram usage

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.

Re: Slowness, intensive hdd activity, high ram usage

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.

Code:

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

Code:

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,

Code:

swapoff -a && swapon -a

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

Re: Slowness, intensive hdd activity, high ram usage

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.

Re: Slowness, intensive hdd activity, high ram usage

Originally Posted by robin_listas

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.

Re: Slowness, intensive hdd activity, high ram usage

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 ;-)

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.

Re: Slowness, intensive hdd activity, high ram usage

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 ;-)
>
>
> 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...