On Jul 7, 2008, at 10:57 AM, Phil Carns wrote:
Sam Lang wrote:
On Jul 7, 2008, at 10:24 AM, Phil Carns wrote:
There are a couple of options for dealing with the case where
num_groups > num_dfiles if we want to keep the current defaults:
1) Transparently reduce the num_groups within the distribution
calculation. From the user's perspective the params wouldn't
change; the distribution would just automatically fall back to
acting like simple stripe. We would just need to add this to the
top of a few of the dist functions:
if(num_groups > server_ct)
{
num_groups = server_ct;
}
2) Return an explicit error at create time. The varstrip
distribution has this behavior now; it actually prevents you from
creating a file if the dfile count isn't plausible for the
distribution parameters. The way to do this is to implement the
get_num_dfiles() function in twod_stripe so that it can perform a
safety check and return an error at create time if the user tries
to use too high of a num_groups setting. On the command line you
would get a generic errno (EINVAL or whatever) but we could put a
descriptive message in the logs.
Option 1) seems reasonable to me; it is a small code change, we
get to keep the existing desirable default parameters, and the
single server case just transparently falls back to simple stripe.
There's a third option, and what I've been proposing -- instead of
changing the actual parameter, adjust the value during the
logical_to_physical calculation.
-sam
No, that's actually the same thing I was proposing, I just didn't
realize that you meant the same thing until just now :) The code
snippet above would not change the parameter in the directory hints.
"num_groups" is a variable within the logical_to_physical_offset()
function.
Lets go with that then.
-sam
-Phil
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers