NNTPC: Just installed, caching doesn't appear to be working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is all with nntpcache-1.0.1.

First of all, I think I found a minor bug.  In expire.c you call statfs 
and get the number of free blocks using fs.f_ffree.  You should probably
be using fs.f_favail.  fs.f_ffree is the real number of free blocks, but
does not take into account the 10% (default) free space that many file
systems like to keep empty to keep disk performance high.

Second; I've made a minor modification to the above code to make it call
quotactl() as well.  This allows me to set a quota for the nntpcache 
program to make sure that it doesn't use more space then I want to allocate
for it.  I can't use the suggested approach of having a seperate filesystem
for the cache because my Unix machine is located about 3000 miles away
from me, making it hard to do things like add new disks.  If anyone is
interested in my quota code let me know and I'll email it in.

Thirdly, there were some build problems on my machine (NetBSD 1.0).  You
define MIN() and MAX() macros in nntpcache.h, but these are also defined 
in sys/param.h.  I just took them out of nntpcache.h and made nntpcache.h
include sys/param.h.

Finally, the crux of my message.  It doesn't appear that articles or XOVER
lines are getting cached on my machine.  Under /usr/local/var/nntpcache
there are the following files:

-rw-r--r--  1 news  news    0 Jan 29 15:57 cache.history
-rw-r--r--  1 news  news   61 Jan 29 15:57 cache.history.dir
-rw-r--r--  1 news  news    0 Jan 29 15:57 cache.history.pag
drwxr-xr-x  4 news  news  512 Jan 29 15:58 news.dhp.com./
-rw-r--r--  1 news  news    6 Jan 29 15:57 nntpcache.pid.DEFAULT:119

news.dhp.com./ has the heirarchy for the newsgroups that I've read, but
the directories under there don't contain any information.

I've checked syslog reports (I syslog everything, including debug and 
haven't noticed anything out of the ordinary.  This isn't a bug
in my quota code, because it happens even when I use the existing statfs
code.  I assume I should at least have the cache.mmap file (or whatever
its called).

Other then this, its working great as a proxy server.  Its doing a fine
job of replacing dnntpd, which was my previous (much slower) proxy server.

Any ideas?

alex


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux