Re: How to free the memory?
"Michael Black" <et472@FreeNet.Carleton.CA> 写入消息新闻:e8crhj$qnk$1@theodyn.ncf.ca...
> "tech11" (tech11@sohu.com) writes:
>> Hello everyone,
>>
>> I have one server with 2 exon 2.4G Hz and 3G memory, but after one long
>> time, I find almost all the physical memory is used and only 15M is free,
>> so
>> that my server is very slow. I know these used memory is not used always
>> but
>> not cleared after use, How should I free the used physical memory?
>>
> Are you sure you're reading the free output properly?
>
> Linux uses up as much RAM as it can, to buffer and cache things. If it
> runs out of RAM, then it starts using swap space. But if it's just
> buffers
> and cache that memory is still available.
>
> You want to check and see if swap is being used much. If it's a
> relatively
> small amount, either swap is not being used properly (at some point I
> was seeing 0 swap being used, and it turned out I'd forgotten to
> initialize
> something), or likely lack of memory is not a problem.
>
> This is what I get when I use free:
>
> total used free shared buffers cached
> Mem: 255936 246556 9380 0 25916 110732
> -/+ buffers/cache: 109908 146028
> Swap: 498004 36828 461176
>
> That first line, the used column makes it look like pretty much all
> the ram is being used, but the buffers and cached use up much of it,
> as shown by their columns.
>
> The second line shows how much is really being used, 109megs, with over
> half of my RAM still available.
>
> The third line shows that I am barely using swap.
>
> Michael
>
Thanks you very much!
My used swap is 0 and used buffers is 411716, but my server is really slow.
Normally after one new reset, it'll run fast.
Have a good day!
B.R.
Joffre |