linux memory thingy

T

Testin da Cable

Guest
mmm since I got my new system running [amd 1800+/512DDR2100/epox mobo as opposed to old 900Mhz amd tbird/512megs133/abit mobo] I've noticed something that I can't really explain.
with the 'old' system, linux would cache just about everything it could after an hour or so leaving me with little 'unused' memory.
this is imo behaving as it should do, and no cause for worry at all. with the new system, linux seems to want to leave a chunk of memory 'free' at all times, caching only 200 megs or so.
because I cheated and didn't reinstall the os, this sudden change in behavior puzzles me. can anyone come up with an explaination?
 
E

Embattle

Guest
Format, or what ever its called in Linux world ;)

Strange the way it caches it all, for example I sit here with more than 3/4 of my DDR memory free. It does fully support DDR memory?
 
T

Testin da Cable

Guest
yeah it fully supports it duh Embattle ;)
not having something in ram is wasting resources dude. a good server caches/buffers everything, leaving a small pool of free ram [that also serves as a buffer] the cache/buffer pool grows or shrinks depending on memory load.

I've found that if I do lots of things within X, the memory pool starts to look like what I expect it should be, but I really have to work at it. Perhaps it's cos the system is rather fast now :)

Code:
$ free
             total       used       free     shared    buffers     cached
Mem:        514284     506308       7976          0       6656     395016
-/+ buffers/cache:     104636     409648

note that without the buffers and cache I have about 400 megs of free ram
 
O

old.Reverend Flatus

Guest
That's odd, I can only think you've upset something by as you say 'cheating'. What flavour of Linux are you using?
 
T

Testin da Cable

Guest
oh it's redhat right now. got a new install coming up this weekend :)
 
O

old.Reverend Flatus

Guest
For comparison, here's my 3 systems...
Code:
numbertwo(root):~$ free
             total       used       free     shared    buffers     cached
Mem:        257880     148352     109528      21488      59516      68112
-/+ buffers/cache:      20724     237156
Swap:        72256       2012      70244

thebutler(root):~$ free
             total       used       free     shared    buffers     cached
Mem:        126924     124980       1944          0      17568      54644
-/+ buffers/cache:      52768      74156
Swap:       401552          0     401552

supervisor(root):~$ free
             total       used       free     shared    buffers     cached
Mem:        255756     249620       6136          0        372     214256
-/+ buffers/cache:      34992     220764
Swap:       248968     174500      74468
 
T

Testin da Cable

Guest
ah yes thanks :)
note the jump in free/used when buffers and cache are subtracted.

btw Rev.....aren't you supposed to be down the pub mate?
 
O

old.Reverend Flatus

Guest
I should be down the pub by the time you read this! Just waiting for a buddy to come round with his car to drive me there :cool:
 
E

Embattle

Guest
Originally posted by testin_da_cable
yeah it fully supports it duh Embattle ;)
not having something in ram is wasting resources dude. a good server caches/buffers everything, leaving a small pool of free ram [that also serves as a buffer] the cache/buffer pool grows or shrinks depending on memory load.

I call it wasting resources when it puts something in there that I'm not using or going to use :p

Physical Memory(k)

Total: 1048052
Available: 807740
System Cache: 155000
 
E

Embattle

Guest
Fucking windows need to increase the pagefile if you add more ram is silly :rolleyes:
 
T

Testin da Cable

Guest
heh but windows sucks embattle, surely you should know that by now?

and while we're on things that you know...what do you think cache and buffers are for? if you think it's wasteful why not turn the cpu-cache off in your bios? the more you have cached/buffered the better performance you will get.
empty memory does exactly nothing, that's why a smart server uses it by expanding it's cache pool to fill nearly all it's available ram
 
E

Embattle

Guest
Still no good putting stuff in there that never gets used....its a waste since it can be used for something that does get used.....get the idea or perhaps a picture would work better :p

Regarding the cpu/cache.....again it depends on what you cache etc.
 
E

Embattle

Guest
BTW running a server is totally different from a home computer....as you well know.
 
T

Testin da Cable

Guest
lol you're not getting it Embattle.

"no good putting stuff in there that never gets used" - aye very true, this question keeps very very smart people awake at night, and they come up with some very efficient caching algorithms....but not 100% because that's impossible to achieve -so they cache much more than they need to even though they try to keep things as small as they can.
as to the type of cache, it doesn't matter if it's in your cpu, on your mobo, in your memory or on your harddrive controller...cache is cache and it all does exactly the same thing.

"its a waste since it can be used for something that does get used" - uh? where's your english gone hehe. if it's empty, it's not being used...for anything at all. keeping it empty because it may be used is stupid because a cache pool doesn't have a fixed size. it grows and shrinks with need. anyone that makes a cache pool with a fixed size is either very stupid or a microsoft programmer.

let me try to explain it like this:
[example]
on my linux box, linux and my desktop take up about 100 megs of ram. the rest of my 512 is cache [of things that I've done and things that I may do [like directory scans etc.]] now if I start up a program, say UT, it tells linux "oi I want 100 megs!" and linux maps out 100MB for it. what do I have now? I've got 100megs for linux+desktop, 100megs for UT and ~300megs of cache, filled still with things I've done, things I may do and bits of what UT has done/what UT may do. now say UT wants to read the UT system dir...linux will already have done this so instead of letting UT read from the slow drive linux points it to the cache pool which is like, a zillion times faster give or take.
[/example]

now this: a computer is a computer. the image of a server being a huge powerful box doesn't mean anything at all. if you start up apache on your old p100 running w95 you're just as much running a webserver as some sysadmin is, running it on a huge rs/6000 running AIX [though the sysadmin will prolly want to beat me up for dissing his machine ;)]. look, if you start up q3 on your box, you're effectively connecting to a q3 server. ie. you're serving q3 to yourself. a server [the real thing - the program] is nothing other than a bit of program code that's waiting for you to ask it to do something.
 
E

Embattle

Guest
Originally posted by testin_da_cable
of things that I've done and things that I may do [like directory scans etc.]]

Thats exactly my point when I say its no good just putting any thing in it.
 
T

Testin da Cable

Guest
ha I must learn not to take you very literally then Emb lol :D
when you said "I'm not using or going to use" I took your meaning as "I don't want anything in memory that I might not use"
while both statements are correct, they mean totally different things ;)
 
O

old.Reverend Flatus

Guest
Ooh, is this the right room for an argument?

I'm back from the pub with not nearly enough alcohol inside me, time for a spliff I guess :cool:
 
T

Testin da Cable

Guest
lol, nah it's all been sorted Rev :)
I mistook Embattle not wanting inefficient cache for Embattle not wanting cache at all.
duh me is quite thick, serves me right for entering into discussion after reading through logfiles :D
feel free to float away ;)
 
O

old.Reverend Flatus

Guest
Sorry, my old age means my hearing is failing...I thought someone said hash not cache!
 
S

Summo

Guest
Dammit! I want Windows to do this cached memory thang. If it could keep IE in there, perhaps explorer.exe stuff, ASE, bits of Half-Life or whatever I'm guessing performance would be much better.

Presumably the longer you leave your sytem running, the more useful stuff remains in cache as the 'one-off' stuff gets sifted out in favour of more regularly used stuff. Presumably.

I like it. :)
 
E

Embattle

Guest
There is a companie that have made changes to Windows so it loads all into memory....tests showed it didn't do much.

I have tweak-xp program and I can force the core into memory.
 
T

Testin da Cable

Guest
Originally posted by Embattle
I can force the core into memory.

tweak all you want....windows will never become un-poo :)
 
E

Embattle

Guest
Originally posted by testin_da_cable


tweak all you want....windows will never become un-poo :)

To U.

Linux will never be number one :p
 
O

old.Reverend Flatus

Guest
Originally posted by testin_da_cable


tweak all you want....windows will never become un-poo :)
Nice turn of phrase :D
 
T

Testin da Cable

Guest
thanks Rev :)
btw, how was your day of rest? head still where it should be?

:D
 
O

old.Reverend Flatus

Guest
Erm, let me check...just about. Phew that's over for another year then.
 

Users who are viewing this thread

Top Bottom