Licensing Optimization for SAP Applications with Amazon EC2 CPU Options

by Andre Fellipe and João Bozelli | on

Introduction

SAP offers multiple products with different licensing options for customers. An example is SAP BusinessObjects (SAP BOBJ) which supports Concurrent Sessions (CS) / Concurrent Access License (CAL), Named User (NU) and CPU License types. Understanding the different license options available is important for customers to optimize their costs when running in Amazon Web Services.

When customers decide to bring these applications to Amazon Web Services, they have an opportunity to optimize their software license usage. This is particularly important for licenses based on the CPU configuration since Amazon EC2 instances are available in t-shirt sizes.

Customers using default settings when launching Amazon EC2 instances for SAP products with CPU-based licensing may have more virtual CPUs (vCPUs) than they have licenses for. Therefore, they require a specific number of vCPUs – and consequently, CPU cores – to avoid having to acquire more licenses.

In this blog, you will learn how to customize the number of vCPUs – through the specification of the CPU cores with Amazon EC2 CPU Options – of your instances running SAP applications with CPU-based licensing to get the best value of your licenses.

It’s recommended that you familiarize yourself with the following SAP Notes prior to reading this blog:

  • SAP Note 1285639 – What license types are available for BusinessObjects Enterprise? [S-User required]
  • SAP Note 1335809 – Licensing requirement for Business Objects deployment on Virtual Machine [S-User required]
  • SAP Note 1794184 – What are the different license types (NU, CS, CPU) for SAP BusinessObjects products [S-User required]

SAP applications with CPU-based Licensing

It is important to note that you should always check the details of your company’s SAP agreement with your SAP Account Executive. This approach makes sure that the interpretation of the contract is aligned between the parties.

With a Licensing Agreement based on CPUs you can execute an unlimited number of sessions for unlimited users in the product based on the licenses acquired. If you have the computational resources to execute the workload, you can add additional users. This is different from a CS arrangement where the number of concurrent sessions is dependent on the quantity of license keys.

With CPU-based SAP software licenses, each core in a server requires a license for running the product, including those needed only to cover spikes of demand. In the case of Amazon EC2, the number of vCPUs available for the instance is considered. This is regardless of the number of CPU cores in the physical machine. For further details see the CORES section of the SAP Software Use Rights document.

Amazon EC2 CPU Options

Amazon EC2 offers secure and flexible compute capacity for virtually any workload, including SAP. Customers have the flexibility to use different SAP-certified instance types with Intel or AMD processors. Using the latest instance types, they can even have more processing power for the same number of licenses. A r6i.24xlarge instance offers 6% more SAPS when compared to a r5.24xlarge. This provides you an option to add additional users without additional licenses.

The Amazon EC2 design allows you to execute multiple threads on a single CPU core, with each of them being a vCPU. This means that a m5.2xlarge instance has eight vCPUs, since as default it has four cores and two threads per core. With CPU-based licensing, a customer would need eight CPU licenses. But if the compute capacity required to run the application is lower, the ability to optimize the instance for a lower number of CPU cores results in a smaller number of vCPUs and CPU Licenses being required.

With Amazon EC2, this is achieved through the specification of the Optimize CPU options during the instance launch. This can only be specified at launch and cannot be modified after an instance has launched. There is no additional or reduced charge when specifying CPU Options. For further details see the Optimize CPU options documentation . You can check if the instance supports the CPU Options in the  CPU cores and threads per CPU core per instance type documentation.

Before deciding to use the Optimize CPU options, it is important to understand the impact and restriction on the SAP workload. The SAPS delivered to the Amazon EC2 instance are in proportion the number of vCPUs configured. Use of the Optimize CPU option is not supported for SAP HANA workloads. For further details see SAP Note 1656099 – SAP Applications on Amazon Web Services: Supported DB/OS and Amazon Web Services EC2 products .

You can specify the CPU options during instance launch via the Amazon Web Services console or the Amazon Web Services CLI. The Amazon Web Services documentation provides examples for both the Amazon Web Services Console and Amazon Web Services CLI on using CPU options.

Validating the setup

You can view the CPU options for an existing instance in the Amazon EC2 console within the details tab of an instance or describing the instance using the describe-instances command in the Amazon Web Services CLI. You can also view the number of ThreadsPerCore using the describe-instances command.

You can use a tool such as lscpu to view the CPU information for your Linux instance and Task Manager for a Windows instance.

Let’s check how it is possible to validate this change for a Windows instance, starting with a r6i.xlarge instance size, which has 4 vCPUs, as seen below:

Screenshot of Task Manager showing details of a r6i.xlarge instance Figure 1: Task Manager showing details of a r6i.xlarge instance

Note Virtual processors: 4. With the command below, it is possible to resize the instance to a r6i.4xlarge instance, which has 16 vCPUs:

aws ec2 modify-instance-attribute --instance-id [ID of the instance] --instance-type r6i.4xlarge

Looking at Task Manager again, it should have something similar to this:

Screenshot of Task Manager showing details of a r6i.4xlarge instance

Figure 2: Task Manager showing details of a r6i.4xlarge instance

Note Virtual processors: 16. Using the Amazon Web Services CLI command below, it is possible to launch a similar instance (r6i.4xlarge), but with 12 vCPUs (6 CPU cores and 2 threads):

aws ec2 run-instances --image-id [AMI ID] --instance-type r6i.4xlarge --cpu-options "CoreCount=6,ThreadsPerCore=2" --key-name [Key Pair] --security-group-ids [Security Group ID] --subnet-id [Subnet ID]

The Task Manager now should have something similar to this:

Screenshot of Task Manager showing details of a r6i.4xlarge instance with CPU options specified

Figure 3: Task Manager showing details of a r6i.4xlarge instance with CPU options specified

Note Virtual processors: 12. A similar process is achievable with AMD instances as well. For a r6a.4xlarge, for example, it is possible to run:

aws ec2 run-instances --image-id [AMI ID] --instance-type r6a.4xlarge --cpu-options "CoreCount=6,ThreadsPerCore=2" --key-name [Key Pair] --security-group-ids [Security Group ID] --subnet-id [Subnet ID]

Screenshot of Task Manager showing details of a r6a.4xlarge instance with CPU options specified

Figure 4: Task Manager showing details of a r6a.4xlarge instance with CPU options specified

Managing your licenses with Amazon Web Services License Manager

Amazon Web Services License Manager is a service that customers can use to manage the compliance of the SAP CPU-based licenses. It provides you control and visibility into the usage of your license configurations, allowing customers to create rules with soft and hard limits for its deployments based on their setups. You can make sure that only instances that respect the number of licenses that you have will be deployed. License Manager supports tracking any software that is licensed based on vCPUs, physical cores, sockets, or number of machines.

The most important part related to SAP CPU-based licensing is that Amazon Web Services License Manager integrates with Amazon EC2 CPU Options. This gives the customers the ability to have rules that counts vCPUs based on the customized CPU core and thread count. The Amazon Web Services documentation provides the available parameters and rules you can include.

It is also important to note is that Amazon Web Services License Manager supports the association of license rules to multiple launch mechanisms. You can associate self-managed licenses with Amazon Machine Images (AMIs), add it in your Amazon Web Services CloudFormation templates and put it in your Amazon EC2 launch templates. This allows you to prevent the deployment of non-compliant instances and configurations. For further details see the License rules in License Manager documentation .

Summary

In this blog post, we described important concepts regarding CPU Licensing with SAP products, with a particular look at the documentation around SAP BOBJ licensing.

We have shown how customers can use the Amazon EC2 CPU Options configurations to have a better match between the compute capacity required for their workloads and the number of CPU Licenses needed. We also discussed how to leverage Amazon Web Services License Manager self-managed licenses to manage your licenses.

To conclude, it is important to emphasize that you should familiarize yourself with the Amazon Web Services documentation on  Rules for specifying CPU options  and always check your SAP license agreement with your SAP Account Executive before making decisions regarding licensing.

To learn why thousands of customers run SAP on Amazon Web Services, check out the Amazon Web Services for SAP page .