Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jan 2002 00:52:27 -0700 (MST)
From:      "Forrest W. Christian" <forrestc@imach.com>
To:        Hug Me <hugme@hugme.org>
Cc:        root@se2600.org, freebsd-isp@FreeBSD.ORG
Subject:   Re: e-mail client
Message-ID:  <Pine.BSF.4.21.0201132350410.22567-100000@workhorse.iMach.com>
In-Reply-To: <20020113152508.F19327@pitr.tuxinternet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 Jan 2002, Hug Me wrote:

> I am going to have around 150 copies of this running at the same time so
> it using a small amount of memory is important..
...
> 7.2 meg running in momory.. thats 11.8 gig of memory, just to run MAIL,

Your memory math is broken.  But not because you can't do regular math -
but instead that memory math is different.

  PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
11832 hugme      2   0  9840K  8296K poll     0:02  0.00%  0.00% arrow
11830 hugme      2   0  8084K  7120K select   0:01  0.00%  0.00%
postilion.exec
11794 hugme      2   0  7276K  5896K poll     0:01  0.00%  0.00% sylpheed

Although each of these do require the size indicated for the first
instance, the second instance in a lot of cases takes a lot less.

The reason for this is that the FreeBSD system can share common code
between the processes.   The only real way to tell how much these take on
a per-instance case is to load up say 10 and look at the total memory
usage.

Also, if you have a single app like this which you are going to be running
a LOT of copies of, it is in a lot of cases better if the binary is
statically linked.  This helps with the code sharing as it helps the VM
subsystem not dirty code pages.   In addition, setting the H option for
malloc might be a good idea (YMMV).  To do this:

   ln -s 'H' /etc/malloc.conf

This tells the memory allocator to provide hints to the vm subsystem about
free pages so that the vm subsystem can better handle freeing up dirty
pages which don't contain anything at all.

BYW, are you trying to say that you are going to have 150 clients running
X apps on this box?   This seems kinda scary.   I would seriously look at
a web-based mail app.  I personally recommend IMP
(http://www.horde.org/imp) or if you need scheduling, look at twig.

The real advantage of a web based app is that one web server instance can
actually handle many clients.   If you compile apache with php support
built in and run IMP, there is virtually no per-process startup penalty
and 10 processes or so should be able to handle the 100-150 users you are
talking about.

- Forrest W. Christian (forrestc@imach.com) AC7DE
----------------------------------------------------------------------
The Innovation Machine Ltd.                              P.O. Box 5749
http://www.imach.com/                                Helena, MT  59604
Home of PacketFlux Technogies and BackupDNS.com         (406)-442-6648
----------------------------------------------------------------------
      Protect your personal freedoms - visit http://www.lp.org/



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0201132350410.22567-100000>