Hi, Is there any difference in using a file as disk or a big partition to Xen? Im running some benchmarks and Xen shows a great performance while creating and removing files, I mean, a performance much better than a real machine... So im figure out that the fact that im using a simple file as disk to Xen is the reason of this great performance... Can this guess be true? Thanks, Att. Artur Baruchi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Artur Baruchi schrieb:> Hi, > > Is there any difference in using a file as disk or a big partition to Xen? > Im running some benchmarks and Xen shows a great performance while > creating and removing files, I mean, a performance much better than a > real machine... > So im figure out that the fact that im using a simple file as disk to > Xen is the reason of this great performance... Can this guess be true?I guess it can be true, if the tests were short. dom0 treats this "file image" as a regular file, so, as you write to it from domU (create/remove files), dom0''s kernel may decide not to actually "sync" the file yet. That is, your changes are purely in RAM at this point, and this is why it''s so fast. Now, try to press reset button in dom0, and after reboot, see how many files you really have - or, if you can still open the image ;) "Creating and removing files" is not that great benchmark. Try it with a bigger amount of files (millions etc.), I expect the performance won''t be better for an "image file" partition anymore. -- Tomasz Chmielewski http://blog.wpkg.org _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tomasz Chmielewski wrote:> Artur Baruchi schrieb: >> Hi, >> >> Is there any difference in using a file as disk or a big partition to >> Xen? >> Im running some benchmarks and Xen shows a great performance while >> creating and removing files, I mean, a performance much better than a >> real machine... >> So im figure out that the fact that im using a simple file as disk to >> Xen is the reason of this great performance... Can this guess be true? > > I guess it can be true, if the tests were short. > > dom0 treats this "file image" as a regular file, so, as you write to > it from domU (create/remove files), dom0''s kernel may decide not to > actually "sync" the file yet. > That is, your changes are purely in RAM at this point, and this is why > it''s so fast. Now, try to press reset button in dom0, and after > reboot, see how many files you really have - or, if you can still open > the image ;) > > "Creating and removing files" is not that great benchmark. > > Try it with a bigger amount of files (millions etc.), I expect the > performance won''t be better for an "image file" partition anymore. >For this same reason, Win98 was much faster virtualized in VMware on biggish hardware (1GB RAM). Win98 reboots were VERY FAST since about 1/2 of the Win98 disk image was in my hosts disk cache. Here is a question... whats the preferred fastest backend to store a disk image on? Or... maybe the fastest Xen virtual drive is actually a raw partition or RAID or logical volume management? I currently have Xen images in files (file backed?)... Then sit on a software RAID-0 on 400 out of 500GB of 2 SATA drives. I have a reiserfs filesystem on /dev/md0 and that is where my image files are. I expected that this would be quite fast, but my drives seem to sketch around ALOT. I can''t imagine that LVM would buy you any more performance. Would ext3? I think the shotgun approach would be to make a /dev/md1 that was smaller (narrower slices) to fix the sketching around. Then take the file image mapping out of the picture by giving the VM a raw /dev/md1 partition. I know LVM is very popular for use with Xen, is it because of convenience (resize and management etc) or are there performance advantages too that I don''t comprehend? -Scott _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sat, Sep 22, 2007 at 11:41:18AM -0600, Scott Serr wrote:> > Here is a question... whats the preferred fastest backend to store a > disk image on? Or...I made experiments putting the file belonging to a domU in a ramdisk, doing file-benchmarks in the domU obviously also only happen in the dom0-ram, guess not much could beat that.> maybe the fastest Xen virtual drive is actually a raw partition or RAID > or logical volume management?You should layer this a bit. First: raid or not raid is a question of money/speed/how reliadble your want your data to be stored. Second and indepently: lvm vs. file-backend. If its worth the hassle benchmark with your usecases yourself, from my benchmarking ive seen filebased domU on internal disks have been faster for i/o than ones on lvm. On iscsi lvm did a bit better than filebased. Filesystem was xfs, and the test was only raw writing in the domU. And just using the ancient file: syntax for file-domU since SuSE just recently fixed the tap:aio support.> filesystem on /dev/md0 and that is where my image files are. I expected > that this would be quite fast, but my drives seem to sketch around > ALOT. I can''t imagine that LVM would buy you any more performance. > Would ext3? >From what i recall from filesystem-benchmarks with reiser you get a bitbetter performance, especially when using many small files (which isnt the case here) and at the cost of higher cpu-usage in dom0 here. Christian _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users