[sheepdog-users] Performance without cache

Liu Yuan namei.unix at gmail.com
Tue Aug 20 12:33:20 CEST 2013


On Tue, Aug 20, 2013 at 12:14:13PM +0200, Valerio Pachera wrote:
> 2013/8/20 Liu Yuan <namei.unix at gmail.com>:
> > How about 'dd if=/dev/zero of=c bs=1M count=512 oflag=direct,sync' in host?
> 
> The host is test004.
> /mnt/sheep/dsk02 is the mount point of the mechanical disk.
> 
> root at test004:/mnt/sheep/dsk02# dd if=/dev/zero of=c bs=1M count=512 oflag=direct
> 512+0 record dentro
> 512+0 record fuori
> 536870912 byte (537 MB) copiati, 3,93134 s, 137 MB/s
> 
> root at test004:/mnt/sheep/dsk02# dd if=/dev/zero of=c bs=1M count=512 oflag=sync
> 512+0 record dentro
> 512+0 record fuori
> 536870912 byte (537 MB) copiati, 24,5683 s, 21,9 MB/s
> 
> root at test004:/mnt/sheep/dsk02# dd if=/dev/zero of=c bs=1M count=512
> oflag=direct,sync
> 512+0 record dentro
> 512+0 record fuori
> 536870912 byte (537 MB) copiati, 23,5594 s, 22,8 MB/s

So sheepdog's performance sounds pretty good even without cache. 'oflag=direct,sync'
on the host should be the roof of performance for dd in guest. This means for
big IO requests from guest, sheepdog's overhead can be neglected.

> PS: giving both option (direct and sync), what kind of effect should give?
> I think one of them is ignored (direct).

direct means bypass host page cache(memory cache)
sync means bypass disk's internal cache.

This is why sheepdog use 'sync' for backend write, we must make sure that data
are written in the disk instead of internal cache of disk, to solve the problem
of power outage.

You can actually drop 'sync' for backend write if you have a battery-backed
RAID card to get much better performance without object cache.

For simple test, you can start sheep with '-n' option and see how dd performs
in the guest.

Thanks
Yuan



More information about the sheepdog-users mailing list