From: michi1@michaelblizek.twilightparadox.com (michi1 at michaelblizek.twilightparadox.com)
To: kernelnewbies@lists.kernelnewbies.org
Subject: MAX limit of file descriptor
Date: Sun, 10 Feb 2013 13:29:32 +0100 [thread overview]
Message-ID: <20130210122931.GA2269@grml> (raw)
In-Reply-To: <20130209051047.GA2806@debian.localdomain>
Hi!
On 13:10 Sat 09 Feb , horseriver wrote:
> hi:)
>
> In one process ,what is the max number of opening file descriptor ?
Type "ulimit -a" in your shell. On my system (debian) the default is 1024.
> Can it be set to infinite ?
Maybe, but at least it can be set very high.
> In network programing ,what is the essential for the maximum of connections
> dealed per second
- Use non blocking i/o and epoll(). Do *not* create 1 process/thread for each
connection and do not use use select().
- Obviously, the more memory your application uses, the more memory has to be
put in the server. IIRC, 1 tcp connection uses ~1kb kernel memory.
- The same applies for cpu time. On the system side, you may want to recommend
network adaptors which can be switched to polling instead of raising 1
interrupt per packet. You should expect to see lots of small packets on the
network.
-Michi
--
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com
next prev parent reply other threads:[~2013-02-10 12:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-09 5:10 MAX limit of file descriptor horseriver
2013-02-09 15:49 ` Peter Teoh
2013-02-09 17:08 ` Gaurav Jain
2013-02-09 17:09 ` Gaurav Jain
2013-02-10 22:07 ` horseriver
2013-02-11 17:16 ` Mulyadi Santosa
2013-02-11 19:36 ` Valdis.Kletnieks at vt.edu
2013-02-10 12:29 ` michi1 at michaelblizek.twilightparadox.com [this message]
2013-02-10 14:47 ` Peter Teoh
2013-02-10 17:50 ` michi1 at michaelblizek.twilightparadox.com
2013-02-11 19:24 ` Valdis.Kletnieks at vt.edu
2013-02-12 5:45 ` michi1 at michaelblizek.twilightparadox.com
2013-02-12 9:31 ` Peter Teoh
2013-02-12 9:38 ` Peter Teoh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130210122931.GA2269@grml \
--to=michi1@michaelblizek.twilightparadox.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.