comp.lang.ada
 help / color / mirror / Atom feed
From: Thierry Lelegard <thierry.lelegard@canal-plus.fr>
Subject: Re: Server - tasking and long lived connections
Date: Mon, 17 Dec 2001 10:15:35 +0100
Date: 2001-12-17T10:15:35+01:00	[thread overview]
Message-ID: <3C1DB7B7.DF767F9@canal-plus.fr> (raw)
In-Reply-To: mailman.1008382022.25904.comp.lang.ada@ada.eu.org

We have applications that we successfully tested with up to 6000 tasks.
That was on OpenVMS with the DEC Ada compiler. We now use GNAT on
VMS/UNIX/WNT. We haven't yet made such load testing but several hundredths
of tasks run fine.

On most operating systems, though, this requires some tuning (memory
management, I/O, etc).

I think that the trap in this kind of applications (servers with one
or more tasks per client connection) is the fate of the tasks when
the client disconnects. If you let the tasks die and recreate new
tasks for new client connections, you will most certainly face some
slow memory leak. We have seen that, although the stack itself is
deallocated when a task dies, there aer a few bytes which remain
allocated (some kind of TCB I suppose).

So, the trick is to never let the service tasks die. When a client
disconnects, just queue the service task for future usage by a new
client connection. When a new connection comes in, reuse an idle
service task. Create a new one only when there is no available
idle task.

Of course, if you connection are long lived (several hours) and your
application is relatively short lived (a few weeks), this may not
be an issue. But if you want your application to potentially run
forever, you should take care.

In the (long) past, I have seen a Minitel server (French ancestor
of the WWW) crashing every 3 months, due to virtual memory exhaustion,
just because the Ada tasks died when the clients disconnected.

-Thierry
____________________________________________________________________________

Thierry Lelegard, "The Jazzing Troll", Email: thierry.lelegard@canal-plus.fr
CANAL+ Technologies, 34 place Raoul Dautry, 75906 Paris Cedex 15, France
Tel: +33 1 71 71 54 30   Fax: +33 1 71 71 52 08   Mobile: +33 6 03 00 65 75
____________________________________________________________________________



  parent reply	other threads:[~2001-12-17  9:15 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-13  3:23 List Container Strawman 1.4 Ted Dennison
2001-12-13 18:11 ` Brian Hanson
2001-12-13 23:02 ` Nick Roberts
2001-12-14 15:19   ` Ted Dennison
2001-12-14 23:54     ` Ted Dennison
2001-12-15  2:06       ` Server - tasking and long lived connections Eric Merritt
2001-12-15  3:10         ` James Rogers
2001-12-15 12:10           ` Florian Weimer
2001-12-15 14:38         ` Larry Kilgallen
2001-12-15 16:51         ` Steve Doiel
2001-12-17  9:15         ` Thierry Lelegard [this message]
2001-12-17  9:34           ` Jean-Pierre Rosen
2001-12-17 10:16             ` Thierry Lelegard
2001-12-18  9:08               ` Jean-Pierre Rosen
2001-12-17 15:08             ` Larry Kilgallen
2001-12-17 15:39               ` Pat Rogers
2001-12-19 18:20         ` Matthew Heaney
2001-12-19 18:50           ` Eric Merritt
2001-12-15  1:20     ` List Container Strawman 1.4 Nick Roberts
2001-12-15 20:29       ` Ted Dennison
2001-12-16 18:45         ` Nick Roberts
2001-12-21 15:53           ` Ted Dennison
2001-12-21 16:42             ` Marin David Condic
2001-12-21 18:28               ` Ted Dennison
2001-12-21 18:47                 ` Marin David Condic
2001-12-21 19:39                   ` Ted Dennison
2001-12-21 19:48                     ` Marin David Condic
2001-12-22 12:29                     ` Simon Wright
2001-12-21 20:03                   ` Nick Roberts
2001-12-21 16:52             ` Marin David Condic
2001-12-21 18:41               ` Ted Dennison
2001-12-21 19:14                 ` Marin David Condic
2001-12-21 21:13                   ` Ted Dennison
2001-12-22  5:34                     ` John B. Matthews
2001-12-21 20:19                 ` Stephen Leake
2001-12-21 21:35                   ` Ted Dennison
2001-12-24 11:58               ` Florian Weimer
2001-12-24 14:42                 ` Eric Merritt
2001-12-24 22:47                 ` Ted Dennison
2001-12-25 22:15                   ` Florian Weimer
2001-12-28 13:58                     ` Ted Dennison
2001-12-21 17:43             ` Stephen Leake
2001-12-21 18:44               ` Ted Dennison
2001-12-16 21:53         ` Larry Hazel
2001-12-15 22:27           ` Ted Dennison
2001-12-16  4:32             ` Darren New
2001-12-24 13:53               ` Florian Weimer
2001-12-15 23:19 ` Florian Weimer
2001-12-16  4:46   ` Ted Dennison
2001-12-24 13:57     ` Florian Weimer
2001-12-28 14:00       ` Ted Dennison
2001-12-28 16:43         ` Hyman Rosen
2001-12-28 19:12           ` Nick Roberts
2001-12-28 19:49           ` Matthew Heaney
2001-12-29 23:23             ` Matthew Heaney
2001-12-30  6:31               ` Hyman Rosen
2002-01-03  0:09                 ` Matthew Heaney
2002-01-03  0:20                   ` Brian Rogoff
2001-12-17  8:34   ` Mark Lundquist
2001-12-18 21:56     ` Florian Weimer
2001-12-18 21:54       ` Larry Kilgallen
2001-12-18 22:34       ` Mark Lundquist
2001-12-19  4:03         ` Nick Roberts
2001-12-24 13:54           ` Florian Weimer
     [not found] <3C1ABF3F.8CDCC8F9@worldnet.att.net>
2001-12-15  4:42 ` Server - tasking and long lived connections Eric Merritt
2001-12-15 12:18   ` Florian Weimer
2001-12-15 17:56     ` Eric Merritt
     [not found] <20011215175619.80358.qmail@web13002.mail.yahoo.com>
2001-12-17  3:43 ` Steven Deller
     [not found] <000001c186ac$fb7b4020$1337e5c0@STEVEN>
2001-12-17  5:17 ` Eric Merritt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox