Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751648AbWADKML (ORCPT ); Wed, 4 Jan 2006 05:12:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751658AbWADKML (ORCPT ); Wed, 4 Jan 2006 05:12:11 -0500 Received: from gw1.cosmosbay.com ([62.23.185.226]:29146 "EHLO gw1.cosmosbay.com") by vger.kernel.org with ESMTP id S1751648AbWADKMK (ORCPT ); Wed, 4 Jan 2006 05:12:10 -0500 Message-ID: <43BB9F71.60909@cosmosbay.com> Date: Wed, 04 Jan 2006 11:12:01 +0100 From: Eric Dumazet User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Jan Engelhardt CC: Andrew Morton , Linux kernel Subject: Re: [PATCH] Shrinks sizeof(files_struct) and better layout References: <20051108185349.6e86cec3.akpm@osdl.org> <437226B1.4040901@cosmosbay.com> <20051109220742.067c5f3a.akpm@osdl.org> <4373698F.9010608@cosmosbay.com> <43BB1178.7020409@cosmosbay.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (gw1.cosmosbay.com [172.16.8.80]); Wed, 04 Jan 2006 11:12:02 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 930 Lines: 27 Jan Engelhardt a ?crit : >> 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. (I remember working on AT&T Unix in 1985, with a limit of 20 concurrent files per process : it was just fine) Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/