lkml.org 
[lkml]   [1997]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectMore on 2.1.65 slowdown (disc thrashing)
  Hi, all. To followup on my previous message where I reported a
slowdown and increased disc head movement when running latex2html on a
document, I've had a look at what perl does and distilled the essence.

The attached programme demonstrates the point. With kernel 2.1.42 and
2.1.62 it generates steady disc activity, but with relatively little
head movement. Running with kernel 2.1.65 causes a lot of head
movement. The programme was run without arguments on a filesystem (1k
blocksize) with the following 'df' output:

Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/sdd2 2203855 449139 1732602 21% /data

The disc is a FUJITSU Model: M2952S-512 connected to an NCR 53c857.

So, do those who know think that the new behaviour is correct (if so,
why?), or is it a bug or side-effect? I'm hoping the latter and that
it's fixable, because it really slows down latex2html (and I have a
few pretty big "living" documents).

Regards,

Richard....

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>

#define MAX_ITER 10000


int main (int argc, char **argv)
{
int count;
int max_iter = MAX_ITER;
FILE *fp;

if (argc > 1) max_iter = atoi (argv[1]);
while (1)
{
if ( ( fp = fopen ("a", "w") ) == NULL )
{
fprintf ( stderr, "Error opening: \"a\"\t%s\n", strerror (errno) );
exit (1);
}
for (count = 0; count < max_iter; ++count) fputs ("hi\n", fp);
fflush (fp);
fsync ( fileno (fp) );
fclose (fp);
if ( ( fp = fopen ("b", "w") ) == NULL )
{
fprintf ( stderr, "Error opening: \"b\"\t%s\n", strerror (errno) );
exit (1);
}
for (count = 0; count < max_iter; ++count) fputs ("bye\n", fp);
fflush (fp);
fsync ( fileno (fp) );
fclose (fp);
}
} /* End Function main */

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.044 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site