[sheepdog] [PATCH] vditest: add '-C' option to limit the maximum number of requests

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Sat Nov 3 06:01:23 CET 2012


At Sat, 03 Nov 2012 10:32:12 +0800,
Liu Yuan wrote:
> 
> On 11/02/2012 07:35 PM, MORITA Kazutaka wrote:
> > Currently, '-a' option generates too many I/O requests and causes
> > ENFILE error in sheep.  This adds '-C' option to limit the maximum
> > number of concurrent I/O requests.
> > 
> 
> What is ENFILE eorror?

ENFILE: The system limit on the total number of open files has been reached.

Sheep creates unlimited threads, so socket/2 and open/2 can cause a
ENFILE (too many open file) error when it accepts many I/O requests
simultaneously.  I'm not sure whether this error can happen in real
use cases yet, but we can easily confirm it with vditest if we add,
e.g., '-C 1024' option.

> > diff --git a/script/vditest b/script/vditest
> > index 8f6fbdd..ffaf522 100755
> > --- a/script/vditest
> > +++ b/script/vditest
> > @@ -18,7 +18,7 @@ use IPC::Open2;
> >  my $program = "vditest";
> >  my ($vdiname, $vdisize);
> >  
> > -my $use_aio = 0;
> > +my $concurrency = 1;
> 
> maybe default to a bigger value, like 128 is better?

I think defaulting to 1 (synchronous I/O test) is better, which is
useful for examining the I/O latency.  The best value of the number of
concurrency depends on the machine spec, so users should choose the
value with '-C' option when they want to do concurrent I/O tests.

Thanks,

Kazutaka



More information about the sheepdog mailing list