public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Folkert van Heusden <folkert@vanheusden.com>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>,
	Andrew Morton <akpm@osdl.org>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Shrinks sizeof(files_struct) and better layout
Date: Wed, 4 Jan 2006 11:28:13 +0100	[thread overview]
Message-ID: <20060104102813.GA1515@vanheusden.com> (raw)
In-Reply-To: <43BB9F71.60909@cosmosbay.com>

> >>2) Reduces the size of (files_struct), using a special 32 bits (or 64bits)
> >>embedded_fd_set, instead of a 1024 bits fd_set for the close_on_exec_init 
> >>and
> >>open_fds_init fields. This save some ram (248 bytes per task)
> >>as most tasks dont open more than 32 files.
> >How do you know, have you done some empirical testing?
> 20 years working on Unix/linux machines yes :)
> Just try this script on your linux machines :
> for f in /proc/*/fd; do ls $f|wc -l;done
> more than 95% of tasks have less than 32 concurrent files opened.

0 root@muur:/home/folkert# for f in /proc/*/fd; do ls $f|wc -l;done | awk '{TOT+=$1; N++;} END{ print TOT / N, N; }'
13.7079 291

So on my system (running 291 processes (postfix, mysql, apache,
asterisk, spamassassin, clamav) it is on average 13.7 filehandles.
On an idle veritas netbackup server (130 processes): 4
On a system running 4 vmware systems (137 processes): 16
On a heavily used mailserver (130 processes, sendmail and MailScanner
package): 6,6


Folkert van Heusden

-- 
Try MultiTail! Multiple windows with logfiles, filtered with regular
expressions, colored output, etc. etc. www.vanheusden.com/multitail/
----------------------------------------------------------------------
Get your PGP/GPG key signed at www.biglumber.com!
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com

  reply	other threads:[~2006-01-04 10:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20051108185349.6e86cec3.akpm@osdl.org>
     [not found] ` <437226B1.4040901@cosmosbay.com>
     [not found]   ` <20051109220742.067c5f3a.akpm@osdl.org>
     [not found]     ` <4373698F.9010608@cosmosbay.com>
2006-01-04  0:06       ` [PATCH] Shrinks sizeof(files_struct) and better layout Eric Dumazet
2006-01-04  9:11         ` Jan Engelhardt
2006-01-04 10:12           ` Eric Dumazet
2006-01-04 10:28             ` Folkert van Heusden [this message]
2006-01-04 10:45         ` Andi Kleen
2006-01-04 11:13           ` Eric Dumazet
2006-01-04 11:15             ` Andi Kleen
2006-01-04 11:19               ` Eric Dumazet
2006-01-04 11:22                 ` Andi Kleen
2006-01-04 11:41                   ` Eric Dumazet
2006-01-04 11:58                     ` Andi Kleen
2006-01-06  3:01             ` David Lang
2006-01-06  6:35               ` Eric Dumazet
2006-01-06  7:26                 ` David Lang
2006-01-06  7:37                   ` Eric Dumazet
2006-01-06  8:28                     ` David Lang
2006-01-04 11:45         ` Andrew Morton
2006-01-04 13:14           ` Eric Dumazet
2006-01-04 23:24           ` [2.6 patch] Define BITS_PER_BYTE Adrian Bunk
2006-01-05  7:03             ` Jan Engelhardt
2006-01-05 15:18               ` Bryan O'Sullivan
2006-01-05 19:19                 ` H. Peter Anvin

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=20060104102813.GA1515@vanheusden.com \
    --to=folkert@vanheusden.com \
    --cc=akpm@osdl.org \
    --cc=dada1@cosmosbay.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox