BookmarkSubscribeRSS Feed

Speeding Up SAS Viya Jobs with Compute Tasks

Started ‎11-21-2025 by
Modified 3 weeks ago by
Views 832

If you have migrated simple stored processes from SAS 9.4, you may have noticed that SAS Viya jobs don’t always execute as quickly as they did in SAS Enterprise Guide. This has to do with the underlying architecture used by SAS Viya, where a new job request causes a compute pod dedicated solely to that job to be spun up. While this has a lot of benefits for longer running jobs in terms of resilience and stability, there may be times when you just need results fast. In this article, I’ll discuss how to take advantage of compute tasks, a new feature introduced in 2025.9, to accelerate the execution of short duration jobs in SAS Viya.

 

 

What are Compute Tasks?

 

Compute Tasks are designed to be a lightweight alternative to Job Execution Service. When using Compute Tasks, you can submit a program and receive its output in a single HTTP request. This reduces the unnecessary performance impact created when using the Job Execution Service.

 

 

Requirements for Using Compute Tasks

 

Compute Tasks require a reusable compute server. Generally, a compute server terminates when the session that was being used by the client or application is ended. A reusable compute server does not end, and can be reused by a later session. You find more information about how to configure a reusable compute server here.

 

Compute Tasks are also not currently supported in SAS Studio. To execute jobs using the Compute Tasks, you will need to use the SAS Job Execution web application or via the URL.

 

 

Configuring a Job to Run Using Compute Tasks

 

Once you have a reusable compute context set up, configuring a job to run as a compute task is very straightforward. There is a new job definition parameter called _executionTasks  that you can use to specify whether you want to execute the job as a compute task. Set _executionTasks=True to run the job as a compute task.

 

01_GT_treimanCompute1.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

 

Putting It All Together

 

Let’s look at an example. I have created two simple job definitions that use the following code:

 

proc print data=sashelp.class;
run;

 

One uses the SAS Studio compute context and executes as a normal job using the Job Execution Service. The other uses a reusable compute context and has the _executionTasks parameter set to true.

 

The standard job takes about 7.5 seconds to complete. The actual code executes very quickly, but there is some overhead that comes with starting up a new compute server.

 

02_GT_treimanCompute2.png

 

However, the job using Compute Tasks executes extremely fast: less than 500 milliseconds.

 

03_GT_treimanCompute3.png

 

 

Considerations

 

While Compute Tasks can dramatically increase the speed of short duration jobs, there are a few things to keep in mind:

 

  • It is best practice to execute long-running jobs or large files using the Job Execution service rather than using Compute Tasks.
  • Compute Tasks time out after a maximum of 30 seconds.
  • Compute Tasks are not listed on the Jobs page.
  • Output files cannot be downloaded.
  • Compute Tasks cannot be scheduled – they occur synchronously.

 

 

Conclusion

 

Compute Tasks offer a powerful new way to accelerate simple job execution in SAS Viya. By reducing the startup overhead associated with the Job Execution Service, they provide near-instant responsiveness for short programs that don’t require long-running sessions, scheduled execution, or file downloads. While they aren’t a replacement for every job use case, they fill an important gap for workloads where speed matters more than robustness or complex runtime features. If you’ve migrated stored processes from SAS 9.4 or have lightweight code that needs to run quickly and repeatedly, Compute Tasks give you a fast, efficient, and easy-to-implement option within SAS Viya.

 

 

Further Reading

 

 

 

Find more articles from SAS Global Enablement and Learning here.

Comments
Tom

It would be useful to know how to do something similar for regular SAS programs (not "Jobs" or "Stored Processes") that have traditionally been run from the command line in SAS 9.4 so they can also benefit from reduced startup time overhead when migrated to VIYA.

Hi @Tom , have you looked at reusable batch servers for that application? See for example SAS Viya High Throughput Batch Processing: Part 1 – Reusable Batch Servers by @EdoardoRiva and How to Configure Reusable Batch Servers ?

Contributors
Version history
Last update:
3 weeks ago
Updated by:

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags