VMware {code} Community
VladimirT
Contributor
Contributor

VixDiskLib_Read/Write performance

Hi,

Comparing VixDiskLib_Read and VixDiskLib_Write performance with vcbMounter to backup vm and vcbMounter is more then twice faster. I tried different buffer sizes for VixDiskLib_Read/Write without real improvement. Looking at disk I/O I found that when I run VixDiskLib_Read even with large buffers(512Kb), it always issues 4Kb reads to disk and vcbMounter uses 256Kb reads. Am I missing something or it is by design? I am using san advanced transport.

Thanks,

Vladimir

0 Kudos
12 Replies
admin
Immortal
Immortal

Where/how are you measuring the read size?

-Sudarsan

0 Kudos
VladimirT
Contributor
Contributor

I am trying to switch from running VCB as external program to using api. And noticed that api takes much longer to complete. Investigating I looked at following counters in

Performance Monitor "PhisicalDisk\Avg. Disk Bytes/Read" and "PhisicalDisk\Disk Reads/sec".

PhisicalDisk\Avg. Disk Bytes/Read counter shows 4096 when using api and running vcbMounter on same VM shows 262144.

Thanks,

Vladimir

0 Kudos
admin
Immortal
Immortal

Can you show the code snippet that opens the disk?

Thanks

Sudarsan

0 Kudos
VladimirT
Contributor
Contributor

Basically it is vixdiskSample DoDump

vixError = VixDiskLib_InitEx(1, 1,

Log,

Warn,

Panic,

"C:Program Files (x86)
VMware\VMware Virtual Disk Development Kit
doc
sample\Debug",

"C:\Program Files (x86)
VMware\VMware Virtual Disk Development Kit
doc
sample
Debug\vixDiskLib.config");

CHECK(vixError);

/* Test Mouting remote disk */

cnxParams.serverName = _strdup("192.168.2.50");

cnxParams.credType = VIXDISKLIB_CRED_UID;

cnxParams.creds.uid.userName = _strdup("root");

cnxParams.creds.uid.password = "**********";

cnxParams.port = 902;

cnxParams.vmxSpec = _strdup("moRef=1184");

vixError = VixDiskLib_ConnectEx(&cnxParams, true, "/vmfs/volumes/4a58d473-f30ebdb8-cda9-000e0cc65ae8/TestServer/TestServer.vmx-snapshot-16","san", &esxConnection);

CHECK(vixError);

vixError = VixDiskLib_Open(connection, "[VOL001|http://communities.vmware.com/community-document-picker.jspa?communityID=&subject=VOL001] TestServer/TestServer.vmdk", openFlags, &diskHandle);

CHECK(vixError);

uint8 buf[VIXDISKLIB_SECTOR_SIZE * 512|http://communities.vmware.com/community-document-picker.jspa?communityID=&subject=VIXDISKLIB_SECTOR_SIZE*512];

for (i = 0; i < 20000000; i+=512) {

VixError vixError = VixDiskLib_Read(diskHandle, i, 512, buf);

CHECK(vixError);

}

0 Kudos
admin
Immortal
Immortal

Can you see if VIXDISKLIB_FLAG_OPEN_UNBUFFERED makes a difference?

Thanks

Sudarsan

0 Kudos
VladimirT
Contributor
Contributor

Hi Sudarsan,

I added VIXDISKLIB_FLAG_OPEN_UNBUFFERED, but still the same. Also looked at VixDiskLib_Write and looks like writes done with 64K buffers.

Vladimir

0 Kudos
Blueace
Contributor
Contributor

Hi,

are there any news on this problem.

I have the same problem. With VixDiskLib_Read/Write slow performance.

When I use VixDiskLib_Clone the performance is OK.

Torsten

0 Kudos
admin
Immortal
Immortal

I have not seen this problem, I will need to reproduce to see what the issue is, sorry for the delay.

Thanks

0 Kudos
admin
Immortal
Immortal

I can reproduce this behavior, I will update with status once we decide on what next.

Thanks for pointing this out,

Sudarsan

0 Kudos
Ashwin89
Contributor
Contributor

Sudarshan,

Do you have any update on this? I am also facing the same issue.

VCBMounter used to do compression while taking the backup.

Can we achive the same using vStorage?

0 Kudos
admin
Immortal
Immortal

Ashwin,

This issue is fixed in the latest VDDK release that was out for beta. Can you please contact your TAM for the details?

Thanks

Sudarsan

0 Kudos
Ashwin89
Contributor
Contributor

Thanks a lot Sudarshan.

-AsHwIN

0 Kudos