All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: kvm@kernel.org
Subject: [Bug 196409] New: kvm_amd nested pagetable gpu passthrough performance oddities
Date: Tue, 18 Jul 2017 10:39:59 +0000	[thread overview]
Message-ID: <bug-196409-28872@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=196409

            Bug ID: 196409
           Summary: kvm_amd nested pagetable gpu passthrough performance
                    oddities
           Product: Virtualization
           Version: unspecified
    Kernel Version: 4.10.8-1
          Hardware: x86-64
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: kvm
          Assignee: virtualization_kvm@kernel-bugs.osdl.org
          Reporter: efeu@markju.com
        Regression: No

The hardware I was testing with:
AMD Ryzen R7 1700
Gigabyte GA-AX370-Gaming 5
different GPUs
Windows10 x64 Guest

But this bug is reproducable on AMD FX series too.

While community is discussing for a while about this bug, I haven't found it
here. Based on our discussion here:
http://www.spinics.net/lists/kvm/msg149446.html

While npt is enabled a passed through GPU is giving much less performance as
expected. Here some test results the community already did:

First Heaven benchmark with ultra settings on 1920x1080:

- DirectX 11:
  - npt=0: 87.0 fps
  - npt=1: 78.4 fps (10% drop)
- DirectX 9:
  - npt=0: 100.0 fps
  - npt=1: 66.4 fps (33% drop)
- OpenGL:
  - npt=0: 82.5 fps
  - npt=1: 35.2 fps (58% drop)

Heaven Benchmark again, this time with low settings on 1280x720:

- DirectX 11:
  - npt=0: 182.5 fps
  - npt=1: 140.1 fps (25% drop)
- DirectX 9:
  - npt=0: 169.2 fps
  - npt=1: 74.1 fps (56% drop)
- OpenGL:
  - npt=0: 202.8 fps
  - npt=1: 45.0 fps (78% drop)

PerformanceTest 9.0 3d benchmark:

- DirectX 9:
  - npt=0: 157 fps
  - npt=1: 13 fps (92% drop)
- DirectX 10:
  - npt=0: 220 fps
  - npt=1: 212 fps (4% drop)
- DirectX 11:
  - npt=0: 234 fps
  - npt=1: 140 fps (40% drop)
- DirectX 12:
  - npt=0: 88 fps (scored 35 because of the penalized FPS of not being
able to run at 4k)
  - npt=1: 4.5 fps (scored 1, 95% drop)
- GPU Compute:
  - Mandel:
    - npt=0: ~= 2000 fps
    - npt=1: ~= 2000 fps
  - Bitonic Sort:
    - npt=0: ~= 153583696.0 elements/sec
    - npt=1: ~= 106233376.0 elements/sec (31% drop)
  - QJulia4D:
    - npt=0: ~= 1000 fps
    - npt=1: ~= 1000 fps
  - OpenCL:
    - npt=0: ~= 750 fps
    - npt=1: ~= 220 fps
Some more data from 3DMark benchmarks:

Time Spy(DirectX 12):
- Graphics test 1:
  - npt=0: 37.65 FPS
  - npt=1: 24.22 FPS (36% drop)
- Graphics test 2:
  - npt=0: 33.05 FPS
  - npt=1: 29.65 FPS (10% drop)
- CPU test:
  - npt=0: 17.35 FPS
  - npt=1: 12.03 FPS (31% drop)

Fire Strike(DirectX 11):
- Graphics test 1:
  - npt=0: 80.56 FPS
  - npt=1: 41.89 FPS (49% drop)
- Graphics test 2:
  - npt=0: 70.64 FPS
  - npt=1: 60.75 FPS (14% drop)
- Physics test:
  - npt=0: 50.14 FPS
  - npt=1: 5.78 FPS (89% drop)
- Combined test:
  - npt=0: 32.83 FPS
  - npt=1: 17.70 FPS (47% drop)

Sky Diver(DirectX 11):
- Graphics test 1:
  - npt=0: 248.81 FPS
  - npt=1: 173.63 FPS (31% drop)
- Graphics test 2:
  - npt=0: 250.49 FPS
  - npt=1: 124.84 FPS (51% drop)
- Physics test:
  - 8 threads:
    - npt=0: 140.93 FPS
    - npt=1: 119.08 FPS (15% drop)
  - 24 threads:
    - npt=0: 110.22 FPS
    - npt=1: 74.55 FPS (33% drop)
  - 48 threads:
    - npt=1: 71.56 FPS
    - npt=1: 45.93 FPS (36% drop)
  - 96 threads:
    - npt=0: 41.04 FPS
    - npt=1: 24.81 FPS (40% drop)
- Combined test:
  - npt=0: 75.65 FPS
  - npt=1: 50.45 FPS (33% drop)

I compared the performance with XEN and found out there is no performance
impact, so the bug should be in the nested pagetable implementation in kvm_amd
module and not a hardware related issue in AMD-Vi.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

             reply	other threads:[~2017-07-18 10:40 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 10:39 bugzilla-daemon [this message]
2017-07-20 18:53 ` [Bug 196409] kvm_amd nested pagetable gpu passthrough performance oddities bugzilla-daemon
2017-07-26  7:33 ` bugzilla-daemon
2017-07-26  8:59 ` bugzilla-daemon
2017-07-26 13:52 ` bugzilla-daemon
2017-07-26 16:34 ` bugzilla-daemon
2017-07-27 10:40 ` bugzilla-daemon
2017-08-01  5:10 ` bugzilla-daemon
2017-08-18  6:48 ` bugzilla-daemon
2017-08-21 18:12 ` bugzilla-daemon
2017-08-25 14:33 ` bugzilla-daemon
2017-08-27 10:09 ` bugzilla-daemon
2017-08-27 15:58 ` bugzilla-daemon
2017-08-28 21:11 ` bugzilla-daemon
2017-08-30  8:36 ` bugzilla-daemon
2017-08-31 11:58 ` bugzilla-daemon
2017-09-01 13:50 ` bugzilla-daemon
2017-09-02  8:50 ` bugzilla-daemon
2017-09-02 18:44 ` bugzilla-daemon
2017-09-05 15:31 ` bugzilla-daemon
2017-09-08  9:58 ` bugzilla-daemon
2017-09-09  4:16 ` bugzilla-daemon
2017-09-13 20:57 ` bugzilla-daemon
2017-09-13 21:27 ` bugzilla-daemon
2017-09-15  7:30 ` bugzilla-daemon
2017-09-24  8:09 ` bugzilla-daemon
2017-09-24 10:43 ` bugzilla-daemon
2017-09-24 11:48 ` bugzilla-daemon
2017-09-24 12:25 ` bugzilla-daemon
2017-09-24 12:28 ` bugzilla-daemon
2017-09-24 12:59 ` bugzilla-daemon
2017-09-26 14:12 ` bugzilla-daemon
2017-10-09 10:19 ` bugzilla-daemon
2017-10-13 18:44 ` bugzilla-daemon
2017-10-24 23:42 ` bugzilla-daemon
2017-10-25 10:44 ` bugzilla-daemon
2017-10-25 18:46 ` bugzilla-daemon
2017-10-26 15:11 ` bugzilla-daemon
2017-10-27  8:34 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-196409-28872@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=kvm@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.