Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 May 2001 10:22:17 +1000
From:      Tony Landells <ahl@austclear.com.au>
To:        "Hank Wethington" <bsd@info-logix.com>
Cc:        "BSD" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: inode question 
Message-ID:  <200105100022.KAA13511@tungsten.austclear.com.au>
In-Reply-To: Message from "Hank Wethington" <bsd@info-logix.com>  of "Wed, 09 May 2001 16:47:13 MST." <KFEIIDCJNHBCGLAFNMJIKEDMDPAA.bsd@info-logix.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

bsd@info-logix.com said:
> I just finished setting up a mail server using qmail and a slew of
> other packages. It works great and today I was running tests on it to
> see how it would handle a load that I don't think it will ever see.
> During the test of sending over 3000 messages through at once to a
> vpop account on the system, I got an interesting error:

> /var: create/symlink failed, no inodes free qmail-inject: fatal: qq
> trouble creating files in queue (#4.3.0)

> after I pulled off all of the files I did it again, this time sending
> only 1000 at a time. After they finished sending, I waited for disk
> activity to stop, then sent another 1000. I did this until I hit 4000
> emails sent to the same user successfully.

> I guess I'm trying to figure out why it would send all of them just
> fine if I sent them in 1000 piece bundles and not work when I sent it
> as 3000. Memory usage was fantastic during the process never even
> dipping into the swap. CPU utilization was great it never reached over
> 12% system usage during the whole procedure. So I'm baffled. When it
> was all complete, all 4000 messages the only dir larger then when I
> started was /var and it was only at 47% after all the disk writes, it
> climbed to 55% at its peak during my second set of tests. 

Inodes have nothing to do with disk usage as such.  On a large partition
with lots of small files you could run out of inodes and still have most
of the disk empty.  In fact, if you were trying to prove a point you could
probably run out of inodes and have the disk usage show 0% in use.

Inodes are strictly related to the number of files (in the generic UNIX
sense) on the partition.

If, for example, in sending your 3000 messages at once all 3000 were in
the queue at one time, then even with one file per message (and I haven't
used qmail so I can't really say, but I know sendmail has at least two
files per message) you've got 3000 files, and 3000 inodes.

When you send 1000 messages at a time, you've only got one third of the
files and thus the inodes.  Once they're delivered they all go into one
file where they only consume one inode.  Sending the next batch doesn't
consume any additional inodes because the first 1000 messages have been
delivered.

If you want to see inode usage, use the "-i" option to df.

If you want to alter the number of inodes allocated on a filesystem you
need to do this when you create the filesystem with newfs (which actually
specifies a proportion of inodes, rather than an absolute number).  This
is typically done on partitions that will hold newsgroups (which generate
lots of directories and lots of small files).  Whether you need it on /var
depends on whether you expect to be getting 3000 messages at once.

Tony
-- 
Tony Landells					<ahl@austclear.com.au>
Senior Network Engineer				Ph:  +61 3 9677 9319
Australian Clearing Services Pty Ltd		Fax: +61 3 9677 9355
Level 4, Rialto North Tower
525 Collins Street
Melbourne VIC 3000
Australia



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105100022.KAA13511>