Re: what is sufficient free memory?

2000-08-30 Thread Dariush Pietrzak

 70 processes: 69 sleeping, 1 running, 0 zombie, 0 stopped
 CPU states:  0.1% user,  0.7% system,  0.0% nice, 99.0% idle
 Mem:   63124K av,  61296K used,   1828K free,  36880K shrd,   7712K buff
 Swap: 104380K av,   3128K used, 101252K free 35860K
 cached
This doesen't look like a problem but like a perfectly healthy server.
No metter how much RAM you put in it there'll always be only about 2 megs
left, because of machine's fs caching, that uses any free ram to hold
pieces of often used files.

 all-in-one box running DNS, squid, postfix, apache and radius (I have
 17 modems on it's cyclades). Any recommendations on the bare-minimum
 RAM for this configuration? The suits at our purchasing division are
64Megs if perfectly enough, i know people that used to run such boxes
witch 16Megs of ram.
What you should look at is swap that is used (3 megs? only? and that's a
problem? )

 need to know if I need to demand that they immediately cough-up the
 128mb (or more).
now of course you should demand more ram, common, squid is a real memory
hogger, but you can tell it how much ram you want it to use
(things like cache_mem etc),
, apache can eat memory like crazy ( especially
mine, with perl modules compiled in ) 

regards, Eyck






Re: what is sufficient free memory?

2000-08-30 Thread Dariush Pietrzak


sorry for my last post, I haven't noticed that you people told everything
already.


 To paint a better picture, here's an entire top screen:
just a little hint - don't sort your processes by cpu usage when you 
want to check memory usage ( just press big 'M' and it'll all clear up )


regards, slow Eyck




what is sufficient free memory?

2000-08-29 Thread Erik Peter P. Abella

Hello All,

I had problems with the RAM (128MB SDRAM DIMM) of my server and the only
spare I had was (64MB SDRAM DIMM).

Hear is what top says:

70 processes: 69 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.1% user,  0.7% system,  0.0% nice, 99.0% idle
Mem:   63124K av,  61296K used,   1828K free,  36880K shrd,   7712K buff
Swap: 104380K av,   3128K used, 101252K free 35860K
cached

I'm a little worried that the harddisk might thrash as there's hardly
any more memory to spare (1828K free). This server is pretty much an
"all-in-one" box running DNS, squid, postfix, apache and radius (I have
17 modems on it's cyclades). Any recommendations on the "bare-minimum"
RAM for this configuration? The suits at our purchasing division are
"stiff" at best so when I make the requesition for the replacement, I
need to know if I need to "demand" that they "immediately" cough-up the
128mb (or more).


Thanks in advance,


Erik


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




what is sufficient free memory?

2000-08-29 Thread Bulent Murtezaoglu


Your biggest potential hog is squid.  It maintains data structures in 
memory and their size grows with your cache size.  If anything causes
trashing that'll be it.  The squid FAQ's give some back-of-envelope
calculations for this AFAIK.  

cheers,

BM



--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: what is sufficient free memory?

2000-08-29 Thread Tamas TEVESZ

On Wed, 30 Aug 2000, Erik Peter P. Abella wrote:

  70 processes: 69 sleeping, 1 running, 0 zombie, 0 stopped
  CPU states:  0.1% user,  0.7% system,  0.0% nice, 99.0% idle
  Mem:   63124K av,  61296K used,   1828K free,  36880K shrd,   7712K buff
  Swap: 104380K av,   3128K used, 101252K free 35860K
  cached
  
  I'm a little worried that the harddisk might thrash as there's hardly
  any more memory to spare (1828K free). This server is pretty much an

of that 61296 used k, 35860k is cache. filesystem cache.

things happened so that linux uses the memory if it has. would it make
any sense having unused memory ? ok, it's cheap these days, but
not _that_ cheap...


-- 
[-]
``And there are plenty of other innovative pieces of software such as Napster
and ICQ.'' -- comment on ``Systems Software Research is Irrelevant'' at
http://freshmeat.net/news/2000/08/05/965534399.html


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: what is sufficient free memory?

2000-08-29 Thread John Gonzalez/netMDC admin


Erik, linux will always use almost 100% of the memory (unless you have a
BUTTLOAD of extra (ie. 512MB RAM)) for buffers and things like that.

For example:

skank:~# free
 total   used   free sharedbuffers cached
Mem: 62956  61460   1496  15432   2064  12864
-/+ buffers/cache:  46532  16424
Swap:   102780  15476  87304

I only have 1396 bytes of memory free, and this machine has alot of
processes running on it. What you really want to watch out for, is using
alot of the swap. If your computer constantly dips heavily into the swap,
it's time to add more memory.

I recently increased the tasks that the above box needs to perform (mysql
database for one, apache for two) so the memory requirements have no
increased. Before, 64MB was more then sufficient. Now, it can handle it,
but i would feel more comfortable with 128.

I would suggest upgrading your box to 128MB at minimum as you are using a
healthy portion of the swap, and being as how important that machine SEEMS
(ie. the number of important tasks it performs) You may want to at least
buy another stick of 128 as well, in case one of them goes bad, you'll
have sufficient memory to run on in the mean time of a replacement.

On Wed, 30 Aug 2000, Erik Peter P. Abella wrote:

| Hello All,
| 
| I had problems with the RAM (128MB SDRAM DIMM) of my server and the only
| spare I had was (64MB SDRAM DIMM).
| 
| Hear is what top says:
| 
| 70 processes: 69 sleeping, 1 running, 0 zombie, 0 stopped
| CPU states:  0.1% user,  0.7% system,  0.0% nice, 99.0% idle
| Mem:   63124K av,  61296K used,   1828K free,  36880K shrd,   7712K buff
| Swap: 104380K av,   3128K used, 101252K free 35860K
| cached
| 
| I'm a little worried that the harddisk might thrash as there's hardly
| any more memory to spare (1828K free). This server is pretty much an
| "all-in-one" box running DNS, squid, postfix, apache and radius (I have
| 17 modems on it's cyclades). Any recommendations on the "bare-minimum"
| RAM for this configuration? The suits at our purchasing division are
| "stiff" at best so when I make the requesition for the replacement, I
| need to know if I need to "demand" that they "immediately" cough-up the
| 128mb (or more).
| 
| 
| Thanks in advance,
| 
| 
| Erik
| 
| 
| --  
| To UNSUBSCRIBE, email to [EMAIL PROTECTED]
| with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
| 
| 

-- 
  ___   _  __   _  
__  /___ ___    /__  John Gonzalez/Net.Tech
__  __ \ __ \  __/_  __ `__ \/ __  /_  ___/ MDC Computers/netMDC!
_  / / / `__/ /_  / / / / / / /_/ / / /__ (505)439-0200/fax-437-3052
/_/ /_/\___/\__/ /_/ /_/ /_/\__,_/  \___/ http://www.netmdc.com
[-[system info]---]
  1:50pm  up 110 days, 19:53,  4 users,  load average: 0.10, 0.19, 0.37


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




what is sufficient free memory?

2000-08-29 Thread Erik Peter P. Abella
Hello All,

I had problems with the RAM (128MB SDRAM DIMM) of my server and the only
spare I had was (64MB SDRAM DIMM).

Hear is what top says:

70 processes: 69 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.1% user,  0.7% system,  0.0% nice, 99.0% idle
Mem:   63124K av,  61296K used,   1828K free,  36880K shrd,   7712K buff
Swap: 104380K av,   3128K used, 101252K free 35860K
cached

I'm a little worried that the harddisk might thrash as there's hardly
any more memory to spare (1828K free). This server is pretty much an
all-in-one box running DNS, squid, postfix, apache and radius (I have
17 modems on it's cyclades). Any recommendations on the bare-minimum
RAM for this configuration? The suits at our purchasing division are
stiff at best so when I make the requesition for the replacement, I
need to know if I need to demand that they immediately cough-up the
128mb (or more).


Thanks in advance,


Erik




what is sufficient free memory?

2000-08-29 Thread Bulent Murtezaoglu

Your biggest potential hog is squid.  It maintains data structures in 
memory and their size grows with your cache size.  If anything causes
trashing that'll be it.  The squid FAQ's give some back-of-envelope
calculations for this AFAIK.  

cheers,

BM





Re: what is sufficient free memory?

2000-08-29 Thread Tamas TEVESZ
On Wed, 30 Aug 2000, Erik Peter P. Abella wrote:

  70 processes: 69 sleeping, 1 running, 0 zombie, 0 stopped
  CPU states:  0.1% user,  0.7% system,  0.0% nice, 99.0% idle
  Mem:   63124K av,  61296K used,   1828K free,  36880K shrd,   7712K buff
  Swap: 104380K av,   3128K used, 101252K free 35860K
  cached
  
  I'm a little worried that the harddisk might thrash as there's hardly
  any more memory to spare (1828K free). This server is pretty much an

of that 61296 used k, 35860k is cache. filesystem cache.

things happened so that linux uses the memory if it has. would it make
any sense having unused memory ? ok, it's cheap these days, but
not _that_ cheap...


-- 
[-]
``And there are plenty of other innovative pieces of software such as Napster
and ICQ.'' -- comment on ``Systems Software Research is Irrelevant'' at
http://freshmeat.net/news/2000/08/05/965534399.html




Re: what is sufficient free memory?

2000-08-29 Thread John Gonzalez/netMDC admin

Erik, linux will always use almost 100% of the memory (unless you have a
BUTTLOAD of extra (ie. 512MB RAM)) for buffers and things like that.

For example:

skank:~# free
 total   used   free sharedbuffers cached
Mem: 62956  61460   1496  15432   2064  12864
-/+ buffers/cache:  46532  16424
Swap:   102780  15476  87304

I only have 1396 bytes of memory free, and this machine has alot of
processes running on it. What you really want to watch out for, is using
alot of the swap. If your computer constantly dips heavily into the swap,
it's time to add more memory.

I recently increased the tasks that the above box needs to perform (mysql
database for one, apache for two) so the memory requirements have no
increased. Before, 64MB was more then sufficient. Now, it can handle it,
but i would feel more comfortable with 128.

I would suggest upgrading your box to 128MB at minimum as you are using a
healthy portion of the swap, and being as how important that machine SEEMS
(ie. the number of important tasks it performs) You may want to at least
buy another stick of 128 as well, in case one of them goes bad, you'll
have sufficient memory to run on in the mean time of a replacement.

On Wed, 30 Aug 2000, Erik Peter P. Abella wrote:

| Hello All,
| 
| I had problems with the RAM (128MB SDRAM DIMM) of my server and the only
| spare I had was (64MB SDRAM DIMM).
| 
| Hear is what top says:
| 
| 70 processes: 69 sleeping, 1 running, 0 zombie, 0 stopped
| CPU states:  0.1% user,  0.7% system,  0.0% nice, 99.0% idle
| Mem:   63124K av,  61296K used,   1828K free,  36880K shrd,   7712K buff
| Swap: 104380K av,   3128K used, 101252K free 35860K
| cached
| 
| I'm a little worried that the harddisk might thrash as there's hardly
| any more memory to spare (1828K free). This server is pretty much an
| all-in-one box running DNS, squid, postfix, apache and radius (I have
| 17 modems on it's cyclades). Any recommendations on the bare-minimum
| RAM for this configuration? The suits at our purchasing division are
| stiff at best so when I make the requesition for the replacement, I
| need to know if I need to demand that they immediately cough-up the
| 128mb (or more).
| 
| 
| Thanks in advance,
| 
| 
| Erik
| 
| 
| --  
| To UNSUBSCRIBE, email to [EMAIL PROTECTED]
| with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
| 
| 

-- 
  ___   _  __   _  
__  /___ ___    /__  John Gonzalez/Net.Tech
__  __ \ __ \  __/_  __ `__ \/ __  /_  ___/ MDC Computers/netMDC!
_  / / / `__/ /_  / / / / / / /_/ / / /__ (505)439-0200/fax-437-3052
/_/ /_/\___/\__/ /_/ /_/ /_/\__,_/  \___/ http://www.netmdc.com
[-[system info]---]
  1:50pm  up 110 days, 19:53,  4 users,  load average: 0.10, 0.19, 0.37




Re: what is sufficient free memory?

2000-08-29 Thread Nathan
On Tue, 29 Aug 2000, Tamas TEVESZ wrote:
 On Wed, 30 Aug 2000, Erik Peter P. Abella wrote:
 
   70 processes: 69 sleeping, 1 running, 0 zombie, 0 stopped
   CPU states:  0.1% user,  0.7% system,  0.0% nice, 99.0% idle
   Mem:   63124K av,  61296K used,   1828K free,  36880K shrd,   7712K buff
   Swap: 104380K av,   3128K used, 101252K free 35860K
   cached
   
 
 of that 61296 used k, 35860k is cache. filesystem cache.
 
 things happened so that linux uses the memory if it has. would it make
 any sense having unused memory ? ok, it's cheap these days, but
 not _that_ cheap...

Why not that cheap?  Less than half of his ram is being used for actual
needed data.  The rest is either free, in cache or in buffers which means
the memory isn't even close to being stressed on the system.  The 3MB in
swap is just crap the system doesn't mind not having ;)

I don't think the memory problem is as bad as only 1.8Mb free.

-Nathan




Re: what is sufficient free memory?

2000-08-29 Thread John Gonzalez/netMDC admin
Not to mention that unless you are having MILD traffic through the squid
box, you probably want a box dedicated to just that.

On Tue, 29 Aug 2000, Bulent Murtezaoglu wrote:

| 
| Your biggest potential hog is squid.  It maintains data structures in 
| memory and their size grows with your cache size.  If anything causes
| trashing that'll be it.  The squid FAQ's give some back-of-envelope
| calculations for this AFAIK.  
| 
| cheers,
| 
| BM

-- 
  ___   _  __   _  
__  /___ ___    /__  John Gonzalez/Net.Tech
__  __ \ __ \  __/_  __ `__ \/ __  /_  ___/ MDC Computers/netMDC!
_  / / / `__/ /_  / / / / / / /_/ / / /__ (505)439-0200/fax-437-3052
/_/ /_/\___/\__/ /_/ /_/ /_/\__,_/  \___/ http://www.netmdc.com
[-[system info]---]
  2:00pm  up 110 days, 20:03,  4 users,  load average: 0.04, 0.09, 0.23




Re: what is sufficient free memory?

2000-08-29 Thread Tamas TEVESZ
On Tue, 29 Aug 2000, Nathan wrote:

  Why not that cheap?  Less than half of his ram is being used for actual
  needed data.  The rest is either free, in cache or in buffers which means
  the memory isn't even close to being stressed on the system.  The 3MB in

that's exactly what i'm talking about. the rest is being used as
cache, just because it's there, and once it's there and it's not
needed for ``real'' data storage, it's being used as cache.

nothing's cheap enough just to lay around unused ;)

-- 
[-]
``And there are plenty of other innovative pieces of software such as Napster
and ICQ.'' -- comment on ``Systems Software Research is Irrelevant'' at
http://freshmeat.net/news/2000/08/05/965534399.html




Re: what is sufficient free memory?

2000-08-29 Thread Erik Peter P. Abella
Hello All,


Thanks for all the reponses. From most of the replies, can I gather that
I'll have to observe my how much is being swapped to determine whether I
should immediately up the RAM back to 128MB? (and pester the tight-wad
suits who'll approve the requesition)

To paint a better picture, here's an entire top screen:

70 processes: 69 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.1% user,  0.7% system,  0.0% nice, 99.0% idle
Mem:   63124K av,  60764K used,   2360K free,  38700K shrd,  32216K buff
Swap: 104380K av,   3572K used, 100808K free  7772K
cached

  PID USER PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME
COMMAND
 1047 beyonder  10   0  1032 1032   820 R   0  0.7  1.6   0:00 top
  717 root   1   0  1340 1288  1040 S   0  0.1  2.0   0:01 sshd
1 root   0   0   460  460   388 S   0  0.0  0.7   0:06 init
2 root   0   0 00 0 SW  0  0.0  0.0   0:00
kflushd
3 root   0   0 00 0 SW  0  0.0  0.0   0:00
kupdate
4 root   0   0 00 0 SW  0  0.0  0.0   0:00 kpiod
5 root   0   0 00 0 SW  0  0.0  0.0   0:00
kswapd
6 root -20 -20 00 0 SW 0  0.0  0.0   0:00
mdrecoveryd
  297 root   1   0   480  472   388 S   0  0.0  0.7   0:00
syslogd
  308 root   0   0   684  672   316 S   0  0.0  1.0   0:00 klogd
  324 root   1   0   548  548   480 S   0  0.0  0.8   0:00 crond
  340 root  15   0   472  468   392 S   0  0.0  0.7   0:00 inetd
  356 root   0   0  1556 1244   596 S   0  0.0  1.9   0:00 named
  366 root   0   0   772  700   604 S   0  0.0  1.1   0:01 sshd
  394 root   0   0   516  508   412 S   0  0.0  0.8   0:00
automount
  452 root   2   0   688  688   548 S   0  0.0  1.0   0:00
master
  458 postfix0   0   812  812   648 S   0  0.0  1.2   0:00 qmgr
  470 root   0   0   400  384   324 S   0  0.0  0.6   0:00 gpm
  486 root   0   0  1368 1364  1288 S   0  0.0  2.1   0:00 httpd
  490 nobody 0   0  1220 1172  1044 S   0  0.0  1.8   0:00 httpd
  491 nobody 0   0  1224 1224  1096 S   0  0.0  1.9   0:00 httpd
  492 nobody 0   0   964  964   872 S   0  0.0  1.5   0:00 httpd
  493 nobody 0   0   964  964   872 S   0  0.0  1.5   0:00 httpd
  494 nobody 0   0  1220 1220  1096 S   0  0.0  1.9   0:00 httpd
  495 nobody 0   0  1268 1268  1120 S   0  0.0  2.0   0:00 httpd

The stats on the swapping have been constant for the past hour or so,
but notable too is that it's 4am here in the Philippines and there
aren't any subscribers who've dialed in and engaged squid as they surf.
I guess I'll be able to get a better idea later on when my subscribers
start pouring in.

Mabuhay kayong lahat at debian!
(long live you all and debian)


Erik




Re: what is sufficient free memory?

2000-08-29 Thread Robert Davies
 Thanks for all the reponses. From most of the replies, can I gather that
 I'll have to observe my how much is being swapped to determine whether I
 should immediately up the RAM back to 128MB? (and pester the tight-wad
 suits who'll approve the requesition)

Why wait?

Run the command vmstat, and observe how much is paged in /out, what is the
scan rate?  That indicates how hard the page stealer is looking for pages it
can free off.  vmstat 10 is usually a goodish, number but if you can run it
a long time, longer sample times is useful.

If you still have the 128MB in the machine, you could force Linux to ignore
it, using a boot parameter.
With lilo, that would mean an append line with 'mem=64M' in it, or enter it
at the lilo boot prompt.

boot: linux mem=64M

That way you can actually trial your system out, at the cost of a reboot, to
see the affect.

With squid, you probably want to lower the mem cache down to about 1/4 of
physical RAM, if it's higher than the default.  Depending on usage perhaps
less than 16MB would be a waste of RAM, your call!

If the suits don't blink, then perhaps you could investigate interleaving
swap over a number of disk partions, by using mkswap, and swap entries in
fstab all set with a priority=5, instead of the defaults which don't
interleave.

Rob




Re: what is sufficient free memory?

2000-08-29 Thread Erik Peter P. Abella
Hello again,

Robert Davies wrote:

 Why wait?
 
 Run the command vmstat, and observe how much is paged in /out, what is the
 scan rate?  That indicates how hard the page stealer is looking for pages it
 can free off.  vmstat 10 is usually a goodish, number but if you can run it
 a long time, longer sample times is useful.

OK, here goes:

   procs  memoryswap  io
system cpu
 r  b  w   swpd   free   buff  cache  si  sobibo   incs  us 
sy  id
 0  0  0   3560   1644  31188   8608   0   0 4 1  10417  
0   0  99
 
 If you still have the 128MB in the machine, you could force Linux to ignore
 it, using a boot parameter.

Nah, the machine won't boot unless I remove it.
 
 With squid, you probably want to lower the mem cache down to about 1/4 of
 physical RAM, if it's higher than the default.  Depending on usage perhaps
 less than 16MB would be a waste of RAM, your call!

presumably via /etc/squid.conf ?
 
 If the suits don't blink, then perhaps you could investigate interleaving
 swap over a number of disk partions, by using mkswap, and swap entries in
 fstab all set with a priority=5, instead of the defaults which don't
 interleave.
We'll see, I'm still waiting for a larger barracuda. It'd be nice if I
can have both in one shabbang! for now I'm fairly confident that with
the adjustment of squid, my swap partition can manage until I get the
128MB. Or won't that be enough? I'll soon find out and tell everyone how
it goes.

Mabuhay!


Erik