Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

OSR Seminars


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 6  
14 May 18 03:09
Geoffrey McRae
xxxxxx@hostfission.com
Join Date: 14 May 2018
Posts To This List: 1
Windows memory performance as a QEMU guest VM.

Hi everyone. I am seeking someone that is able to assist or at least advise on what might be the issue with memory performance when running Windows 10 as a KVM guest under QEMU. I have an AMD ThreadRipper platform running Linux, with both Windows and Linux VMs on it running under Qemu with KVM acceleration. Linux guests are able to achieve near native memory performance, at roughly 36GB/s at any copy size. However Windows guests are only able to achieve native performance until the memcpy block size exceeds exactly 1,054,735 bytes, at which point the performance drops to 12-14GB/s. Using various memcpy implementations, (glib, vcruntime, custom, apex) no matter what I do I can not improve upon 14GB/s. I have been pouring through the QEMU source for days now working with a few other people and we are unable to determine why Windows copy performance is so abysmal.
  Message 2 of 6  
14 May 18 05:02
anton bassov
xxxxxx@hotmail.com
Join Date: 16 Jul 2006
Posts To This List: 4505
Windows memory performance as a QEMU guest VM.

I just wonder if it may be somehow related to the fact that, unlike Linux, Windows allows pageable memory in the kernel.... Anton Bassov
  Message 3 of 6  
14 May 18 17:22
M M
xxxxxx@hotmail.com
Join Date: 21 Oct 2010
Posts To This List: 767
Windows memory performance as a QEMU guest VM.

What connection can you see between pageable kernel memory and memory copy performance under a hypervisor for large block sizes? Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of xxxxx@hotmail.com <xxxxx@lists.osr.com> Sent: Monday, May 14, 2018 5:02:09 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] Windows memory performance as a QEMU guest VM. I just wonder if it may be somehow related to the fact that, unlike Linux, Windows allows pageable memory in the kernel.... Anton Bassov --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer> --
  Message 4 of 6  
15 May 18 00:03
anton bassov
xxxxxx@hotmail.com
Join Date: 16 Jul 2006
Posts To This List: 4505
Windows memory performance as a QEMU guest VM.

> What connection can you see between pageable kernel memory and memory copy > performance under a hypervisor for large block sizes? Once Linux kernel does not use pageable kernel memory it can afford a really simple memory mapping mechanism - it maps the physical memory into the kernel address space as virtual_kernel_address =base_ offset + physical_address (I assume a 64-bit OS with the kernel address space being significantly larger than the size of RAM available). This approach requires memory to be physically contiguous. Therefore, if you copy a range that exceeds PAGE_SIZE it is going to be physically contiguous, no matter how large it may be. Although it has an area where the above equations does not hold because mapping is done on per-page basis (i.e. vmalloc() area), every valid virtual address in this range is still backed up by a page that is mapped to kmalloc() one. Taking into consideration the above, I just wonder if hypervisor may do some memory optimisations for a known LInux guest behind the scenes...... Anton Bassov
  Message 5 of 6  
15 May 18 04:38
Yan Vugenfirer
xxxxxx@daynix.com
Join Date: 05 Nov 2012
Posts To This List: 7
Windows memory performance as a QEMU guest VM.

Hi Geoffrey, Can you please post your QEMU command line and the benchmark code you are using? Also posting the issue on qemu-devel might improve you chance to get more help. Best regards, Yan.
  Message 6 of 6  
15 May 18 18:33
M M
xxxxxx@hotmail.com
Join Date: 21 Oct 2010
Posts To This List: 767
Windows memory performance as a QEMU guest VM.

It seems unlikely that this kind of effect could reduce the performance of memory copies in windows guests when blocks exceed ~1MB Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of xxxxx@hotmail.com <xxxxx@lists.osr.com> Sent: Tuesday, May 15, 2018 12:02:46 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] Windows memory performance as a QEMU guest VM. > What connection can you see between pageable kernel memory and memory copy > performance under a hypervisor for large block sizes? Once Linux kernel does not use pageable kernel memory it can afford a really simple memory mapping mechanism - it maps the physical memory into the kernel address space as virtual_kernel_address =base_ offset + physical_address (I assume a 64-bit OS with the kernel address space being significantly larger than the size of RAM available). This approach requires memory to be physically contiguous. Therefore, if you copy a range that exceeds PAGE_SIZE it is going to be physically contiguous, no matter how large it may be. Although it has an area where the above equations does not hold because mapping is done on per-page basis (i.e. vmalloc() area), every valid virtual address in this range is still backed up by a page that is mapped to kmalloc() one. Taking into consideration the above, I just wonder if hypervisor may do some memory optimisations for a known LInux guest behind the scenes...... Anton Bassov --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer> --
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 03:00.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license