Article View: news.software.nntp
Article #25635Re: INN vs update(8) on SunOS
From: Hans Lambermont
Date: Tue, 27 Jan 1998 00:00
Date: Tue, 27 Jan 1998 00:00
148 lines
4670 bytes
4670 bytes
Paul D. Smith wrote:
> I'm running an INN 1.7.2 + Insync 1.1d server on a SunOS 4.1.4 system.
> My problem is that expire, etc. is _way_ slow. And in fact, the entire
> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
> 201 root -25 0 12K 8K sleep 199:08 67.65% 57.81% update
> What should I do about this? Anyone else running INN on SunOS, seeing
> this or have any ideas?
Yes. You need fsfast:
Please correct my stupid copy-paste errors before compiling.
/*
* This programs turns on/off delayed I/O on a filesystem.
*
* Usage: fastfs filesystem fast|slow|status
*
* Note that it is intended for use with restore(8)
* to speed up full filesystem restores. Remember
* that if a filesystem is running with delayed I/O
* enabled when the system crashes it can result in
* fsck being unable to "fix" the filesystem on reboot
* without manual intervention.
*
* Typical use is
*
* fastfs /home fast
* cd /home; restore rf /dev/rst5
* fastfs /home slow
*
* The above gives about a 500% increase in the speed of
* the restore (your milage may vary).
*
* Its also good for /tmp giving most of the benifits of tmpfs
* without the problems.
*
* In rc.local
*
* fastfs /tmp fast
*
* but you may need to add fsck -y /tmp into /etc/rc.boot
* before the real fsck to ensure the machine always boots
* (I have not done this yet).
* pdg@cs.uow.EDU.AU
*/
#include <stdio.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
extern char *sys_errlist[];
#define STATUS 0
#define FAST 1
#define SLOW 2
int
main(argc, argv)
int argc;
char **argv;
{
int fd;
int flag;
int action;
if (geteuid() != 0)
{
fprintf(stderr,"%s: Must run as root.\n", argv[0]);
exit(1);
}
if (argc == 2)
{
action = STATUS;
}
else
{
if (argc != 3)
{
fprintf(stderr,"Usage: %s path
{fast|slow|status}\n",argv[0]);
exit(2);
}
if (!strcasecmp(argv[2], "status"))
{
action = STATUS;
}
if (!strcasecmp(argv[2], "fast"))
{
action = FAST;
}
if (!strcasecmp(argv[2], "slow"))
{
action = SLOW;
}
}
if ((fd = open(argv[1], O_RDONLY)) < 0)
{
fprintf(stderr,"%s: Unable to open \"%s\"\n%s\n",
argv[0],
argv[1], sys_errlist[errno]);
exit(3);
}
if (action == STATUS)
{
if (ioctl(fd, FIODIOS, &flag) != 0)
{
fprintf(stderr,"%s: ioctl failed%s\n", argv[0],
sys_errl
ist[errno]);
exit(4);
}
if (flag == 0) printf("%s is slow.\n", argv[1]);
else printf("%s is fast\n", argv[1]);
exit(0);
}
if (action == FAST)
flag = 1;
else
flag = 0;
if (ioctl(fd, FIODIO, &flag) != 0)
{
fprintf(stderr,"%s: ioctl failed\n%s\n", argv[0],
sys_errlist[er
rno]);
exit(5);
}
printf("%s is now %s\n",argv[1], flag ? "fast" : "slow");
exit(0);
}
regards,
Hans
--
Ir. Hans Lambermont http://www.mpn.cp.philips.com/Hans.Lambermont
TIS/INS, VN507 Hans.Lambermont@mpn.cp.philips.com
Origin IT Systems Management/NL bv phone/fax: (+31 40 27) 85376/88729
PO Box 218, 5600MD Eindhoven, Netherlands GSM: (+31) 6 53252172
Technical Details
Message-ID:
<34CDB0AE.41C67EA6@nl.origin-it.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:
<p5en1vmbpi.fsf@baynetworks.com>Show Full Headers
Complete Article Headers
Message-ID: <34CDB0AE.41C67EA6@nl.origin-it.com> Subject: Re: INN vs update(8) on SunOS Date: Tue, 27 Jan 1998 00:00:00 +0000 From: Hans Lambermont <Hans.Lambermont@nl.origin-it.com> References: <p5en1vmbpi.fsf@baynetworks.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-mail X-Deja-AN: 319605449 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Cache-Post-Path: dibbs1.mpn.cp.philips.com!unknown@pc4.mpn.cp.philips.com To: psmith@baynetworks.com Content-Type: text/plain; charset=us-ascii Organization: $HOSTNAME Newsgroups: news.software.nntp