How many files on your system?

Story: One Billion Dollars! Wait… I Mean One Billion Files!!!Total Replies: 34
Author Content
hkwint

Oct 07, 2010
11:18 PM EDT
Just out of curiousity, do people wish to share their "$sudo find / -type f | wc -l" with me?

On this Gentoo desktop, the result is 0.87 million.

Almost unbelievable all those were created once - for some reason. And wondering how many of them are used.
tuxchick

Oct 07, 2010
11:32 PM EDT
279,241, opensuse 326,406, old Debian stable system

What the heck does Gentoo do with all those files?
tracyanne

Oct 08, 2010
12:16 AM EDT
< 1 Billion
hkwint

Oct 08, 2010
12:18 AM EDT
Exactly what I was wondering... I didn't had the feeling there was anything unusual on my system.

Turns out the guilty are:

270k - KDE svn source tree (didn't even know I had one, I only ordered to install latest KDE) 225k - portage, divided over 14k packages. Portage is famous for wasting inodes, I'd say. 64k - JaegerMonkey sourcetree (OK, another one I forgot. Why is it even still there?) 77k - /usr/share/doc, most of it developer documentation I wouldn't ever use, due to Gentoo's unability to disable "doc" for "dev-*".
gus3

Oct 08, 2010
12:25 AM EDT
Desktop: 763,839 File server: 369,059 Firewall: 224,616

All NFS shares and backups unmounted.
bigg

Oct 08, 2010
5:27 AM EDT
180,560
jdixon

Oct 08, 2010
6:26 AM EDT
425,668 on my current desktop machine.
Bob_Robertson

Oct 08, 2010
8:18 AM EDT
$ sudo find / -type f | wc -l find: `/proc/14930/task/14930/fd/5': No such file or directory find: `/proc/14930/task/14930/fdinfo/5': No such file or directory find: `/proc/14930/fd/5': No such file or directory find: `/proc/14930/fdinfo/5': No such file or directory 327545

Which, considering the amount of crap on this system, seems low.

However, I have no source trees at all. I'm sure that helps.

Edit: Just checked a "work" laptop, Debian Sid, which lists 30,317 available DEB packages. This machine has maybe a dozen discretionary files in /home, with a total of 325,168

"apt" reports "163,963 files and directories currently installed."

BTW, I got the same "No such file or directory" error as above, and checked the process number, the error is on the "find" command itself. Fascinating.
bigg

Oct 08, 2010
8:21 AM EDT
My Slackware work computer: 1,192,663
caitlyn

Oct 08, 2010
8:23 AM EDT
Desktop running SalixOS: 181127
alc

Oct 08, 2010
9:00 AM EDT
Open Suse 11 `/var/lib/ntp/proc/4450/task/4450/fd/5': No such file or directory find: `/var/lib/ntp/proc/4450/task/4450/fdinfo/5': No such file or directory find: `/var/lib/ntp/proc/4450/fd/5': No such file or directory find: `/var/lib/ntp/proc/4450/fdinfo/5': No such file or directory find: `/proc/4450/task/4450/fd/5': No such file or directory find: `/proc/4450/task/4450/fdinfo/5': No such file or directory find: `/proc/4450/fd/5': No such file or directory find: `/proc/4450/fdinfo/5': No such file or directory 519788
caitlyn

Oct 08, 2010
10:08 AM EDT
Netbook running SalixOS (32 bit): 193336

Netbook running Absolute Linux: 318993

The two distros are on separate partitions but share a common /home.

I wouldn't have expected the netbook to have more files than the desktop but it does. I also wouldn't have expected two Slackware derivatives to have such different results but they do.

I can probably get you some numbers on enterprise distros later, both server and workstation.
Sander_Marechal

Oct 08, 2010
10:22 AM EDT
Home server (Debian Squeeze): 548017 Home desktop, ex network shares (Debian Lenny): 312161
azerthoth

Oct 08, 2010
10:35 AM EDT
Laptop, Sabayon: 542071
number6x

Oct 08, 2010
12:58 PM EDT
desktop: 395615
azerthoth

Oct 08, 2010
2:39 PM EDT
@HK thats about how my layout is falling too, portage + sunrise overlay then add in sabayons entropy package manager and portage overlay.
JaseP

Oct 08, 2010
6:30 PM EDT
281207

Running Lucid on a touchscreen netbook...
hkwint

Oct 08, 2010
10:30 PM EDT
Results are more interesting then I thought, ranging from 0.18M to 1M. Which begs the question, why do some distro's need ~3 times as much files as others?

Mine is back to 586000 now, after I deleted obsolete sourcetrees (KDE 4.5.1 is in the package manager now, and there are binaries of Firefox with JaegerMonkey enabled now).

Interesting BTW I (still) have more files than a Sabayon desktop install, I think Sabayon came with everything including the kitchensink already installed.

I'm also very curious to how many files are on a typical workstation / server, but that probably depends much more on its task than for desktops.
jdixon

Oct 09, 2010
10:50 AM EDT
> ...ranging from 0.18M to 1M.

Well, my count includes all of my video, musc, and picture files; so it's probably quite a few more than you would find in a default Slackware installation.

A quck wc -l on the MANIFEST included with Slackware 13.0 shows 344240 lines, which includes the directories created by aaa-base.
Sander_Marechal

Oct 11, 2010
2:56 AM EDT
I have lots of -dev and -dbg packages for development.
caitlyn

Oct 11, 2010
11:34 AM EDT
Quoting:Well, my count includes all of my video, musc, and picture files; so it's probably quite a few more than you would find in a default Slackware installation.


Most of those live on an external drive for me. I have a 1 TB drive and a 320GB drive that were not included in that 180K count.
gus3

Oct 11, 2010
1:32 PM EDT
If I did my greps correctly, and assuming the MANIFEST.bz2 matches reality, there are 299,953 regular files installed from a full Slackware-current package set.
jdixon

Oct 11, 2010
1:38 PM EDT
> ...there are 299,953 regular files installed from a full Slackware-current package set.

That sounds about right.
tmx

Oct 11, 2010
8:31 PM EDT
This is why I can't use full fisk LVM encryption on my system, the performance suffers working with too many small files.
gus3

Oct 11, 2010
9:32 PM EDT
@tmx:

Buffer caching mitigates that a lot, and also helps with name/inum resolution.

Reading files that fill the buffer cache (e.g. playing movies) will hurt it.

I just did an rsync of /home, with both source and destinations on encrypted volumes. The activity on the backup volume far outstripped the activity on the source volume, because the source volume is regularly accessed. "df -m" shows:

/dev/mapper/home 348200 72524 275676 21% /home /dev/mapper/rsync 142923 72711 70213 51% /rsync

And the time report on the rsync run:

9.00user 14.21system 4:22.35elapsed 8%CPU (0avgtext+0avgdata 64672maxresident)k 2036056inputs+1943792outputs (3major+14535minor)pagefaults 0swaps

That's on a dual-core Athlon 64, with 4G RAM and two SATA drives. /home's volume is on sda, and /rsync's volume is on sdb.

Oh, I should mention that about 45 seconds of that elapsed time was reading from an NFS mount, rather than the local volume. Still, 8% CPU and only 14.21 seconds system time for NFS networking access and encrypted volume access... that's not bad.

The security I get against a physical attack outweighs any disk slowdown that can be measured, but not felt.
Bob_Robertson

Oct 12, 2010
9:26 AM EDT
Tmx,

I'll agree with Gus3. I compiled 2.6.35 on the same 1.6GHz dual core laptop one day to the next, after reinstalling with encrypted LVM. There is no greater use of lots of little disk files for me than that.

There was, maybe, 2 minutes of difference in time over the course of an hour between the two compiles, which might very well be caused by being the difference between the .6 to .7 kernels.

And in using it, I too do not perceive any slowdown.
hkwint

Oct 12, 2010
11:15 PM EDT
And you have to use the i586-optimized version instead of the generic (when using AES), seems to matter as well.
caitlyn

Oct 14, 2010
7:52 PM EDT
How many files on my systems? Probably too many.
chalbersma

Oct 14, 2010
7:58 PM EDT
642475

PCBSD 8.1 + Ports
hkwint

Oct 16, 2010
9:24 PM EDT
Which reminds me, counting on OpenBSD or such might be interesting as well.
gus3

Oct 16, 2010
10:45 PM EDT
Base OpenBSD 4.7 32-bit, with no SMP kernel stuff or ports, has 26,539 regular files.

Arch Hurd from the CD has 12,844 files.

(Wow, this is really easy when the disk image is actually a sparse file...)

And FreeBSD 8.1-RELEASE with no ports, has 77,082 files.
penguinist

Oct 17, 2010
11:47 AM EDT
10,004,461 files, ext3, on a 24TB raid 6 array
Bob_Robertson

Oct 17, 2010
11:55 AM EDT
> 10,004,461

I think we have a winner, folks.
tmx

Oct 17, 2010
6:36 PM EDT
i hope it isn't all porn, that would be a lot.
TxtEdMacs

Oct 17, 2010
9:34 PM EDT
tmx,

At first I thought it was a major storm and pressure drop approaching

Quoting:i hope it isn't all porn, that would be a lot.
that was causing the excruciating pain in my toes*.

YBT

* Aren't you aware this niche is taken?

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!