From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,adb9b9207aecb4b3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews1.google.com!not-for-mail From: jonas.nygren@telia.com (jn) Newsgroups: comp.lang.ada Subject: Re: epoll Ada binding Date: 19 Oct 2004 08:55:37 -0700 Organization: http://groups.google.com Message-ID: <311c6b78.0410190755.7084fc3d@posting.google.com> References: <311c6b78.0410181100.76f4e8ab@posting.google.com> <311c6b78.0410182103.110885b7@posting.google.com> NNTP-Posting-Host: 217.210.29.242 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1098201337 32411 127.0.0.1 (19 Oct 2004 15:55:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 19 Oct 2004 15:55:37 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:5465 Date: 2004-10-19T08:55:37-07:00 List-Id: Wojtek Narczynski wrote in message news:... > Hello, > > > The goal for my programming exercise is to be able to handle 10 - 100 > > 000 concurrent connections effectively :). > > I am currently working on a modified runtime that will use IO readiness > for task scheduling. I have basic task switching working. I am able to > create 10K tasks, but I don't know if it is going to work for 100K tasks, > because of memory consumption. But my goal is to handle many connections > maintaining the task-based way to program. Epoll is one of the bits I am > going to miss, so if your work will be Modified GPL, please talk to me. > > Regards, > Wojtek Hello Wojtek, we aim to provide a solution to the same problem space but our approaches are dissimilar. My approach is to multiplex a number of connections on the same task. The number of tasks should be related to the number of CPUs (cores) on the machine. So for a machine with 4 dual-core CPUs I would chose 8 x N worker tasks. To cover for tasks being blocked in file IO one could chose N=5 but one would really have to test and measure to get N right. Of course this approach requires the use of non-blocking IO and and some event driven state machine for execution of the application. All programming in the application space. Diving into the runtime sounds exciting but is a bit advanced for me. If and when I get a binding for 'epoll' ready I will let you know - I have just started to think about 'epoll' after finding out limitations in GNAT.Sockets implementation as well as in Linux if I were to use 'select'. /jonas