Article View: news.software.nntp
Article #21201Re: "no space left on device" but still space+inodes left
From: Don Lewis
Date: Tue, 02 Sep 1997 00:00
Date: Tue, 02 Sep 1997 00:00
72 lines
4766 bytes
4766 bytes
In article <5u3bi1$1vd$1@sun579.rz.ruhr-uni-bochum.de>, Lukas Wunner <lukas@tp1.ruhr-uni-bochum.de> wrote: >We are experiencing a strange problem here with INN 1.5.1 on a >FreeBSD 2.2.2-RELEASE box: innd throttles itself with the reason >"No space left on device writing article file" although there are >still 50-100MB of free disk space and several millions of inodes left. >The ffs minfree option is set to 0%. When innd has throttled itself, >I can still log in as user "news" (which is the uid of innd) and create >big files in the spool area without any problems. It seems that the >system or innd somehow loose track of the amount of free disk space left. >The longer the system is running, the more it looses track. When rebooting >the system afresh, the problem will not occur and innd will be able to >fill the disk to the brim. A few days later however, innd will be throttled >with 60MB left, and several days later again, it will be throttled with >90 MB left and so on. This is pretty bizarre and I'm rather confused about >this. Any help is greatly appreciated. This is to be expected if you set minfree to 0%. FFS allocates space to files in some number of whole blocks and optionally a fragment. It uses a reasonably large block size to make I/O fast, but without using fragments you would end up wasting lots of disk space because the unused part of the last block in each file would be unused. This would be especially bad for a news spool where you've got lots of little files. To reduce the waste, FFS can divide blocks into pieces, with a typical granularity of 1/8th the block size, and allocate just part of the block to hold the last part of a file. What can happen to a news spool after a while when you run it very full is that you can run out of free blocks and the only free space left consists of fragments. Df will say you've got free space, but when you try to create an file that is larger than 7/8ths of a block size, it will fail with an out of space error. When I tried running with minfree set to 0%, I saw this happen when the free space got down to about 3%-4%. BTW, a news spool will get really slow well before this point, since the few remaining free blocks will be scattered all over the disk instead of being nice and contiguous, so doing any I/O on a big file will cause the head to go madly seeking all over the place. About your comment about being able to create a big file after this occurs -- my thought is that innd was in the middle of writing a large file, like something that would be posted to alt.binaries.* when it ran into this error, throttled itself, and deleted the file. I bet you won't be able to create a 1MB or whatever your maximum article size file is when your spool gets into this state. Oh, and you probably also see lots of messages like: optimization changed from TIME to SPACE and optimization changed from SPACE to TIME By default, FFS chops up a fresh block each time it needs a fragment to hold the last part of a file, the reason being that FFS may be able to avoid copying that fragment to a larger one if the file grows (TIME optimization mode). As I recall, FFS does some sort of calculation about how much free space is available in whole blocks versus fragments, and if whole blocks are in short supply, it will start packing fragments together when they are allocated in order to conserve the supply of free blocks (SPACE optimization mode). Actually, you probably don't see these messages, because when minfree is set to low values it forces the filesystem to always run in SPACE optimiztion mode. I wonder if the rest of us who use the default minfree on our spools should force SPACE optimization. It may actually be faster because free blocks are conserved and we don't have to worry about the overhead of fragment copying since article files don't generally grow ... -- Don "Truck" Lewis TDK Semiconductor Internet: Don.Lewis@tsc.tdk.com 138 New Mohawk Road Phone: +1 916 478-8284 FAX: +1 916 478-8251 Nevada City, CA 95959
Technical Details
Message-ID:
<5ug430$qnf$1@news.gv.tsc.tdk.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<5u3bi1$1vd$1@sun579.rz.ruhr-uni-bochum.de>Show Full Headers
Complete Article Headers
Message-ID: <5ug430$qnf$1@news.gv.tsc.tdk.com> Subject: Re: "no space left on device" but still space+inodes left Date: Tue, 02 Sep 1997 00:00:00 +0000 From: gdonl@tsc.tdk.com (Don Lewis) References: <5u3bi1$1vd$1@sun579.rz.ruhr-uni-bochum.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 269652440 Organization: TDK Semiconductor, Nevada City CA Newsgroups: news.software.nntp