[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: How many consoles?

Greg A. Woods woods@weird.com
Fri, 7 Jun 2002 09:02:37 -0700 (PDT)


[ On Friday, June 7, 2002 at 14:15:51 (+0200), Anders Nordby wrote: ]
> Subject: How many consoles?
>
> I wonder how many consoles people have managed to get working with a
> single conserver server. I've got 46 working fine now (using direct
> connections from conserver, no piped telnet). My server is an Ultra1
> running Solaris 8 in 64-bit mode. It's important for me that I can scale
> quite a lot further, I may reach up to 1-200 consoles or so..

You should already have all the information at your disposal that you
need to calculate the resource consumption of your conserver as it
scales up.  Every sixteen consoles requires a new conserver process (and
of course there's the one master), and every process requires additional
memory equal to the sum of the data and BSS section sizes, plus stack
and heap space allocation.  You can estimate the stack and heap sizes by

$ ps -auxc | sed -n -e 1p -e /cons/p
USER       PID %CPU %MEM   VSZ  RSS TT  STAT STARTED       TIME COMMAND
root      4597  0.0  0.1   492   88 ??  Is   Tue10PM    4:07.38 conserver
root      4598  0.0  0.6 22480  360 ??  S    Tue10PM   21:12.25 conserver

Let's ignore the second process for now -- more about it later.

The first process, the master should be a good estimate of the ideal
memory use of each process.

$ file /usr/local/sbin/conserver 
/usr/local/sbin/conserver: NetBSD/sparc demand paged dynamically linked executable
$ size /usr/local/sbin/conserver 
text    data    bss     dec     hex
81920   8192    0       90112   16000

So, there's 8KB data allocated immediately per process.  However the
virtual size of the running master is 492KB.  That suggests there was an
additional 484KB allocated for stack and heap space.

That said, as you can see above there's still a very serious memory
leak somewhere, and that'll drastically affect scalability in any
production system....  The second conserver process is allocating an
additional 1.2KB or so with every client connection (I have a cron job
that makes console client connections to collect data from my three UPS
units once every minute).

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>