aboutsummaryrefslogtreecommitdiff
path: root/pipermail/nel/2001-February/000294.html
blob: 5bb46c8b7aa81da5ba3eccfca67fa04fb9cef9ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Nel] NeL Network Engine</TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:v.caron%40zerodeux.net">
   <LINK REL="Previous"  HREF="000291.html">
   <LINK REL="Next" HREF="000295.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Nel] NeL Network Engine</H1>
    <B>Vincent Caron</B> 
    <A HREF="mailto:v.caron%40zerodeux.net"
       TITLE="[Nel] NeL Network Engine">v.caron@zerodeux.net</A><BR>
    <I>Wed, 28 Feb 2001 15:30:32 +0100</I>
    <P><UL>
        <LI> Previous message: <A HREF="000291.html">[Nel] NeL Network Engine</A></li>
        <LI> Next message: <A HREF="000295.html">[Nel] NeL Network Engine</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#294">[ date ]</a>
              <a href="thread.html#294">[ thread ]</a>
              <a href="subject.html#294">[ subject ]</a>
              <a href="author.html#294">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Vianney Lecroart wrote:
&gt;<i> 
</I>&gt;<i> What we don't know is the thread number limit after what the system uses too
</I>&gt;<i> much CPU. In the linuxthread faq, they
</I>&gt;<i> said that an application should not create more than 100 thread. In this
</I>&gt;<i> case, we have to forget the solution where each
</I>&gt;<i> socket is on a thread and use a blocked receive(). The problem is that
</I>&gt;<i> select() is quite slow and if we have only 100 thread,
</I>&gt;<i> each thread needs to manage, with a select(), around 50 players and we ll
</I>&gt;<i> lost lot of time to create the array for the select()
</I>&gt;<i> and check who have wakeup the select().
</I>
Looking at Apache or Samba projects, it seems that a good compromise is to
set a 'maximum client requests by thread' and spawns threads accordingly.
Apache uses process forking and memory sharing, but the design remains the
same. You then just tune this max_request_by_thread for each OS, say 1 for
Solaris which is said thread-efficient, 10 for Linux ? Just a hint ...

</pre>


<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI> Previous message: <A HREF="000291.html">[Nel] NeL Network Engine</A></li>
	<LI> Next message: <A HREF="000295.html">[Nel] NeL Network Engine</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#294">[ date ]</a>
              <a href="thread.html#294">[ thread ]</a>
              <a href="subject.html#294">[ subject ]</a>
              <a href="author.html#294">[ author ]</a>
         </LI>
       </UL>
</body></html>