Re: [X2Go-User] Suspending sessions causes performance slowing down

2020-06-02 Thread Ulrich Sibiller
On Tue, Jun 2, 2020 at 3:04 AM h i  wrote:
> I ran a few tests and see the issue is GUI related in our case. It seems to 
> speak to the 2nd reason for sleep you described regarding the sending of 
> pixmaps.
>
> I ran two MATLAB scripts. Both including the same steps. However, 1 script 
> suppressed pop-windows tracking the script status. The 2nd script did not 
> suppress the pop-up windows displaying

What gui toolkit is matlab using?

> real-time status. The 1st script involving command lines ran in the same 
> amount whether the session was active or suspended. No reduction of time or 
> CPU usage. The 2nd script took much longer and CPU was reduced significantly 
> while the session was suspended.
>
> A few questions:
>
> for X2GO_NXOPTIONS="sleep=0", what does 0 represent in time. If I set the 
> value to 1000, what would that mean?

This defines how long nxagent should sleep. The unit should be
microseconds but there's a ticket for doublechecking that because it
looks like a mixup happened during implementation
(https://github.com/ArcticaProject/nx-libs/issues/928).

> Is the idle-nice-level=19 for suspended sessions the default setting?

As I said I don't know the superreniver feature in detail.

> Would the supernicer setting override the x2goagent sleep option setting?

no, they are two different things.

> What would be an example command for the -irlimit option in x2goagent.options 
> file.

see https://github.com/ArcticaProject/nx-libs/issues/796

Uli
___
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user


Re: [X2Go-User] Suspending sessions causes performance slowing down

2020-06-02 Thread Johannes Töger
I can answer about the GUI toolkit. I was debugging MATLAB performance issues 
last week so I looked into this.

Matlab uses the jobamp/jogl framework. https://jogamp.org/jogl/www/

In my Ubuntu/x2go/MATE setup, it falls back on a "software OpenGL" mode, which 
actually looks like MESA/Gallium software rendering:

In Matlab:
>> opengl info
  Version: '2.1 Mesa 17.1.3'
   Vendor: 'Brian Paul'
 Renderer: 'Mesa X11'
   MaxTextureSize: 16384
   Visual: 'Visual 0x61, (RGBA 32 bits (8 8 8 8), Z 
depth 16 bits, Hardware acceleration, Double buffer, Antialias 0 samples)'
 Software: 'true'
 HardwareSupportLevel: 'none (known graphics driver issues)'
SupportsGraphicsSmoothing: 0
SupportsDepthPeelTransparency: 1
   SupportsAlignVertexCenters: 0
   Extensions: {152×1 cell}
   MaxFrameBufferSize: 16384



johannes@compute-2:/usr/local/MATLAB/R2019a/sys/opengl/lib/glnxa64$ ls -1
C11ThreadEmulationLibraryLicense.rights
EXTHeaderLicense.rights
GalliumCodeLicense.rights
GLXClientCodeLicense.rights
libGL.so.1
libGL.so.1.6.0
libGLU.rights
libGLU.so.1
libGLU.so.1.3.1
MesaDeviceDriversLicense.rights
MesaLicense.rights


— 
Johannes Töger

Associate Senior Lecturer
Cardiac MR Group
Department of Clinical Sciences Lund, Clinical Physiology
Lund University, Sweden

-Original Message-
From: x2go-user  On Behalf Of Ulrich Sibiller
Sent: Tuesday, June 2, 2020 09:15
To: h i 
Cc: x2go-user@lists.x2go.org
Subject: Re: [X2Go-User] Suspending sessions causes performance slowing down

On Tue, Jun 2, 2020 at 3:04 AM h i  wrote:
> I ran a few tests and see the issue is GUI related in our case. It seems to 
> speak to the 2nd reason for sleep you described regarding the sending of 
> pixmaps.
>
> I ran two MATLAB scripts. Both including the same steps. However, 1 
> script suppressed pop-windows tracking the script status. The 2nd 
> script did not suppress the pop-up windows displaying

What gui toolkit is matlab using?

> real-time status. The 1st script involving command lines ran in the same 
> amount whether the session was active or suspended. No reduction of time or 
> CPU usage. The 2nd script took much longer and CPU was reduced significantly 
> while the session was suspended.
>
> A few questions:
>
> for X2GO_NXOPTIONS="sleep=0", what does 0 represent in time. If I set the 
> value to 1000, what would that mean?

This defines how long nxagent should sleep. The unit should be microseconds but 
there's a ticket for doublechecking that because it looks like a mixup happened 
during implementation (https://github.com/ArcticaProject/nx-libs/issues/928).

> Is the idle-nice-level=19 for suspended sessions the default setting?

As I said I don't know the superreniver feature in detail.

> Would the supernicer setting override the x2goagent sleep option setting?

no, they are two different things.

> What would be an example command for the -irlimit option in x2goagent.options 
> file.

see https://github.com/ArcticaProject/nx-libs/issues/796

Uli
___
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user
___
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user


Re: [X2Go-User] Suspending sessions causes performance slowing down

2020-06-02 Thread Ulrich Sibiller
Usually you can instruct java to use xrender by calling java with
"-Dsun.java2d.xrender=true" or run "export
_JAVA_OPTIONS=-Dsun.java2d.xrender=true" prior to starting the java
application. You can also configure that globally:
https://serverfault.com/questions/270924/setting-java-runtime-setting-for-all-users-on-a-client-pc

This generally should reduce the number of pixmap related calls. But I
don't know if it will have any effect on jogl.

Uli

On Tue, Jun 2, 2020 at 10:47 AM Johannes Töger  wrote:
>
> I can answer about the GUI toolkit. I was debugging MATLAB performance issues 
> last week so I looked into this.
>
> Matlab uses the jobamp/jogl framework. https://jogamp.org/jogl/www/
>
> In my Ubuntu/x2go/MATE setup, it falls back on a "software OpenGL" mode, 
> which actually looks like MESA/Gallium software rendering:
>
> In Matlab:
> >> opengl info
>   Version: '2.1 Mesa 17.1.3'
>Vendor: 'Brian Paul'
>  Renderer: 'Mesa X11'
>MaxTextureSize: 16384
>Visual: 'Visual 0x61, (RGBA 32 bits (8 8 8 8), Z 
> depth 16 bits, Hardware acceleration, Double buffer, Antialias 0 samples)'
>  Software: 'true'
>  HardwareSupportLevel: 'none (known graphics driver issues)'
> SupportsGraphicsSmoothing: 0
> SupportsDepthPeelTransparency: 1
>SupportsAlignVertexCenters: 0
>Extensions: {152×1 cell}
>MaxFrameBufferSize: 16384
>
>
>
> johannes@compute-2:/usr/local/MATLAB/R2019a/sys/opengl/lib/glnxa64$ ls -1
> C11ThreadEmulationLibraryLicense.rights
> EXTHeaderLicense.rights
> GalliumCodeLicense.rights
> GLXClientCodeLicense.rights
> libGL.so.1
> libGL.so.1.6.0
> libGLU.rights
> libGLU.so.1
> libGLU.so.1.3.1
> MesaDeviceDriversLicense.rights
> MesaLicense.rights
>
>
> —
> Johannes Töger
>
> Associate Senior Lecturer
> Cardiac MR Group
> Department of Clinical Sciences Lund, Clinical Physiology
> Lund University, Sweden
>
> -Original Message-
> From: x2go-user  On Behalf Of Ulrich 
> Sibiller
> Sent: Tuesday, June 2, 2020 09:15
> To: h i 
> Cc: x2go-user@lists.x2go.org
> Subject: Re: [X2Go-User] Suspending sessions causes performance slowing down
>
> On Tue, Jun 2, 2020 at 3:04 AM h i  wrote:
> > I ran a few tests and see the issue is GUI related in our case. It seems to 
> > speak to the 2nd reason for sleep you described regarding the sending of 
> > pixmaps.
> >
> > I ran two MATLAB scripts. Both including the same steps. However, 1
> > script suppressed pop-windows tracking the script status. The 2nd
> > script did not suppress the pop-up windows displaying
>
> What gui toolkit is matlab using?
>
> > real-time status. The 1st script involving command lines ran in the same 
> > amount whether the session was active or suspended. No reduction of time or 
> > CPU usage. The 2nd script took much longer and CPU was reduced 
> > significantly while the session was suspended.
> >
> > A few questions:
> >
> > for X2GO_NXOPTIONS="sleep=0", what does 0 represent in time. If I set the 
> > value to 1000, what would that mean?
>
> This defines how long nxagent should sleep. The unit should be microseconds 
> but there's a ticket for doublechecking that because it looks like a mixup 
> happened during implementation 
> (https://github.com/ArcticaProject/nx-libs/issues/928).
>
> > Is the idle-nice-level=19 for suspended sessions the default setting?
>
> As I said I don't know the superreniver feature in detail.
>
> > Would the supernicer setting override the x2goagent sleep option setting?
>
> no, they are two different things.
>
> > What would be an example command for the -irlimit option in 
> > x2goagent.options file.
>
> see https://github.com/ArcticaProject/nx-libs/issues/796
>
> Uli
> ___
> x2go-user mailing list
> x2go-user@lists.x2go.org
> https://lists.x2go.org/listinfo/x2go-user
___
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user


Re: [X2Go-User] Suspending sessions causes performance slowing down

2020-06-02 Thread Johannes Töger
I did some quick benchmarks by rotating a simple 3D model with and without 
benchmarks, see script at the end. Transparency is turned off by setting alpha 
= 1.

Baseline:
Without transparency: 71±11 ms per frame
With transparency: 781±112 ms per frame

Using export _JAVA_OPTIONS=-Dsun.java2d.xrender=true:
Without transparency: 69±12 ms per frame
With transparency: 771±110 ms per frame


So within the measurement variance.




function matlab_graphics_perf_test

Nang = 50;
azvec = linspace(-180, 180, Nang) + 45;
el = 27;

figure(9)

[x,y,z] = peaks;
alpha = 0.5;
surf(x,y,z, 'FaceAlpha', alpha)
axis vis3d

Tvec = zeros(size(azvec));

for azloop = 1:length(azvec)
tic
view([azvec(azloop) el])
drawnow
Tvec(azloop) = toc;
end

fprintf('Average frame time: %g ± %g s\n', mean(Tvec), std(Tvec));


end


— 
Johannes Töger

Associate Senior Lecturer
Cardiac MR Group
Department of Clinical Sciences Lund, Clinical Physiology
Lund University, Sweden

-Original Message-
From: Ulrich Sibiller  
Sent: Tuesday, June 2, 2020 11:04
To: Johannes Töger 
Cc: h i ; x2go-user@lists.x2go.org
Subject: Re: [X2Go-User] Suspending sessions causes performance slowing down

Usually you can instruct java to use xrender by calling java with 
"-Dsun.java2d.xrender=true" or run "export 
_JAVA_OPTIONS=-Dsun.java2d.xrender=true" prior to starting the java 
application. You can also configure that globally:
https://serverfault.com/questions/270924/setting-java-runtime-setting-for-all-users-on-a-client-pc

This generally should reduce the number of pixmap related calls. But I don't 
know if it will have any effect on jogl.

Uli

On Tue, Jun 2, 2020 at 10:47 AM Johannes Töger  wrote:
>
> I can answer about the GUI toolkit. I was debugging MATLAB performance issues 
> last week so I looked into this.
>
> Matlab uses the jobamp/jogl framework. https://jogamp.org/jogl/www/
>
> In my Ubuntu/x2go/MATE setup, it falls back on a "software OpenGL" mode, 
> which actually looks like MESA/Gallium software rendering:
>
> In Matlab:
> >> opengl info
>   Version: '2.1 Mesa 17.1.3'
>Vendor: 'Brian Paul'
>  Renderer: 'Mesa X11'
>MaxTextureSize: 16384
>Visual: 'Visual 0x61, (RGBA 32 bits (8 8 8 8), Z 
> depth 16 bits, Hardware acceleration, Double buffer, Antialias 0 samples)'
>  Software: 'true'
>  HardwareSupportLevel: 'none (known graphics driver issues)'
> SupportsGraphicsSmoothing: 0
> SupportsDepthPeelTransparency: 1
>SupportsAlignVertexCenters: 0
>Extensions: {152×1 cell}
>MaxFrameBufferSize: 16384
>
>
>
> johannes@compute-2:/usr/local/MATLAB/R2019a/sys/opengl/lib/glnxa64$ ls 
> -1 C11ThreadEmulationLibraryLicense.rights
> EXTHeaderLicense.rights
> GalliumCodeLicense.rights
> GLXClientCodeLicense.rights
> libGL.so.1
> libGL.so.1.6.0
> libGLU.rights
> libGLU.so.1
> libGLU.so.1.3.1
> MesaDeviceDriversLicense.rights
> MesaLicense.rights
>
>
> —
> Johannes Töger
>
> Associate Senior Lecturer
> Cardiac MR Group
> Department of Clinical Sciences Lund, Clinical Physiology Lund 
> University, Sweden
>
> -Original Message-
> From: x2go-user  On Behalf Of Ulrich 
> Sibiller
> Sent: Tuesday, June 2, 2020 09:15
> To: h i 
> Cc: x2go-user@lists.x2go.org
> Subject: Re: [X2Go-User] Suspending sessions causes performance 
> slowing down
>
> On Tue, Jun 2, 2020 at 3:04 AM h i  wrote:
> > I ran a few tests and see the issue is GUI related in our case. It seems to 
> > speak to the 2nd reason for sleep you described regarding the sending of 
> > pixmaps.
> >
> > I ran two MATLAB scripts. Both including the same steps. However, 1 
> > script suppressed pop-windows tracking the script status. The 2nd 
> > script did not suppress the pop-up windows displaying
>
> What gui toolkit is matlab using?
>
> > real-time status. The 1st script involving command lines ran in the same 
> > amount whether the session was active or suspended. No reduction of time or 
> > CPU usage. The 2nd script took much longer and CPU was reduced 
> > significantly while the session was suspended.
> >
> > A few questions:
> >
> > for X2GO_NXOPTIONS="sleep=0", what does 0 represent in time. If I set the 
> > value to 1000, what would that mean?
>
> This defines how long nxagent should sleep. The unit should be microseconds 
> but there's a ticket for doublechecking that because it looks like a mixup 
> happened during implementation 
> (https://github.com/ArcticaProject/nx-libs/issues/928).
>
> > Is the idle-nice-level=19 for suspended sessions the default setting?
>
> As I said I don't know the superreniver feature in detail.
>
> > Would the supernicer setting override the x2goagent sleep option setting?
>
> no, they are two different things.
>
> > What would be an example command for the -irlimit option in 
> > x2goagent.options file.
>
> see https://git

Re: [X2Go-User] Suspending sessions causes performance slowing down

2020-06-02 Thread Johannes Töger
Should be "with and without transparency"...


— 
Johannes Töger

Associate Senior Lecturer
Cardiac MR Group
Department of Clinical Sciences Lund, Clinical Physiology
Lund University, Sweden

-Original Message-
From: x2go-user  On Behalf Of Johannes Töger
Sent: Tuesday, June 2, 2020 11:58
To: Ulrich Sibiller 
Cc: x2go-user@lists.x2go.org
Subject: Re: [X2Go-User] Suspending sessions causes performance slowing down

I did some quick benchmarks by rotating a simple 3D model with and without 
benchmarks, see script at the end. Transparency is turned off by setting alpha 
= 1.

Baseline:
Without transparency: 71±11 ms per frame With transparency: 781±112 ms per frame

Using export _JAVA_OPTIONS=-Dsun.java2d.xrender=true:
Without transparency: 69±12 ms per frame With transparency: 771±110 ms per frame


So within the measurement variance.




function matlab_graphics_perf_test

Nang = 50;
azvec = linspace(-180, 180, Nang) + 45;
el = 27;

figure(9)

[x,y,z] = peaks;
alpha = 0.5;
surf(x,y,z, 'FaceAlpha', alpha)
axis vis3d

Tvec = zeros(size(azvec));

for azloop = 1:length(azvec)
tic
view([azvec(azloop) el])
drawnow
Tvec(azloop) = toc;
end

fprintf('Average frame time: %g ± %g s\n', mean(Tvec), std(Tvec));


end


—
Johannes Töger

Associate Senior Lecturer
Cardiac MR Group
Department of Clinical Sciences Lund, Clinical Physiology Lund University, 
Sweden

-Original Message-
From: Ulrich Sibiller 
Sent: Tuesday, June 2, 2020 11:04
To: Johannes Töger 
Cc: h i ; x2go-user@lists.x2go.org
Subject: Re: [X2Go-User] Suspending sessions causes performance slowing down

Usually you can instruct java to use xrender by calling java with 
"-Dsun.java2d.xrender=true" or run "export 
_JAVA_OPTIONS=-Dsun.java2d.xrender=true" prior to starting the java 
application. You can also configure that globally:
https://serverfault.com/questions/270924/setting-java-runtime-setting-for-all-users-on-a-client-pc

This generally should reduce the number of pixmap related calls. But I don't 
know if it will have any effect on jogl.

Uli

On Tue, Jun 2, 2020 at 10:47 AM Johannes Töger  wrote:
>
> I can answer about the GUI toolkit. I was debugging MATLAB performance issues 
> last week so I looked into this.
>
> Matlab uses the jobamp/jogl framework. https://jogamp.org/jogl/www/
>
> In my Ubuntu/x2go/MATE setup, it falls back on a "software OpenGL" mode, 
> which actually looks like MESA/Gallium software rendering:
>
> In Matlab:
> >> opengl info
>   Version: '2.1 Mesa 17.1.3'
>Vendor: 'Brian Paul'
>  Renderer: 'Mesa X11'
>MaxTextureSize: 16384
>Visual: 'Visual 0x61, (RGBA 32 bits (8 8 8 8), Z 
> depth 16 bits, Hardware acceleration, Double buffer, Antialias 0 samples)'
>  Software: 'true'
>  HardwareSupportLevel: 'none (known graphics driver issues)'
> SupportsGraphicsSmoothing: 0
> SupportsDepthPeelTransparency: 1
>SupportsAlignVertexCenters: 0
>Extensions: {152×1 cell}
>MaxFrameBufferSize: 16384
>
>
>
> johannes@compute-2:/usr/local/MATLAB/R2019a/sys/opengl/lib/glnxa64$ ls
> -1 C11ThreadEmulationLibraryLicense.rights
> EXTHeaderLicense.rights
> GalliumCodeLicense.rights
> GLXClientCodeLicense.rights
> libGL.so.1
> libGL.so.1.6.0
> libGLU.rights
> libGLU.so.1
> libGLU.so.1.3.1
> MesaDeviceDriversLicense.rights
> MesaLicense.rights
>
>
> —
> Johannes Töger
>
> Associate Senior Lecturer
> Cardiac MR Group
> Department of Clinical Sciences Lund, Clinical Physiology Lund 
> University, Sweden
>
> -Original Message-
> From: x2go-user  On Behalf Of Ulrich 
> Sibiller
> Sent: Tuesday, June 2, 2020 09:15
> To: h i 
> Cc: x2go-user@lists.x2go.org
> Subject: Re: [X2Go-User] Suspending sessions causes performance 
> slowing down
>
> On Tue, Jun 2, 2020 at 3:04 AM h i  wrote:
> > I ran a few tests and see the issue is GUI related in our case. It seems to 
> > speak to the 2nd reason for sleep you described regarding the sending of 
> > pixmaps.
> >
> > I ran two MATLAB scripts. Both including the same steps. However, 1 
> > script suppressed pop-windows tracking the script status. The 2nd 
> > script did not suppress the pop-up windows displaying
>
> What gui toolkit is matlab using?
>
> > real-time status. The 1st script involving command lines ran in the same 
> > amount whether the session was active or suspended. No reduction of time or 
> > CPU usage. The 2nd script took much longer and CPU was reduced 
> > significantly while the session was suspended.
> >
> > A few questions:
> >
> > for X2GO_NXOPTIONS="sleep=0", what does 0 represent in time. If I set the 
> > value to 1000, what would that mean?
>
> This defines how long nxagent should sleep. The unit should be microseconds 
> but there's a ticket for doublechecking that because it looks like a mixup 
> happened during implementation 
> (htt

Re: [X2Go-User] Suspending sessions causes performance slowing down

2020-06-02 Thread Ulrich Sibiller
Ok, so jogl does not use java2d. As I expected...

Uli

On Tue, Jun 2, 2020 at 12:00 PM Johannes Töger  wrote:
>
> Should be "with and without transparency"...
>
>
> —
> Johannes Töger
>
> Associate Senior Lecturer
> Cardiac MR Group
> Department of Clinical Sciences Lund, Clinical Physiology
> Lund University, Sweden
>
> -Original Message-
> From: x2go-user  On Behalf Of Johannes Töger
> Sent: Tuesday, June 2, 2020 11:58
> To: Ulrich Sibiller 
> Cc: x2go-user@lists.x2go.org
> Subject: Re: [X2Go-User] Suspending sessions causes performance slowing down
>
> I did some quick benchmarks by rotating a simple 3D model with and without 
> benchmarks, see script at the end. Transparency is turned off by setting 
> alpha = 1.
>
> Baseline:
> Without transparency: 71±11 ms per frame With transparency: 781±112 ms per 
> frame
>
> Using export _JAVA_OPTIONS=-Dsun.java2d.xrender=true:
> Without transparency: 69±12 ms per frame With transparency: 771±110 ms per 
> frame
>
>
> So within the measurement variance.
>
>
>
>
> function matlab_graphics_perf_test
>
> Nang = 50;
> azvec = linspace(-180, 180, Nang) + 45;
> el = 27;
>
> figure(9)
>
> [x,y,z] = peaks;
> alpha = 0.5;
> surf(x,y,z, 'FaceAlpha', alpha)
> axis vis3d
>
> Tvec = zeros(size(azvec));
>
> for azloop = 1:length(azvec)
> tic
> view([azvec(azloop) el])
> drawnow
> Tvec(azloop) = toc;
> end
>
> fprintf('Average frame time: %g ± %g s\n', mean(Tvec), std(Tvec));
>
>
> end
>
>
> —
> Johannes Töger
>
> Associate Senior Lecturer
> Cardiac MR Group
> Department of Clinical Sciences Lund, Clinical Physiology Lund University, 
> Sweden
>
> -Original Message-
> From: Ulrich Sibiller 
> Sent: Tuesday, June 2, 2020 11:04
> To: Johannes Töger 
> Cc: h i ; x2go-user@lists.x2go.org
> Subject: Re: [X2Go-User] Suspending sessions causes performance slowing down
>
> Usually you can instruct java to use xrender by calling java with 
> "-Dsun.java2d.xrender=true" or run "export 
> _JAVA_OPTIONS=-Dsun.java2d.xrender=true" prior to starting the java 
> application. You can also configure that globally:
> https://serverfault.com/questions/270924/setting-java-runtime-setting-for-all-users-on-a-client-pc
>
> This generally should reduce the number of pixmap related calls. But I don't 
> know if it will have any effect on jogl.
>
> Uli
>
> On Tue, Jun 2, 2020 at 10:47 AM Johannes Töger  
> wrote:
> >
> > I can answer about the GUI toolkit. I was debugging MATLAB performance 
> > issues last week so I looked into this.
> >
> > Matlab uses the jobamp/jogl framework. https://jogamp.org/jogl/www/
> >
> > In my Ubuntu/x2go/MATE setup, it falls back on a "software OpenGL" mode, 
> > which actually looks like MESA/Gallium software rendering:
> >
> > In Matlab:
> > >> opengl info
> >   Version: '2.1 Mesa 17.1.3'
> >Vendor: 'Brian Paul'
> >  Renderer: 'Mesa X11'
> >MaxTextureSize: 16384
> >Visual: 'Visual 0x61, (RGBA 32 bits (8 8 8 8), Z 
> > depth 16 bits, Hardware acceleration, Double buffer, Antialias 0 samples)'
> >  Software: 'true'
> >  HardwareSupportLevel: 'none (known graphics driver issues)'
> > SupportsGraphicsSmoothing: 0
> > SupportsDepthPeelTransparency: 1
> >SupportsAlignVertexCenters: 0
> >Extensions: {152×1 cell}
> >MaxFrameBufferSize: 16384
> >
> >
> >
> > johannes@compute-2:/usr/local/MATLAB/R2019a/sys/opengl/lib/glnxa64$ ls
> > -1 C11ThreadEmulationLibraryLicense.rights
> > EXTHeaderLicense.rights
> > GalliumCodeLicense.rights
> > GLXClientCodeLicense.rights
> > libGL.so.1
> > libGL.so.1.6.0
> > libGLU.rights
> > libGLU.so.1
> > libGLU.so.1.3.1
> > MesaDeviceDriversLicense.rights
> > MesaLicense.rights
> >
> >
> > —
> > Johannes Töger
> >
> > Associate Senior Lecturer
> > Cardiac MR Group
> > Department of Clinical Sciences Lund, Clinical Physiology Lund
> > University, Sweden
> >
> > -Original Message-
> > From: x2go-user  On Behalf Of Ulrich
> > Sibiller
> > Sent: Tuesday, June 2, 2020 09:15
> > To: h i 
> > Cc: x2go-user@lists.x2go.org
> > Subject: Re: [X2Go-User] Suspending sessions causes performance
> > slowing down
> >
> > On Tue, Jun 2, 2020 at 3:04 AM h i  wrote:
> > > I ran a few tests and see the issue is GUI related in our case. It seems 
> > > to speak to the 2nd reason for sleep you described regarding the sending 
> > > of pixmaps.
> > >
> > > I ran two MATLAB scripts. Both including the same steps. However, 1
> > > script suppressed pop-windows tracking the script status. The 2nd
> > > script did not suppress the pop-up windows displaying
> >
> > What gui toolkit is matlab using?
> >
> > > real-time status. The 1st script involving command lines ran in the same 
> > > amount whether the session was active or suspended. No reduction of time 
> > > or CPU usage. The 2nd script took much longer and CPU was

Re: [X2Go-User] Matlab graphics performance when running in x2go

2020-06-02 Thread Johannes Töger
I finally figured it out! Now I can run Matlab R2019b on Ubuntu 18.04 LTS with 
decent graphics performance over x2go, even with transparency using the Mesa 
llvmpipe software OpenGL driver.

Benchmark for a simple scene:

No transparency: ~40 ms per frame
With transparency: ~58 ms per frmae

So still some performance penalty for transparency, but much better.


HOWTO:

First install LLVM: sudo apt install llvm-dev

I downloaded mesa-20.1.0 (latest version right now) and configured it like this 
(in the unzipped source directory):

mkdir build
cd build
meson -D glx=gallium-xlib -D gallium-drivers=swrast -D platforms=x11 -D 
dri3=false -D dri-drivers="" -D vulkan-drivers="" -D buildtype=release -D 
optimization=3 -Dprefix=/usr/local/mesa-20.1.0/

Then I built and installed it as follows:
ninja
sudo ninja install

Then to make Matlab load the new driver, I needed to modify Matlab's lib search 
path:
cp $MATLAB_DIRECTORY/bin/.matlab7rc.sh ~

Edit the file ~/.matlab7rc.sh, find the glnxa* section and add 
/usr/local/mesa-20.1.0/lib/x86_64-linux-gnu to LDPATH_PREFIX 

Add to your .profile: export MESA_GL_VERSION_OVERRIDE=3.0

Seems like anything will work for the version override except for 3.1, but I 
didn't debug this further.


— 
Johannes Töger

Associate Senior Lecturer
Cardiac MR Group
Department of Clinical Sciences Lund, Clinical Physiology
Lund University, Sweden

-Original Message-
From: Ulrich Sibiller  
Sent: Wednesday, May 27, 2020 14:29
To: Johannes Töger 
Subject: Re: [X2Go-User] Matlab graphics performance when running in x2go

Thanks!

On Wed, May 27, 2020 at 1:59 PM Johannes Töger  wrote:
>
> OK I see - we only have CUDA cards in those machines to do computations, so 
> VirtualGL won't work then.
>
> Maybe I'll try to compile an optimized software Mesa/Gallium -- I'll let you 
> know what happens if I find something interesting, so it's documented on the 
> mailing list at least.
>
>
> —
> Johannes Töger
>
> Associate Senior Lecturer
> Cardiac MR Group
> Department of Clinical Sciences Lund, Clinical Physiology Lund 
> University, Sweden
>
> -Original Message-
> From: Ulrich Sibiller 
> Sent: Wednesday, May 27, 2020 13:20
> To: Johannes Töger 
> Cc: x2go users 
> Subject: Re: [X2Go-User] Matlab graphics performance when running in 
> x2go
>
> On Wed, May 27, 2020 at 1:07 PM Johannes Töger  
> wrote:
> >
> > Thanks for your quick reply.
> >
> > It turns out that Matlab by default uses an older Mesa software rendering 
> > module (17.3) when there is no hardware OpenGL. I tried to compile my own 
> > version with additional optimizations and LLVMPipe etc, but Matlab wouldn't 
> > accept it. No more time to debug it today, but maybe later.
> >
> > Is there any documentation on using VirtualGL with x2go? I tried to google 
> > it, but no luck.
>
> Not that I am aware. I have never checked it out practically.
> Generally you will have to dedicate the graphics hardware to that
> (only) session which might make it a no-go, depending on your setup.
>
> Uli
___
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user


Re: [X2Go-User] Matlab graphics performance when running in x2go

2020-06-02 Thread Ulrich Sibiller
Thanks, I have included that in the wiki:
https://wiki.x2go.org/doku.php/wiki:development:glx-xlib-workaround#matlab_2019b

Uli

On Tue, Jun 2, 2020 at 8:56 PM Johannes Töger  wrote:
>
> I finally figured it out! Now I can run Matlab R2019b on Ubuntu 18.04 LTS 
> with decent graphics performance over x2go, even with transparency using the 
> Mesa llvmpipe software OpenGL driver.
>
> Benchmark for a simple scene:
>
> No transparency: ~40 ms per frame
> With transparency: ~58 ms per frmae
>
> So still some performance penalty for transparency, but much better.
>
>
> HOWTO:
>
> First install LLVM: sudo apt install llvm-dev
>
> I downloaded mesa-20.1.0 (latest version right now) and configured it like 
> this (in the unzipped source directory):
>
> mkdir build
> cd build
> meson -D glx=gallium-xlib -D gallium-drivers=swrast -D platforms=x11 -D 
> dri3=false -D dri-drivers="" -D vulkan-drivers="" -D buildtype=release -D 
> optimization=3 -Dprefix=/usr/local/mesa-20.1.0/
>
> Then I built and installed it as follows:
> ninja
> sudo ninja install
>
> Then to make Matlab load the new driver, I needed to modify Matlab's lib 
> search path:
> cp $MATLAB_DIRECTORY/bin/.matlab7rc.sh ~
>
> Edit the file ~/.matlab7rc.sh, find the glnxa* section and add 
> /usr/local/mesa-20.1.0/lib/x86_64-linux-gnu to LDPATH_PREFIX
>
> Add to your .profile: export MESA_GL_VERSION_OVERRIDE=3.0
>
> Seems like anything will work for the version override except for 3.1, but I 
> didn't debug this further.
>
>
> —
> Johannes Töger
>
> Associate Senior Lecturer
> Cardiac MR Group
> Department of Clinical Sciences Lund, Clinical Physiology
> Lund University, Sweden
>
> -Original Message-
> From: Ulrich Sibiller 
> Sent: Wednesday, May 27, 2020 14:29
> To: Johannes Töger 
> Subject: Re: [X2Go-User] Matlab graphics performance when running in x2go
>
> Thanks!
>
> On Wed, May 27, 2020 at 1:59 PM Johannes Töger  
> wrote:
> >
> > OK I see - we only have CUDA cards in those machines to do computations, so 
> > VirtualGL won't work then.
> >
> > Maybe I'll try to compile an optimized software Mesa/Gallium -- I'll let 
> > you know what happens if I find something interesting, so it's documented 
> > on the mailing list at least.
> >
> >
> > —
> > Johannes Töger
> >
> > Associate Senior Lecturer
> > Cardiac MR Group
> > Department of Clinical Sciences Lund, Clinical Physiology Lund
> > University, Sweden
> >
> > -Original Message-
> > From: Ulrich Sibiller 
> > Sent: Wednesday, May 27, 2020 13:20
> > To: Johannes Töger 
> > Cc: x2go users 
> > Subject: Re: [X2Go-User] Matlab graphics performance when running in
> > x2go
> >
> > On Wed, May 27, 2020 at 1:07 PM Johannes Töger  
> > wrote:
> > >
> > > Thanks for your quick reply.
> > >
> > > It turns out that Matlab by default uses an older Mesa software rendering 
> > > module (17.3) when there is no hardware OpenGL. I tried to compile my own 
> > > version with additional optimizations and LLVMPipe etc, but Matlab 
> > > wouldn't accept it. No more time to debug it today, but maybe later.
> > >
> > > Is there any documentation on using VirtualGL with x2go? I tried to 
> > > google it, but no luck.
> >
> > Not that I am aware. I have never checked it out practically.
> > Generally you will have to dedicate the graphics hardware to that
> > (only) session which might make it a no-go, depending on your setup.
> >
> > Uli
> ___
> x2go-user mailing list
> x2go-user@lists.x2go.org
> https://lists.x2go.org/listinfo/x2go-user
___
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user


Re: [X2Go-User] Matlab graphics performance when running in x2go

2020-06-02 Thread Johannes Töger
I just did some more testing, and found some rare crashes. Using 
MESA_GL_VERSION_OVERRIDE=3.1COMPAT seems more stable.


— 
Johannes Töger

Associate Senior Lecturer
Cardiac MR Group
Department of Clinical Sciences Lund, Clinical Physiology
Lund University, Sweden

-Original Message-
From: Ulrich Sibiller  
Sent: Tuesday, June 2, 2020 21:10
To: Johannes Töger 
Cc: x2go-user@lists.x2go.org
Subject: Re: [X2Go-User] Matlab graphics performance when running in x2go

Thanks, I have included that in the wiki:
https://wiki.x2go.org/doku.php/wiki:development:glx-xlib-workaround#matlab_2019b

Uli

On Tue, Jun 2, 2020 at 8:56 PM Johannes Töger  wrote:
>
> I finally figured it out! Now I can run Matlab R2019b on Ubuntu 18.04 LTS 
> with decent graphics performance over x2go, even with transparency using the 
> Mesa llvmpipe software OpenGL driver.
>
> Benchmark for a simple scene:
>
> No transparency: ~40 ms per frame
> With transparency: ~58 ms per frmae
>
> So still some performance penalty for transparency, but much better.
>
>
> HOWTO:
>
> First install LLVM: sudo apt install llvm-dev
>
> I downloaded mesa-20.1.0 (latest version right now) and configured it like 
> this (in the unzipped source directory):
>
> mkdir build
> cd build
> meson -D glx=gallium-xlib -D gallium-drivers=swrast -D platforms=x11 
> -D dri3=false -D dri-drivers="" -D vulkan-drivers="" -D 
> buildtype=release -D optimization=3 -Dprefix=/usr/local/mesa-20.1.0/
>
> Then I built and installed it as follows:
> ninja
> sudo ninja install
>
> Then to make Matlab load the new driver, I needed to modify Matlab's lib 
> search path:
> cp $MATLAB_DIRECTORY/bin/.matlab7rc.sh ~
>
> Edit the file ~/.matlab7rc.sh, find the glnxa* section and add 
> /usr/local/mesa-20.1.0/lib/x86_64-linux-gnu to LDPATH_PREFIX
>
> Add to your .profile: export MESA_GL_VERSION_OVERRIDE=3.0
>
> Seems like anything will work for the version override except for 3.1, but I 
> didn't debug this further.
>
>
> —
> Johannes Töger
>
> Associate Senior Lecturer
> Cardiac MR Group
> Department of Clinical Sciences Lund, Clinical Physiology Lund 
> University, Sweden
>
> -Original Message-
> From: Ulrich Sibiller 
> Sent: Wednesday, May 27, 2020 14:29
> To: Johannes Töger 
> Subject: Re: [X2Go-User] Matlab graphics performance when running in 
> x2go
>
> Thanks!
>
> On Wed, May 27, 2020 at 1:59 PM Johannes Töger  
> wrote:
> >
> > OK I see - we only have CUDA cards in those machines to do computations, so 
> > VirtualGL won't work then.
> >
> > Maybe I'll try to compile an optimized software Mesa/Gallium -- I'll let 
> > you know what happens if I find something interesting, so it's documented 
> > on the mailing list at least.
> >
> >
> > —
> > Johannes Töger
> >
> > Associate Senior Lecturer
> > Cardiac MR Group
> > Department of Clinical Sciences Lund, Clinical Physiology Lund 
> > University, Sweden
> >
> > -Original Message-
> > From: Ulrich Sibiller 
> > Sent: Wednesday, May 27, 2020 13:20
> > To: Johannes Töger 
> > Cc: x2go users 
> > Subject: Re: [X2Go-User] Matlab graphics performance when running in 
> > x2go
> >
> > On Wed, May 27, 2020 at 1:07 PM Johannes Töger  
> > wrote:
> > >
> > > Thanks for your quick reply.
> > >
> > > It turns out that Matlab by default uses an older Mesa software rendering 
> > > module (17.3) when there is no hardware OpenGL. I tried to compile my own 
> > > version with additional optimizations and LLVMPipe etc, but Matlab 
> > > wouldn't accept it. No more time to debug it today, but maybe later.
> > >
> > > Is there any documentation on using VirtualGL with x2go? I tried to 
> > > google it, but no luck.
> >
> > Not that I am aware. I have never checked it out practically.
> > Generally you will have to dedicate the graphics hardware to that
> > (only) session which might make it a no-go, depending on your setup.
> >
> > Uli
> ___
> x2go-user mailing list
> x2go-user@lists.x2go.org
> https://lists.x2go.org/listinfo/x2go-user
___
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user