Re: [PATCH] Shrinks sizeof(files_struct) and better layout
From: Eric Dumazet
Date: Wed Jan 04 2006 - 05:11:11 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/