INN-base feeder

Kenichi Okada okada at opaopa.org
Sun Jan 26 15:17:01 UTC 2003


Hi,

In the message "<b10qn1$l9e$1 at gatekeeper.tmr.com>"
davidsen at tmr.com (bill davidsen) wrote:

> | I use ramfs of Linux, and our CNFS buffers and our history
> | (only history.dir, history.hash and history.index) are on the ramfs.

> Do you mean that history is on one filesystem and the indices are on
> another (ramfs) filesystem? I can see running makedbz on boot, but the
> config must be interesting, and you must have a TON of RAM to do this, I
> only have 4GB and couldn't begin to fit the history stuff in it.

> An interesting setup, I just assume that caching will have a lot of the
> working set in RAM.

Here's history files of newsfeed.media.kyoto-u.ac.jp.

$ ls -l ~news/db/history*
-rw-rw-r--    1 news     news     157914397 Jan 27 00:06 history
lrwxrwxrwx    1 news     news           18 Jan 26 21:50 history.dir -> /ramfs/history.dir
lrwxrwxrwx    1 news     news           19 Jan 26 21:50 history.hash -> /ramfs/history.hash
lrwxrwxrwx    1 news     news           20 Jan 26 21:50 history.index -> /ramfs/history.index

$ ls -l /ramfs/history*
-rw-r--r--    1 news     news          108 Jan 27 00:07 history.dir
-rw-r--r--    1 news     news     28377600 Jan 26 21:50 history.hash
-rw-r--r--    1 news     news     18918400 Jan 26 21:50 history.index

Our expire time is very short, so history files are small.

inn.conf:
artcutoff:              1

expire.ctl:
/remember/:1

And we use the next expire script.

#!/bin/sh
RAMFS=/ramfs
DB=/usr/local/news/db

/usr/local/news/bin/expire
if [ $? -ne 0 ]; then
  echo "expire is failed"
  exit 1;
fi
sync
/usr/local/news/bin/ctlinnd pause expire
rm -f ${DB}/history.n*
sync
cp -f ${DB}/history.dir ${RARAMFS}
ln -sf ${RAMFS}/history.dir ${DB}
cp -f ${DB}/history.hash ${RAMFS}
ln -sf ${RAMFS}/history.hash ${DB}
cp -f ${DB}/history.index ${RAMFS}
ln -sf ${RAMFS}/history.index ${DB}
sync
/usr/local/news/bin/ctlinnd go expire


-- 
Kenichi Okada
mailto:okada at opaopa.org



More information about the inn-workers mailing list