New: [r300g] slowdown with r300g threading
https://bugs.freedesktop.org/show_bug.cgi?id=34929
Summary: [r300g] slowdown with r300g threading
Product: Mesa
Version: git
Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r300
AssignedTo: [email protected]
ReportedBy: [email protected]
I noticed that since r300g threading was enabled many applications slowed down. On setting RADEON_THREAD=0 openarena go from 94.9 to 100.0, glxgears (FWIW) from 1275 to 1632.
Applications running under gdb shows hundreds of:
[New Thread 0xb6af3b70 (LWP 4622)]
[Thread 0xb6af3b70 (LWP 4622) exited]
[New Thread 0xb6af3b70 (LWP 4623)]
[Thread 0xb6af3b70 (LWP 4623) exited]
and slowdown even more (glxgears drop to ~100 FPS, supertuxkart drop by 50%).
I am running current mesa git + kernel 2.6.37.2 with a RV530 on an Intel Core Duo.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 34929] [r300g] slowdown with r300g threading
https://bugs.freedesktop.org/show_bug.cgi?id=34929
--- Comment #1 from Marek Olšák <[email protected]> 2011-03-02 08:57:46 PST --- You have a single-core processor, right? Does commit f6dbcb92bf4a3597c7b3da890ffafc84951f25df fix this?
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 34929] [r300g] slowdown with r300g threading
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=34929
--- Comment #2 from Fabio Pedretti <[email protected]> 2011-03-02 09:08:50 PST --- (In reply to comment #1)
Quoted 1 line
You have a single-core processor, right?
No, I already specified I have a Core Duo (T2600, dual core) since I suspected I was asked for that...
Quoted 2 lines
Does commit
f6dbcb92bf4a3597c7b3da890ffafc84951f25dffix this?
It doesn't change nothing, indeed.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 34929] [r300g] slowdown with r300g threading
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=34929
--- Comment #3 from Marek Olšák <[email protected]> 2011-03-02 09:53:12 PST --- I can't see a significant performance difference with the games you mentioned. openarena fps went from 93 to 91 with threading. glxgears frames went from 15k to 17k. Torcs fps went from 23 to 27. There is no visible difference in supertuxkart. I don't say it always improves performance, but it should mostly be a win.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 34929] [r300g] slowdown with r300g threading
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=34929
--- Comment #4 from Fabio Pedretti <[email protected]> 2011-03-03 02:06:34 PST --- (In reply to comment #3)
Quoted 5 lines
I can't see a significant performance difference with the games you mentioned. openarena fps went from 93 to 91 with threading. glxgears frames went from 15k to 17k. Torcs fps went from 23 to 27. There is no visible difference in supertuxkart. I don't say it always improves performance, but it should mostly be a win.
Without gdb torcs is about the same but I definitively get a slowdown with glxgears:
$ vblank_mode=0 RADEON_THREAD=0 glxgears 2>&1 | grep FPS 8445 frames in 5.0 seconds = 1688.847 FPS 8196 frames in 5.0 seconds = 1639.119 FPS 8197 frames in 5.0 seconds = 1639.396 FPS
$ vblank_mode=0 glxgears 2>&1 | grep FPS 6789 frames in 5.0 seconds = 1357.671 FPS 6878 frames in 5.0 seconds = 1375.596 FPS 6879 frames in 5.0 seconds = 1375.797 FPS
Did you try running some apps under gdb? The problem is hugely amplified with it. Example:
$ vblank_mode=0 RADEON_THREAD=0 gdb glxgears 2>&1 | grep FPS 8171 frames in 5.0 seconds = 1634.191 FPS 8258 frames in 5.0 seconds = 1651.503 FPS 8544 frames in 5.0 seconds = 1708.673 FPS
$ vblank_mode=0 gdb glxgears 2>&1 | grep FPS 1216 frames in 5.0 seconds = 242.979 FPS 1131 frames in 5.0 seconds = 226.024 FPS 862 frames in 5.0 seconds = 172.242 FPS
It looks like opening/exiting threads has a noticeable overhead.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 34929] [r300g] slowdown with r300g threading
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=34929
--- Comment #5 from Thierry Vignaud <[email protected]> 2011-03-03 07:49:34 PST --- Come on, you cannot decently compare performance when running under GDB... GDB has its own thread overhead
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 34929] [r300g] slowdown with r300g threading
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=34929
--- Comment #6 from Fabio Pedretti <[email protected]> 2011-03-04 02:34:24 PST --- (In reply to comment #5)
Quoted 2 lines
Come on, you cannot decently compare performance when running under GDB... GDB has its own thread overhead
The point is that on my system, for whatever reason, r300g threading make every application I tried slower (or at least not faster), with or without gdb. Running it under gdb amplifies the problem and may be a useful test case to further debug the problem to who, instead, got the speedups, possibly because on his system the thread management overhead is less than the benefit from using two CPU cores. Maybe it's possible to leave the thread always open without opening/exiting it many times.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 34929] [r300g] slowdown with r300g threading
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=34929
--- Comment #7 from Marek Olšák <[email protected]> 2011-03-07 23:29:27 PST --- Does commit 5650a719f0c69c00954e47bd7a7b3e9433cb551d improve anything? It speeds up glxgears here.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 34929] [r300g] slowdown with r300g threading
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=34929
--- Comment #8 from Fabio Pedretti <[email protected]> 2011-03-08 02:22:57 PST --- (In reply to comment #7)
Quoted 2 lines
Does commit
5650a719f0c69c00954e47bd7a7b3e9433cb551dimprove anything? It speeds up glxgears here.
Definitively. Now on enabling threading:
- torcs goes from ~23 to ~28 fps (before was ~20 with or without threading);
- glxgears with or without gdb doesn't slowdown any more, however I also don't get any speedup, fps are all within 1.5% (interestingly gdb no longer prints the 'New Thread...', 'Thread ... exited' info, it looks like the same path is always taken);
- openarena without gdb is still a bit slower (~100 vs ~103 fps);
- openarena under gdb is still a lot slower (~76 vs ~103).
(Note that when running under gdb to get correct numbers I add '2>&1 > /dev/null' or else the thread info printing on console slowdown apps even more.)
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 34929] [r300g] slowdown with r300g threading
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=34929
--- Comment #9 from Fabio Pedretti <[email protected]> 2011-03-08 06:07:15 PST ---
Quoted 1 line
- torcs goes from ~23 to ~28 fps (before was ~20 with or without threading);
Note: for some reason torcs here still gives about ~20 fps when vblank_mode=0 is not set, threading enabled or not. So the ~20 I was getting before was because of that. Testing again the pre 5650a7 with vblank_mode=0 (as done with glxgears and openarena) still gives ~23 (thread off) and ~28 fps (thread on).
Quoted 1 line
- openarena without gdb is still a bit slower (~100 vs ~103 fps);
With pre 5650a7 I am getting a max of ~96 fps.
Quoted 1 line
- openarena under gdb is still a lot slower (~76 vs ~103).
With pre 5650a7 I am getting a max of ~38 fps.
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 34929] [r300g] slowdown with r300g threading
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=34929
Marek Olšák <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME--- Comment #10 from Marek Olšák <[email protected]> 2011-06-08 17:20:48 PDT --- (In reply to comment #8)
Quoted 1 line
- openarena without gdb is still a bit slower (~100 vs ~103 fps);
Because that was the only remaining slowdown and now I can't see any difference between threading enabled and disabled in openarena (if I enable hyperz, there is a slowdown 153->152 fps with threading off->on, respectively, which I don't consider significant, given the improvement in other apps), I am closing this bug.
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 34929] [r300g] slowdown with r300g threading
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=34929
Fabio Pedretti <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|WORKSFORME |FIXED
--- Comment #11 from Fabio Pedretti <[email protected]> 2011-08-30 06:35:26 PDT --- This commit fixes the performance regression when running under gdb:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=210ddf0819b5acf87a614214b6d4b02193aafa4a
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.