Bug 2249838 - Regression performance VMware Workstation X11
Summary: Regression performance VMware Workstation X11
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: libdrm
Version: 39
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-15 14:53 UTC by Stefan Hoffmeister
Modified: 2024-11-27 22:04 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-11-27 22:04:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Stefan Hoffmeister 2023-11-15 14:53:49 UTC
libdrm-2.4.117 comes with a performance regression relative to libdrm-2.4.114 when run under VMware Workstation 17.5 with X11.

This appears to be specific to VMware Workstation (and not tied to a specific version of VMware Workstation)

Startup of any application which uses glXChooseVisual (effectively all X11 applications) is delayed by at least two seconds due to (unknown) changes introduced between 2.4.114 and 2.4.117 in libdrm.

This has immediate impact on anything X11 - including the GNOME Desktop, any X11 applications.

Reproducible: Always

Steps to Reproduce:
1. install fresh F39 Workstation
2. sudo dnf upgrade --refresh
3. reboot
4. log into GNOME on X11 
// already notice major lag
5. start "Terminal"
// notice major lag
6. run "glxinfo64 -B"
// notice major lag - this should return immediately
Actual Results:  
"glxinfo64 -B" should immediately show results

Expected Results:  
"glxinfo64 -B" results show instantaneously

glxinfo64 is used as the reproducer for simplicity. The same behaviour will be experienced with any other X application.

https://discussion.fedoraproject.org/t/x11-huge-delay-for-each-process-vmware-workstation-regression/95708 has detail, including ltrace and perf output related to the "glXChooseVisual" call.

Note that Archlinux with the same release of libdrm has excellent performance.

From what I can tell, Fedora Linux has something distribution-specific (which is not SELinux) that causes friction on X11 applications. Even with the regression above removed, note that glXChooseVisual returns within 0.02 seconds on Archlinux, while it returns within 0.8 seconds on Fedora in the "good state". It would be very helpful of not only the reported regression could be removed, but if some of the underlying detrimental challenges could be addressed.

Comment 1 Stefan Hoffmeister 2023-11-15 14:55:07 UTC
Running `sudo dnf install libdrm-2.4.114-3.fc39.x86_64` fixes the regression.

Comment 2 Stefan Hoffmeister 2023-11-15 15:15:25 UTC
Just to clarify - this is running F39 as a guest operating system inside VMware Workstation (which in this case has Microsoft Windows as the host).

Comment 3 Stefan Hoffmeister 2023-11-16 06:58:06 UTC
Root cause is 4b51e34d1ade77bd5dbd185bf08fb96e993db549 at https://gitlab.freedesktop.org/mesa/drm/-/commit/4b51e34d1ade77bd5dbd185bf08fb96e993db549

The patch below restores the previous performance (the commit cannot be simply reverted, as that would cause conflicts on the added comment).

Please note, though, that Archlinux works fine with DRM_MAX_MINOR at 64. This means, as far as I can tell, that any increase in DRM_MAX_MINOR only exposes / triggers a weakness / defect in Fedora general distribution setup. This general weakness might also be responsible for the additional - albeit less egregious - cost in startup described above: After the patch below has been applied, glXChooseVisual returns on Archlinux after 0.02ms, on Fedora after 0.8ms.

As far as I can see,
* the patch below should be applied on the Fedora package
* root causing should result in removal of the general slowness of glXChooseVisual on Fedora
* the patch would then be remove again from the Fedora package


```
diff --git a/xf86drm.h b/xf86drm.h
index d20df47d..095d51a2 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -44,7 +44,7 @@ extern "C" {
 #endif
 
 #ifndef DRM_MAX_MINOR
-#define DRM_MAX_MINOR   64 /* deprecated */
+#define DRM_MAX_MINOR   16 /* deprecated */
 #endif
 
 #if defined(__linux__)
```

Comment 4 Aoife Moloney 2024-11-13 10:04:54 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Aoife Moloney 2024-11-27 22:04:54 UTC
Fedora Linux 39 entered end-of-life (EOL) status on 2024-11-26.

Fedora Linux 39 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.