[sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-23 Thread MORITA Kazutaka
Currently, the farm driver has a fatal problem in object recovery; it blocks I/O requests long time while moving stale objects to the backend store. Here is a test script to show that. == sheep -d /store/0 -z 0 -p 7000 sleep 2 collie cluster format -c 1 -b $1 collie vdi create test 100G -P sheep

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-23 Thread Liu Yuan
On 08/23/2012 10:58 PM, MORITA Kazutaka wrote: > To fix this problem, we need to move stale objects in the worker > thread. I've spent several days trying to fix it, but it seems to > need a lot of work, and it looks difficult to stable the change in a > short time. > Last time your patches to f

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-23 Thread MORITA Kazutaka
At Fri, 24 Aug 2012 00:03:09 +0800, Liu Yuan wrote: > > On 08/23/2012 10:58 PM, MORITA Kazutaka wrote: > > To fix this problem, we need to move stale objects in the worker > > thread. I've spent several days trying to fix it, but it seems to > > need a lot of work, and it looks difficult to stabl

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-23 Thread MORITA Kazutaka
At Fri, 24 Aug 2012 00:03:09 +0800, Liu Yuan wrote: > > $ ./farm.sh simple > > using backend simple store > > NameIdSizeUsed SharedCreation time VDI id Tag > > test 1 100 GB 100 GB 0.0 MB 2012-08-23 11:29 7c2b25 > > > > real0m1.016s > > user0m0.092s

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-23 Thread Liu Yuan
On 08/24/2012 01:06 AM, MORITA Kazutaka wrote: > The result of simple store is not 1 minute but 1 second. Oops, I indeed mistook it. Thanks, Yuan -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-23 Thread Liu Yuan
On 08/23/2012 10:58 PM, MORITA Kazutaka wrote: > This introduces a storage driver 'simple_store' based on the current > storage interface. The design of the new simple_store is similar to > one of the farm driver. The main difference is that farm uses the > sha1 based backend store for stale obje

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-23 Thread MORITA Kazutaka
At Fri, 24 Aug 2012 12:44:05 +0800, Liu Yuan wrote: > > I am also in favor of simple implementation. I think a dedicated .stale > directory idea could also apply to Farm. So How about following approach: > > merge simple store into Farm, then it actually run the code as > current simple s

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread Liu Yuan
On 08/24/2012 01:37 PM, MORITA Kazutaka wrote: > It is a good idea to refine the farm backend store too, but simple > store should be added as another driver, I think. The simple driver > would become a good tutorial to introduce new drivers. Okay, I'd suggest use default_xxx as prefix instead of

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread MORITA Kazutaka
At Fri, 24 Aug 2012 15:04:56 +0800, Liu Yuan wrote: > > On 08/24/2012 01:37 PM, MORITA Kazutaka wrote: > > It is a good idea to refine the farm backend store too, but simple > > store should be added as another driver, I think. The simple driver > > would become a good tutorial to introduce new d

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread Liu Yuan
On 08/24/2012 03:15 PM, MORITA Kazutaka wrote: > At Fri, 24 Aug 2012 15:04:56 +0800, > Liu Yuan wrote: >> >> On 08/24/2012 01:37 PM, MORITA Kazutaka wrote: >>> It is a good idea to refine the farm backend store too, but simple >>> store should be added as another driver, I think. The simple driver

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread Liu Yuan
On 08/24/2012 03:28 PM, Liu Yuan wrote: > which is also relevant to which is also not relevant to -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread Liu Yuan
On 08/24/2012 03:28 PM, Liu Yuan wrote: >>> >> >>> >> I'll go to update the farm's io path to use defaul_xxx functions, I >>> >> think this simple store implementation can be nicely applied to farm. >> > >> > The update will change the data layout of farm. How about introducing >> > 'farm2'? I g

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread MORITA Kazutaka
At Fri, 24 Aug 2012 15:28:07 +0800, Liu Yuan wrote: > > I think simple_store.c itself won't cause confusion. 'default store' > will instead cause greater confusion. The reason I think 'simple' is not good is that we had a 'simple' driver before which had a completely different data layout. There

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread Liu Yuan
On 08/24/2012 03:37 PM, MORITA Kazutaka wrote: > The reason I think 'simple' is not good is that we had a 'simple' > driver before which had a completely different data layout. There may > be some users who still use a simple driver with old sheepdog version. > If they upgrade to the latest versio

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread MORITA Kazutaka
At Fri, 24 Aug 2012 15:40:14 +0800, Liu Yuan wrote: > > On 08/24/2012 03:37 PM, MORITA Kazutaka wrote: > > The reason I think 'simple' is not good is that we had a 'simple' > > driver before which had a completely different data layout. There may > > be some users who still use a simple driver wi

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread Liu Yuan
On 08/23/2012 10:58 PM, MORITA Kazutaka wrote: > +static int simple_store_read_from_path(uint64_t oid, char *path, > +struct siocb *iocb) > +{ > + int flags = def_open_flags, fd, ret = SD_RES_SUCCESS; > + ssize_t size; > + > + if (!is_data_obj(oid)) >

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread MORITA Kazutaka
At Fri, 24 Aug 2012 15:57:37 +0800, Liu Yuan wrote: > > On 08/23/2012 10:58 PM, MORITA Kazutaka wrote: > > +static int simple_store_read_from_path(uint64_t oid, char *path, > > + struct siocb *iocb) > > +{ > > + int flags = def_open_flags, fd, ret = SD_RES_SUCCES

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread Liu Yuan
On 08/24/2012 04:08 PM, MORITA Kazutaka wrote: > I think both farm and plain don't need it. Can you explain a scenario > where it can cause a problem? Qemu can issue multiple requests on the same oid, doesn't it? If there is some kind of write barrier to prevent reading stale oid or actually no p

Re: [sheepdog] [PATCH] sheep: add simple_store driver again

2012-08-24 Thread MORITA Kazutaka
At Fri, 24 Aug 2012 16:13:51 +0800, Liu Yuan wrote: > > On 08/24/2012 04:08 PM, MORITA Kazutaka wrote: > > I think both farm and plain don't need it. Can you explain a scenario > > where it can cause a problem? > > Qemu can issue multiple requests on the same oid, doesn't it? If there Yes, but