BUFFINDEXED.CONF(5)

Okay bestie, welcome to the buffindexed.conf(5) glow-up from InterNetNews Documentation ๐Ÿ’– โ€” this is the page that tells you how to configure the buffindexed overview method, and yes, weโ€™re keeping every detail because details are the moment. โœจ


๐ŸŒธ NAME ๐ŸŒธ

buffindexed.conf โ€” Configuration for the buffindexed overview method. Thatโ€™s literally the whole name, no cap. ๐Ÿ’…

โœจ DESCRIPTION โœจ

buffindexed.conf, found in pathetc, specifies the buffers that the buffindexed overview method should use. It is required if the server uses buffindexed (as configured by the ovmethod parameter in inn.conf). ๐Ÿซถ

Buffindexed uses pre-built buffer files to store overview data and indexes to that data. The buffers are divided into 8 KB internally, and a given block is used either for overview data or for index data. A block is always allocated to a single newsgroup and is never shared among newsgroups. It also means that overview data is limited to 8 KB per article, which may lead to the lack of integration of a few articles with headers of unusual length into the overview database. ๐Ÿ˜ญ

In addition to the buffers, buffindexed also stores information in a file named group.index in pathdb. (This file should not be mistaken for the one named group.index in pathoverview which is used by the tradindexed overview method.) It contains information about each newsgroup: the pointer to the index block for the newsgroup, the high mark, the low mark, the flag of the group, the number of articles, and so forth. This file is created automatically when all buffers are initialized and should not be manually edited. ๐Ÿ™ˆ

Buffindexed buffers are of fixed size, so buffindexed will never use more space than what is available in those buffers. If all buffers are full, innd will throttle when it attempts to store overview information for any additional articles until space is freed (with expireover, for instance) or another buffer is added. This is unlike the CNFS storage method. ๐Ÿซถ

You can see the current usage of the buffers with the -o option to inndf. ๐Ÿ‘€

The overview data of received articles are flushed to disk every ovflushcount articles, as set in inn.conf.

In the buffindexed.conf file, blank lines and lines beginning with a number sign (#) are ignored. All other lines must be of the format:

<index>:<filename>:<size>

The order of lines is not significant. ๐Ÿ™Œ

  • <index> โ€” is the index of this overview buffer and must be unique. Other than that constraint, it can be any number between 0 and 65535. ๐Ÿ”ข
  • <filename> โ€” is the path to the buffer. The length of the path should not be longer than 63 characters. ๐Ÿ“
  • <size> โ€” is the length of the buffer in kilobytes (1 KB = 1024 bytes). If <filename> does not specify a special device, the file size of the buffer must be <size> * 1024 bytes. If it does specify a special device, that device must have at least <size> space available. For more information on setting up the buffers, see "CREATING BUFFERS". ๐Ÿงฎ

An example of buffindexed.conf file can be:

0:<pathoverview in inn.conf>/OV1:1536000
1:<pathoverview in inn.conf>/OV2:1536000

When you first start innd with everything configured properly, you should see messages like this in pathlog/news.notice:

Aug 27 00:00:00 kevlar innd: buffindexed: no magic cookie found
    for ovbuff 0, initializing
You MUST recreate overview completely using makehistory if you remove or replace buffers. โš ๏ธ

However, new buffers can be added without any special care (other than restarting innd after modifying buffindexed.conf). If you need to rebuild overview, you should zero all of the buffers first. ๐Ÿงš

We recommend not to reserve too much spare space in existing buffers, so that to minimize the duration of the expireover process, and to just add new buffers when space left is low (see the result of inndf -no). Plan on needing at least 0.65 KB for every article in your spool (not counting crossposts). So, if you have 5 million articles, youโ€™ll need at least 3.25 GB of disk space for buffindexed. ๐Ÿ’พ

๐Ÿ› ๏ธ CREATING BUFFERS ๐Ÿ› ๏ธ

Okay, there are two methods to create a new buffindexed buffer โ€” pick your fighter:

  1. Create a large file on top of a regular file system. The easiest way to do this is probably with dd(1), using a command like:
dd if=/dev/zero of=/path/to/cycbuff bs=1024 count=<size>

where <size> is the size from the relevant line in buffindexed.conf.

This is the simplest method, but has the disadvantage that very large files on regular file systems can be fairly slow to access, particularly at the end of the file, and INN incurs unnecessary file system overhead when accessing the buffer. ๐Ÿข

  1. Use block devices directly. If your operating system allows you to call mmap() on block devices (Solaris and recent versions of Linux do, FreeBSD at last report does not), this method can avoid all of the native file system overhead. Note, however, that Solaris has problems with byte range locking on block devices, and therefore this method should not be used on Solaris. ๐Ÿšซ

Partition the disk. If youโ€™re using Solaris, set up your partitions to avoid the first cylinder of the disk (or otherwise the buffindexed header will overwrite the disk partition table and render the buffers inaccessible). Then, create device files for each block device youโ€™re going to use.

Itโ€™s not recommended to use the block device files in /dev, since the news system doesnโ€™t have permission to write to them and changing the permissions of the system device files may affect something else. Instead, use mknod(1) to create a new set of block devices (in somewhere like pathspool/overview thatโ€™s only writable by the news user). To do this, run ls -Ll on the devices in /dev that correspond to the block devices that you want to use. The major and minor device numbers are in the fifth and sixth columns (right before the date), respectively. Then run mknod like:

mknod <filename> b <major> <minor>

where <filename> is the path to the device to create (matching the <filename> part of the buffindexed configuration line) and <major> and <minor> are the major and minor device numbers as discovered above.

Hereโ€™s a short script to do this when given the path to the system device file as an argument:

#!/bin/sh
base=`echo "$1" | sed 's%.*/%%'`
major=`ls -Ll "$1" | awk '{print $5}' | tr -d ,`
minor=`ls -Ll "$1" | awk '{print $6}`
mkdir -p <pathoverview in inn.conf>
mknod <pathoverview>/"$base" b "$major" "$minor"
chown news:news <pathoverview>/"$base"
chmod 644 <pathoverview>/"$base"

Make sure that the created files are owned by the news user and news group, as specified at configure time (the default being "news" for both). Also make sure that the permissions on the devices allow the news user to read and write. ๐Ÿซถ

๐ŸŒธ HISTORY ๐ŸŒธ

Written by Katsuhiro Kondou <kondou@nec.co.jp> for InterNetNews. Converted to POD by Russ Allbery <eagle@eyrie.org>. ๐Ÿ‘‘

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

Go read these too, bestie:

Signed, sealed, and serving looks: this is BUFFINDEXED.CONF(5) from INN 2.7.4, dated 2024-05-19 โ€” periodt. ๐Ÿ’…โœจ๐Ÿซถ

๐Ÿ“ฆ where this page comes from
  • arch rolling: inn 2.7.4-4 ยท ISC
  • epel 10: inn 2.7.4-5.el10_3 ยท ISC AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND MIT AND NTP
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms