Flushing memory - Suse
This is a discussion on Flushing memory - Suse ; When I boot up I have about 500 meg free memory. After some browsing and
mail/news reading openening and closing browsers I end up with about 47k
free after closing everything. Is there a way to flush out the memory
...
-
Flushing memory
When I boot up I have about 500 meg free memory. After some browsing and
mail/news reading openening and closing browsers I end up with about 47k
free after closing everything. Is there a way to flush out the memory
without rebooting? Something about Firefox and Thunderbird don't clean
up after they shutdown.
--
Blattus Slafaly ? 3
7/8
-
Re: Flushing memory
Blattus Slafaly 0/00 ? ? ? wrote:
> When I boot up I have about 500 meg free memory. After some browsing and
> mail/news reading openening and closing browsers I end up with about 47k
> free after closing everything. Is there a way to flush out the memory
> without rebooting? Something about Firefox and Thunderbird don't clean
> up after they shutdown.
>
>
Wait, I found it. # echo 1 > /proc/sys/vm/drop_caches
Wow, I had 701 meg free after that.
--
Blattus Slafaly ? 3
7/8
-
Re: Flushing memory
Blattus Slafaly 0/00 ? ? ? wrote:
> When I boot up I have about 500 meg free memory. After some browsing and
> mail/news reading openening and closing browsers I end up with about 47k
> free after closing everything. Is there a way to flush out the memory
> without rebooting? Something about Firefox and Thunderbird don't clean
> up after they shutdown.
And what is the problem with that? The fact that there is something in
memory doesn't mean anything. You bought and payed for the memory, so
use it. The fact that things are still there afterwards is a good
thing.
If the memory is nedded for something else, it will clean it. If not
then not.
houghi
--
I do not want life insurance.
I want all people to be genuinely grieving when I die.
houghi
-
Re: Flushing memory
houghi wrote:
> Blattus Slafaly 0/00 ? ? ? wrote:
>> When I boot up I have about 500 meg free memory. After some browsing and
>> mail/news reading openening and closing browsers I end up with about 47k
>> free after closing everything. Is there a way to flush out the memory
>> without rebooting? Something about Firefox and Thunderbird don't clean
>> up after they shutdown.
>
> And what is the problem with that? The fact that there is something in
> memory doesn't mean anything. You bought and payed for the memory, so
> use it. The fact that things are still there afterwards is a good
> thing.
>
> If the memory is nedded for something else, it will clean it. If not
> then not.
>
> houghi
Well that's not entirely true. As I ran more and more things I noticed
that the free memory stayed low and the system began using swap memory
instead of cleaning out the ram. That can slow things down. I suppose it
depends on how smart the program is as to what memory cleaning it will do.
--
Blattus Slafaly ? 3
7/8
-
Re: Flushing memory
Blattus Slafaly 0/00 ? ? ? wrote:
>> If the memory is nedded for something else, it will clean it. If not
>> then not.
>>
>> houghi
>
> Well that's not entirely true. As I ran more and more things I noticed
> that the free memory stayed low and the system began using swap memory
> instead of cleaning out the ram. That can slow things down. I suppose it
> depends on how smart the program is as to what memory cleaning it will do.
Using what program? Also is this something that happens all the time, or
more an academic discusion of something that might sometimes happen, but
does not affect the standard normal everyday user.
If memory is not used, then flushing the momory should not matter,
because it is not used. If you flush memory all the time, then you do
not have enough memory. Flushing does not help it. It will just slow
down the program you flush the memory from.
And yes, some swap might be used as well for each program.
In general the system will select the best method in real world
situations (the extremely odd situation as an obvious exception)
Seriously, it is not worth the time to look into it. Linux knows better
what to do.
houghi
--
I do not want life insurance.
I want all people to be genuinely grieving when I die.
houghi
-
Re: Flushing memory
Blattus Slafaly 0/00 ? ? ? wrote:
>Blattus Slafaly 0/00 ? ? ? wrote:
>> When I boot up I have about 500 meg free memory. After some browsing and
>> mail/news reading openening and closing browsers I end up with about 47k
>> free after closing everything. Is there a way to flush out the memory
>> without rebooting? Something about Firefox and Thunderbird don't clean
>> up after they shutdown.
>>
>>
>Wait, I found it. # echo 1 > /proc/sys/vm/drop_caches
>Wow, I had 701 meg free after that.
Yes, but your machine will run more slowly.
You have made a mistake. As your system runs, memory is used as
a cache for programs, files, etc. Try, for example, to load
Firefox the first time since rebooting. Use it a bit and then
close it. Now reopen it. See how much faster it is the second
time?
If a program you run needs more memory, the operating system will
flush memory as needed. It will either dump what already exists
on disk or, if need be, swap memory out, though this should almost
never happen if you have a reasonable amount of memory installed.
Look at it this way: why should all that beautiful memory go to
waste. Consider how much faster memory access is than disk access.
ALL modern operating systems use memory as a cache for the same
reason.
--
--- Paul J. Gans
-
Re: Flushing memory
On Wed, 19 Mar 2008, Blattus Slafaly 0/00 ? ? ? wrote:-
>Well that's not entirely true. As I ran more and more things I noticed
>that the free memory stayed low and the system began using swap memory
>instead of cleaning out the ram.
In that case, the programs that were using the memory were still open
and hadn't released memory after they'd finished with it.
>That can slow things down.
You're telling me. I have one system that has 1GB of memory. Due to the
applications it's running normally (bind, mysql, etc.), and the fact
it's busy rescaling[0] virtually all the wallpapers houghi included in
his 10GB wallpaper pack, it's presently using 1.5GiB of swap. To make
matters worse I'm also using KDE (which in houghi sees as evil
) and
konqueror is quite sluggish at refreshing the directories, and KDE
itself is also sluggish at changing from one desktop to another.
>I suppose it depends on how smart the program is as to what memory
>cleaning it will do.
Some programs aren't very nice. They will often retain memory they've
used just in case they want to reuse it again in the future. Others
release the memory as soon as they are done with it. Still others are
mixed. And then there are the rare ones that forget they have allocated
memory and keep requesting more. These ones are the really nasty ones
because, until their memory leaks are fixed, their memory usage tends to
grow until either the user terminates the program, or they fall over
because the kernel denies a request for more memory.
[0] And splitting them up into directories using the names of the
persons.
Regards,
David Bolt
--
www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0a1
SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit
RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC |RISC OS 3.11
-
Re: Flushing memory
Blattus Slafaly 0/00 ? ? ? wrote:
> When I boot up I have about 500 meg free memory. After some browsing and
> mail/news reading openening and closing browsers I end up with about 47k
> free after closing everything. Is there a way to flush out the memory
> without rebooting? Something about Firefox and Thunderbird don't clean
> up after they shutdown.
If you do "free -m" in a console, you'll get something like this:
total used free shared buffers cached
Mem: 749 741 7 0 6 651
-/+ buffers/cache: 83 665
Swap: 2000 2 1997
It says "used 741" (MB). However, what you really have is in the next
line that says "-/+ buffers/cache". As you can see, in reality I have
only 83MB used with 665MB free.
You don't need to "flush the memory" or anything like that. In fact, if
you do, this will delete the buffers/cache and make your system slower.
Memory management is different from what MS Windows does, so the
notion of "free memory" is different too; there is "needed" memory,
"used" memory and "free" memory, not just "used" and "feee".
Btw, the above machine is a 100 users server that has been running for
20 days without reboot now 
-
Re: Flushing memory
David Bolt wrote:
> You're telling me. I have one system that has 1GB of memory. Due to the
> applications it's running normally (bind, mysql, etc.), and the fact
> it's busy rescaling[0] virtually all the wallpapers houghi included in
> his 10GB wallpaper pack, it's presently using 1.5GiB of swap. To make
> matters worse I'm also using KDE (which in houghi sees as evil
) and
> konqueror is quite sluggish at refreshing the directories, and KDE
> itself is also sluggish at changing from one desktop to another.
Don't use KDE and your 10GB would fly. :-D
In all seriousness, I have 1GB as well and have no issues going from one
desktop to another. Never in any of the years I do have my system. Not
on Linux anyway. On Windows I have something that simulates multiple
desktops and it is unusable.
Oh and with Linux, I mean also mean KDE, evil GNOMEa and delightfull
Windowmaker.
houghi
--
I do not want life insurance.
I want all people to be genuinely grieving when I die.
houghi
-
Re: Flushing memory
houghi wrote:
> David Bolt wrote:
>> You're telling me. I have one system that has 1GB of memory. Due to the
>> applications it's running normally (bind, mysql, etc.), and the fact
>> it's busy rescaling[0] virtually all the wallpapers houghi included in
>> his 10GB wallpaper pack, it's presently using 1.5GiB of swap. To make
>> matters worse I'm also using KDE (which in houghi sees as evil
) and
>> konqueror is quite sluggish at refreshing the directories, and KDE
>> itself is also sluggish at changing from one desktop to another.
>
> Don't use KDE and your 10GB would fly. :-D
>
> In all seriousness, I have 1GB as well and have no issues going from one
> desktop to another. Never in any of the years I do have my system. Not
> on Linux anyway. On Windows I have something that simulates multiple
> desktops and it is unusable.
>
> Oh and with Linux, I mean also mean KDE, evil GNOMEa and delightfull
> Windowmaker.
KDE doesn't really seem that memory hungry to me. CPU hungry maybe, but
with a Core 2 Duo E6600 I can't really tell :P After booting to
runlevel 5 into KDE, memory usage is 106MB. Runlevel 3's initial usage
is 74MB.
With KDevelop, Amarok, Opera (does that count?) loaded, and using the
Crystal decorations Curve style with all eye candy enabled, RAM usage is
about 350MB. I think that's very good, and this is an x86-64 system
(uses a bit more RAM than the 32-bit version). :P
PS:
Kerry Beagle is disabled (uninstalled). I think RAM usage would be
about 400MB with that ;P
-
Re: Flushing memory
On Wed, 19 Mar 2008, houghi wrote:-
>Don't use KDE and your 10GB would fly. :-D
Hey, I wish it was 10GB. I suppose I could add an extra 5GB of swap to
make up for the lack of real memory, but I don't think it would do very
much at all.
>In all seriousness, I have 1GB as well and have no issues going from one
>desktop to another.
The reason for the sluggishness is purely down to having several windows
open, and each one is being updated as files and directories are created
and/or deleted rapidly. If it wasn't for all the file conversions going
on in the background, or rather not since I didn't add a "nice -n 19"
before calling convert, I probably wouldn't notice it either.
Looking at top running in a remote console, I can see that konqueror
keeps jumping to 90+% usage, which on its own shouldn't make much
difference, but with monitoring the contents of various directories, it
does.
>Never in any of the years I do have my system. Not
>on Linux anyway. On Windows I have something that simulates multiple
>desktops and it is unusable.
I've not tried multiple desktops on Windows. With one it can be very
sluggish, and I had a feeling adding more would just make matters worse.
Regards,
David Bolt
--
www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0a1
SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit
RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC |RISC OS 3.11
-
Re: Flushing memory
On Wed, 19 Mar 2008, Nikos Chantziaras wrote:-
>KDE doesn't really seem that memory hungry to me. CPU hungry maybe,
>but with a Core 2 Duo E6600 I can't really tell :P
It can be both, depending on what's going on.
>After booting to runlevel 5 into KDE, memory usage is 106MB. Runlevel
>3's initial usage is 74MB.
Haven't tried that, but my memory usage will be close to 1GB even
without starting up X. Bind on it's own uses 700MB due to the size of
the zone files it serves up[0]. MySQL can be a processor hog and, with
the image rescaling going on, it all combined to make the desktop
sluggish. Now that the automatic rescaling is finished, it's back to its
normal not-sluggish self.
>With KDevelop, Amarok, Opera (does that count?) loaded, and using the
>Crystal decorations Curve style with all eye candy enabled, RAM usage
>is about 350MB. I think that's very good, and this is an x86-64 system
>(uses a bit more RAM than the 32-bit version). :P
Having both 32 and 64 bit systems in use, can honestly say I've not
really noticed that much of memory difference between them.
>PS:
>Kerry Beagle is disabled (uninstalled). I think RAM usage would be
>about 400MB with that ;P
You missing a few hundred MB there? 
[0] 8 different local DNSBLs, each with different listing and expiry
times criteria, almost all of which is done automatically.
Regards,
David Bolt
--
www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0a1
SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit
RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC |RISC OS 3.11
-
Re: Flushing memory
David Bolt wrote:
>> PS:
>> Kerry Beagle is disabled (uninstalled). I think RAM usage would be
>> about 400MB with that ;P
>
> You missing a few hundred MB there? 
I forgot to put "more" between "400MB" and "with" 
-
Re: Flushing memory
On Wed, 19 Mar 2008, Nikos Chantziaras wrote:-
>David Bolt wrote:
>>> PS:
>>> Kerry Beagle is disabled (uninstalled). I think RAM usage would be
>>> about 400MB with that ;P
>> You missing a few hundred MB there? 
>
>I forgot to put "more" between "400MB" and "with" 
Thinking about beagle, I'm glad I didn't have it installed while doing
the graphics conversion. I'd have hated to see just how much it would
have slowed down the conversion process. As it was, it took about 3 days
to complete the process[0]. So, at the end of it all, I now have just
over 120,000 images which is the result of rescaling about 40,000 of the
images to 1024x768, 800x600, 1600x1200 and 1920x1440, copying them into
directories taken from the file names as the process crept along. Now
all I need to do is to create the source archives, modify a spec file
template[1], and start building RPM source packages. Should only take up
about 32GB for the source archives[2], and the same again for the source
RPMs, but should also be done very much quicker.
[0] Could have been done in less than 2 but I kept interfering to tweak
the script a touch.
[1] Just to make sure the 1920x1440 images in a separate binary package
from the 800x600 images.
[2] Yes, that 10GiB has grown to over three times that space.
Regards,
David Bolt
--
www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0a1
SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit
RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC |RISC OS 3.11
-
Re: Flushing memory
On Wed, 19 Mar 2008 10:49:34 -0400, Blattus Slafaly 0/00 ? ? ? wrote:
> houghi wrote:
>> Blattus Slafaly 0/00 ? ? ? wrote:
>>> When I boot up I have about 500 meg free memory. After some browsing
>>> and mail/news reading openening and closing browsers I end up with
>>> about 47k free after closing everything. Is there a way to flush out
>>> the memory without rebooting? Something about Firefox and Thunderbird
>>> don't clean up after they shutdown.
>>
>> And what is the problem with that? The fact that there is something in
>> memory doesn't mean anything. You bought and payed for the memory, so
>> use it. The fact that things are still there afterwards is a good
>> thing.
>>
>> If the memory is nedded for something else, it will clean it. If not
>> then not.
>>
>> houghi
>
> Well that's not entirely true. As I ran more and more things I noticed
> that the free memory stayed low and the system began using swap memory
> instead of cleaning out the ram. That can slow things down. I suppose it
> depends on how smart the program is as to what memory cleaning it will
> do.
As I understand it, what you have done only clears the cache - not any
memory unfreed by processes. It should have no effect on swapping.
-
Re: Flushing memory
Nikos Chantziaras wrote:
>Blattus Slafaly 0/00 ? ? ? wrote:
>> When I boot up I have about 500 meg free memory. After some browsing and
>> mail/news reading openening and closing browsers I end up with about 47k
>> free after closing everything. Is there a way to flush out the memory
>> without rebooting? Something about Firefox and Thunderbird don't clean
>> up after they shutdown.
>If you do "free -m" in a console, you'll get something like this:
> total used free shared buffers cached
>Mem: 749 741 7 0 6 651
>-/+ buffers/cache: 83 665
>Swap: 2000 2 1997
>It says "used 741" (MB). However, what you really have is in the next
>line that says "-/+ buffers/cache". As you can see, in reality I have
>only 83MB used with 665MB free.
>You don't need to "flush the memory" or anything like that. In fact, if
>you do, this will delete the buffers/cache and make your system slower.
> Memory management is different from what MS Windows does, so the
>notion of "free memory" is different too; there is "needed" memory,
>"used" memory and "free" memory, not just "used" and "feee".
>Btw, the above machine is a 100 users server that has been running for
>20 days without reboot now 
That's an interesting number. Usually the only time I reboot is
when a kernel patch (or new kernel) is issued. I have run over a
year without a reboot.
Once in a while something becomes wedged. Recently I had a problem
with the display -- likely an obscure X issue -- and needed a reboot
to fix everything.
Of course I've been up now for only four days. This machine is in
my office and the *(%$# idiots who run this place needed to turn
the power off all day Sunday. I was sure my UPSS would not carry
it that long...
--
--- Paul J. Gans
-
Re: Flushing memory
Nikos Chantziaras wrote:
>houghi wrote:
>> David Bolt wrote:
>>> You're telling me. I have one system that has 1GB of memory. Due to the
>>> applications it's running normally (bind, mysql, etc.), and the fact
>>> it's busy rescaling[0] virtually all the wallpapers houghi included in
>>> his 10GB wallpaper pack, it's presently using 1.5GiB of swap. To make
>>> matters worse I'm also using KDE (which in houghi sees as evil
) and
>>> konqueror is quite sluggish at refreshing the directories, and KDE
>>> itself is also sluggish at changing from one desktop to another.
>>
>> Don't use KDE and your 10GB would fly. :-D
>>
>> In all seriousness, I have 1GB as well and have no issues going from one
>> desktop to another. Never in any of the years I do have my system. Not
>> on Linux anyway. On Windows I have something that simulates multiple
>> desktops and it is unusable.
>>
>> Oh and with Linux, I mean also mean KDE, evil GNOMEa and delightfull
>> Windowmaker.
>KDE doesn't really seem that memory hungry to me. CPU hungry maybe, but
>with a Core 2 Duo E6600 I can't really tell :P After booting to
>runlevel 5 into KDE, memory usage is 106MB. Runlevel 3's initial usage
>is 74MB.
>With KDevelop, Amarok, Opera (does that count?) loaded, and using the
>Crystal decorations Curve style with all eye candy enabled, RAM usage is
>about 350MB. I think that's very good, and this is an x86-64 system
>(uses a bit more RAM than the 32-bit version). :P
>PS:
>Kerry Beagle is disabled (uninstalled). I think RAM usage would be
>about 400MB with that ;P
Amen.
The trouble with multiple gods is that folks argue over which ones
are the most important. Back in the Good Old Days (tm) when we all
ran DOS, we did not have these arguments...
--
--- Paul J. Gans
-
Re: Flushing memory
On Thu, 20 Mar 2008, Paul J Gans wrote:-
>The trouble with multiple gods is that folks argue over which ones
>are the most important. Back in the Good Old Days (tm) when we all
>ran DOS, we did not have these arguments...
DOS ran? I thought it moved more like it was taking a gentle stroll.
Regards,
David Bolt
--
www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0a1
SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit
RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC |RISC OS 3.11
-
Re: Flushing memory
Paul J Gans wrote:
> The trouble with multiple gods is that folks argue over which ones
> are the most important. Back in the Good Old Days (tm) when we all
> ran DOS, we did not have these arguments...
MS-DOS, PC-DOS or DR-DOS and why?
houghi
--
We all came out to Montreux Frank Zappa and the Mothers
On the Lake Geneva shoreline Were at the best place around
To make records with a mobile But some stupid with a flare gun
We didn't have much time Burned the place to the ground
-
Re: Flushing memory
On 2008-03-20, houghi wrote:
> Paul J Gans wrote:
>> The trouble with multiple gods is that folks argue over which ones
>> are the most important. Back in the Good Old Days (tm) when we all
>> ran DOS, we did not have these arguments...
>
> MS-DOS, PC-DOS or DR-DOS and why?
>
> houghi
I ran MS-DOS and DR-Dos. Why? Can't remember.
I'm sure I'd find the installation floppies of them still if I went
through my drawers.
Leisure Suit Larry probably, too 
Vahis
--
http://waxborg.servepics.com
"The only thing more expensive than training is the lack of it"
Henry Ford