how i can do to clean memory cache? opensuse 11.4 - kde 4.6 - 64bit

hello
i wanted to ask you for particular to memory cache,
how i can clean memory cache?

see screenshot:
http://dl.dropbox.com/u/5440392/forum/image10.png

my hardware is:
cpu: Intel(R) Core™ i7 CPU 920 @ 2.67GHz
speed: 1.600,00 MHz
Core: 8
Memory total (RAM): 11,8 GiB
Memor free: 1,5 GiB (+ cache 8,8 GiB )
Swap: 2,0 GiB
SO: Linux 2.6.37.6-0.5-desktop x86_64
Sistema: openSUSE 11.4 (x86_64)
KDE: 4.6.00 (4.6.0) “release 6”

I can’t really see that
But memory cache in Linux is normal. That is, a large portion of your memory is held in cache.

Do you mean that?

echo 3 > /proc/sys/vm/drop_caches

It does clear memory cache. Whether it helps is another question.

On 05/05/2011 05:36 PM, manuel songokuh wrote:
>
> how i can clean memory cache?

leave it alone!

the linux kernel keeps stuff in cache just in case it needs it soon, and
it automatically dumps out the oldest held when something else needs
the memory space…

[unlike windows which always dumps it out, even if it then has to RELOAD
it again one second later—the linux way is MUCH better use of
memory–keep it full, or almost full as much as possible!!]


CAVEAT: http://is.gd/bpoMD
[openSUSE11.3 + KDE4.5.5 + Firefox3.6.17 + Thunderbird3.1.10 via NNTP]
HACK Everything → http://www.youtube.com/watch?v=j5b4CCe9pS8&NR=1

i did try on terminal:
tv:~> echo 3 > /proc/sys/vm/drop_caches
bash: /proc/sys/vm/drop_caches: Permission denied
tv:~> sudo echo 3 > /proc/sys/vm/drop_caches
bash: /proc/sys/vm/drop_caches: Permission denied
how i can clean cache memory?

[QUOTE=DenverD;2335445]On 05/05/2011 05:36 PM, manuel songokuh wrote:
>
> how i can clean memory cache?

leave it alone!

the linux kernel keeps stuff in cache just in case it needs it soon, and
it automatically dumps out the oldest held when something else needs
the memory space…

[unlike windows which always dumps it out, even if it then has to RELOAD
it again one second later—the linux way is MUCH better use of
memory–keep it full, or almost full as much as possible!!]


CAVEAT: C A V E A T
[openSUSE11.3 + KDE4.5.5 + Firefox3.6.17 + Thunderbird3.1.10 via NNTP]
HACK Everything → https://www.youtube.com/watch?v=

ah ok linux s best of windows? i’m wonderfull…but it will be problem when cache is full and linux go will tilt or crash or stress?

:smiley: You have much to learn friend

This is because you are not in the sudo group.

su -c 'echo 3 > /proc/sys/vm/drop_caches'

But it’s not going to get better or be faster, you know. I answered your question but told you that it wouldn’t help… really, you don’t need it.

On 05/05/2011 06:36 PM, manuel songokuh wrote:
>
> but it will be problem
> when cache is full and linux go will tilt or crash or stress?

nope! when it get full it will automatically remove some things from
cache…

again: leave it alone…learn about how the linux kernel manages memory
differently from windows…

or, don’t listen and do as you wish and waste your own time…and,
complicate the kernel’s work…

ymmv


CAVEAT: http://is.gd/bpoMD
[openSUSE11.3 + KDE4.5.5 + Firefox3.6.17 + Thunderbird3.1.10 via NNTP]
HACK Everything → http://www.youtube.com/watch?v=j5b4CCe9pS8&NR=1

On 05/05/2011 11:36 AM, caf4926 wrote:
>
> manuel_songokuh;2335456 Wrote:
>> ah ok linux s best of windows? i’m wonderfull…but it will be problem
>> when cache is full and linux go will tilt or crash or stress?
> :smiley: You have much to learn friend

It will not go tilt. You have to remember that the Windows philosophy is “memory
is not to be wasted”. Linux reworks that to “unused memory is a wasted
resource”. This also the reason is that Windows can happily run with defective
memory in the higher regions, but Linux will not.

If you want to see the benefits of cache, start in the base of some relatively
deep tree and run the command:


time grep -r XXXXXXXXX *

After this returns, immediately rerun the command. The difference in times are
the result of using the cache. As long as the total size of the files included
do not exceed the size of your cache, the reduction will be dramatic.

Searching the network drivers part of the Linux Source tree, my system gets the
following:



First Run               Second
real    0m10.865s               0m0.707s
user    0m0.452s                0m0.172s
sys     0m4.032s                0m0.508s

ok
now i’m understand, i dont use that code on terminal for clean cache but now my opensuse is full cache when i turn on pc opensuse, booting, starting kde and arrive kde but cache is ready full???
see screenshot fresh start opensuse:
http://dl.dropbox.com/u/5440392/forum/schermata3.png

All I see is knotes, some bar chart with no info in it and kcalc

Hahaha, I remember back in the early days of Linux, when it was at 1.x, he came around and gave a talk. At question time somebody asked him: Does it do XYZ properly? (I don’t remember what XYZ was, perhaps it was some problem with multitasking, remember this was days of W98.)

Linus Torvalds’s answer was: Yes, Linux is not Windows.

The audience cheered.

So, if your cache fills up and your computer goes tilt or crash or stress, please go to Linus and ask for your money back. :wink:

On 05/11/2011 09:36 AM, manuel songokuh wrote:
>
> ok
> now i’m understand, i dont use that code on terminal for clean cache
> but now my opensuse is full cache when i turn on pc opensuse, booting,
> starting kde and arrive kde but cache is ready full???
> see screenshot fresh start opensuse:
> [image: http://dl.dropbox.com/u/5440392/forum/schermata3.png]

Why do you think that a full cache is bad? The main usage of cache in Linux is
to save the contents of disk files and directories in fast memory so they can be
reused whenever necessary. Whenever you access a new file and cache is full, the
oldest cache contents are replaced. If a running program needs more memory,
again the oldest contents of the cache are dropped and that chunk of RAM is
given to the program.

The result is that your system is faster with a full cache than it would be with
an empty one.

ok but maybe it’s strange when start kde and opensuse but cache is ready to full for what?
see video clip i did record from phone for to show you to see it ok?
please to download link video and open with VLC:
http://dl.dropbox.com/u/5440392/forum/forum-opensuse-cache.3GP

why cache goes grow up to full cache??

but before never same that cache-full ready when begin kde or opensuse…now it’s diverse… it’s strange???

Run top in a terminal
Show us what is running from there.

Could you try uninstalling ‘preload’, see if that makes any difference

On 05/11/2011 01:06 PM, caf4926 wrote:
>
> Run top in a terminal
> Show us what is running from there.
>
> Could you try uninstalling ‘preload’, see if that makes any difference

That probably won’t make any difference. By the time the system finishes
booting, many hundreds of MB have been read from the disk - all of which have
been cached. Cache should be nearly full by then.

I just wish that there was a way to turn off the disk cache so that the OP could
see how beneficial the Linux way is.

If you didn’t change the default colors, the green memory bar represent IO cache, i.e. disk cache. In my system right after boot there is very little IO cache, but it grows up as you have intensive or prolonged disk access - for example when using a torrent client or playing/streaming video or such. It is NOT normal - at least I’ve never seen - a system boot with all memory already taken for IO cache, unless you have very little memory - say, 512 MB or less - and a memory-hungry desktop - say, KDE 4.
:wink:

Further to the above, I’ve played with cache clearing a while ago but it made no perceptible diference. What work for me in oS 11.3 is

# echo 1 > /proc/sys/vm/drop_caches

as root in a terminal.

Question: Do you really have 12GB RAM?

hello
yes i have 12GB RAM, there is problem for 12GB RAM?

i did try to terminal is clean, works… but i wanted to know why linux does grow up? for what?

i need uninstall preload?