Blog

Research Desktop Series High-Performance Computing (HPC) Remote Linux Desktop

Research desktop use case: Run Linux applications for days or weeks

Dec, 04, 23
Written by: Robert Henschel

User Need

Users want to run applications for a long time without constantly paying attention to the application.

TLDR/Summary

On a Research Desktop, each user has its own graphical desktop session. The desktop session is running even when the user is not connected to the session. If an application like MATLAB, RStudio, ParaView or VMD, is open on that desktop and “performing work”, the application continues to run and “perform work”, even if the user is not connected to the desktop session. This allows for a convenient way of running applications for a long time, checking the progress every now and then, without having to “attend to the application” all the time. For example, users can run a MATLAB script for days to develop and prototype a simulation or they can run a data cleaning python script on a large data.

Details how a Research Desktop Allows for Long Running Applications

In a Research Desktop, each application is running inside a desktop. Each user has its own graphical desktop, running on machines called the Agent Nodes. These Agent Nodes host desktop sessions from multiple users, and are high powered servers that can provide each user with more resources (CPUs, memory and storage capacity) than the user could access on a laptop or workstations. By sharing those resources among multiple users, the Research Desktop provides a cost effective way to provide a high performance interactive graphical environment to many users.

When users want to stop their usage of a desktop session, they can do this in two ways. The default way is to simply close the browser tab or close the ThinLinc application. In that case, the user disconnects from the session, but the desktop and all applications running on the desktop continue to run on the Agent Node. This way of ending a session is referred to as “Disconnect”. Consequently, when the user connects again to the Research Desktop, the user will be “Reconnected” to the already existing sessions, and the desktop will look just like it did when the user disconnected.

 

 

The second way to stop usage of a desktop session is to “Logout” from the sessions. This is normally done via an icon on the desktop or a menu entry. With a Logout, the desktop stops running, and all applications are terminated. When the user connects again to the Research Desktop, a new session is started for the user, and other than the Desktop, no application is running.

On the administrative side, ThinLinc can be customized as to how long a desktop session should remain running without a user being connected to it. The default value is to allow the session to run forever. (See the ThinLinc documentation for the MaxDisconnectionTime for more details.) A high number of days increases the usability of the Research Desktop, as users don’t have to “check their applications” frequently. However, each session requires resources on the Agent Nodes. Those resources include memory and CPU time, and are dependent on what applications are open on the desktop. Also, each session requires a ThinLinc license. Increasing the number of days that a session is open without a connected user can lead to an increase in the total number of sessions and increase the resources and license requirements. A balance must be found between the resource needs and the convenience for users to reconnect to sessions. 7 days is a good value to start with.

When a user doesn‘t reconnect to a session within the maximum allotted time for a disconnected session, the session is terminated. All applications that were running on the desktop are also terminated, and unsaved work is potentially lost.

As users take on larger computational projects or process larger datasets, the first step is often to continue doing what has worked for them in the past. This will often lead to very long runtimes of applications. Increasing application runtime to hours and days is not ideal, but it can provide valuable results and often provides necessary data to move a project to the next phase. The Research Desktop enables this work by allowing users to run applications for days or even weeks, without having to change their workflow.

Real World Example

Katy is developing a script in RStudio that performs analysis of a data set. The script is running for 6 hours and as she is refining the script, the runtime increases. Doing this work on the Research Desktop gives her the resources that she needs, while she can use her personal laptop for other work. She can get a computation going on the Research Desktop and then disconnect. Later in the day, she can reconnect to the Research Desktop and see how the computation is going.