SAP HANA Deployment Guide

This deployment guide shows you how to deploy SAP HANA systems on Google Compute Engine, which is part of Google Cloud Platform (GCP). The deployment guide helps you configure Compute Engine, persistent disks, and the operating system, SUSE Linux Enterprise Server (SLES), to achieve the best performance for your SAP HANA system. The guide incorporates best practices from Google Compute Engine and SAP.


SAP HANA is an in-memory, column-oriented, relational database that provides high-performance analytics and real-time data processing. At the core of this real-time data platform is the SAP HANA database. Customers can leverage ease of provisioning, highly scalable, and redundant GCP infrastructure capabilities to run their business critical workloads. GCP provides a set of physical assets, such as computers and hard disk drives, and virtual resources, such as Compute Engine virtual machines (VMs), located in Google Data centers around the world.

When you deploy SAP HANA in the GCP environment, you are deploying to virtual machines running on Compute Engine. Compute Engine VMs provide persistent disks, which function similarly to the physical disks in a desktop or a server, but are automatically managed for you by Compute Engine to ensure data redundancy and optimized performance.

This deployment guide shows how to use persistent disks for the storage needs of SAP HANA and leverage the scalability and availability features offered by the persistent disk service.

Compute Engine VM sizes

The instructions in this deployment guide assume memory-optimized virtual machines with 208 GB DRAM and 32 virtual CPUs (type n1-highmem-32) or 416 GB DRAM and 64 virtual CPUs (type n1-highmem-64), running on the Intel Broadwell architecture. This guide leads you through the creation of SSD persistent disks to host the data and log volumes for SAP HANA database.

Supported SAP HANA versions

This guide currently supports SAP HANA Platform Edition 1 SPS 12x and SAP HANA Platform Edition 2.

Costs and licenses

You are responsible for the costs incurred for using the resources created by following this deployment guide. SLES is currently the only supported operating system for SAP HANA on GCP.

This deployment guide helps you launch the Compute Engine VM with 32 virtual CPUs and 208 GB DRAM or 64 virtual CPUs and 416 GB DRAM, running the SLES 12 operating system, and properly partitioned persistent disks (SSD) for storing SAP HANA data and log files.

The following table lists the components you will need to deploy SAP HANA on GCP:

SAP HANA instance Scenario Includes
n1-highmem-32 Single-node (scale-up) Bastion host: n1-standard-1
RDP instance for SAP HANA Studio: n1-standard-2
SAP HANA: Single instance, SLES, n1-highmem-32
Storage: Persistent disks &emdash; SSD and Standard
n1-highmem-64 Single-node (scale-up) Bastion host: n1-standard-1
RDP instance for SAP HANA Studio: n1-standard-2
SAP HANA: Single instance, SLES, n1-highmem-64
Storage: Persistent disks &emdash; SSD and Standard
n1-highmem-32 Multi-node (scale-out 4x) Bastion host: n1-standard-1
RDP instance for SAP HANA Studio: n1-standard-2
SAP HANA: Single instance, SLES, n1-highmem-32
Storage: Persistent disks &emdash; SSD and Standard
n1-highmem-64 Multi-node (scale-out 4x) Bastion host: n1-standard-1
RDP instance for SAP HANA Studio: n1-standard-2
SAP HANA: Single instance, SLES, n1-highmem-64
Storage: Persistent disks &emdash; SSD and Standard

Use the pricing calculator to help you estimate your actual costs.

GCP Services

The core GCP components used by this deployment guide include the services in the following table:

Service Description
GCP Networking Connects your VM instances to each other and to the Internet. Each instance is a member of either a legacy network with a single global IP range, or a recommended subnet network, where the instance is a member of a single subnetwork that is a member of a larger network. Note that a network cannot span GCP projects, but a GCP project can have multiple networks.
Compute Engine Creates and manages VMs with your choice of operating system and software stack. Provides high availability and recovery for improved recovery-point objective (RPO) and recovery-time objective (RTO) capabilities, with reduced cost.

For SAP HANA production workloads, use n1-highmem-32 instance types with 32 vCPUs and 208 GB DRAM or n1-highmem-64 instance types with 64 vCPUs and 416 GB DRAM.
For non-production workloads, use other n1-highmem instance types.
Persistent Disks Persistent disks are available as either standard hard disk drives (HDD) or solid-state drives (SSD). We recommend the use of SSD disks with at least 1.7 terabytes of storage space for SAP HANA. With this drive size, if you use the recommended n1-highmem-32 or n1-highmem-64 instance types, you can achieve up to 400 MB/s for writes and 800 MB/s for reads. For more information, see the SAP HANA on GCP operations guide.
Google Cloud Platform Console Browser-based tool for managing Compute Engine resources. Use a template to describe all of the Compute Engine resources and instances you need. You don't have to individually create and configure the resources or figure out dependencies, because the Cloud Platform Console does that for you.
Google Cloud Storage Backup your SAP HANA database backups into Cloud Storage for added durability and reliability, with replication. For more information, see the SAP HANA on GCP operations guide.
StackDriver Monitoring Provides visibility into the performance, uptime, and health of SAP HANA, Compute Engine, network, and persistent disks.

Stackdriver collects metrics, events, and metadata from GCP and uses these to generate insights through dashboards, charts, and alerts. You can monitor the compute metrics at no cost through StackDriver Monitoring.
Cloud IAM Provides unified control over permissions for GCP resources. Control who can perform control-plane operations on your SAP HANA instances, including creating, modifying, and deleting VMs and persistent disks, and creating and modifying networks.

Understanding the deployment architecture

SAP HANA supports single-node and multi-node architectures.

Single-node architecture

The following diagram shows the single-node architecture. In the diagram, notice both the deployment in GCP and the disk layout. You can use Cloud Storage to back up your local backups available in /hanabackup. (This mount should be sized equal to or greater than the data mount.)

Deployment Layout

Notice that the VM for SAP HANA has no public IP, which means it cannot be reached from an external network. Instead, the deployment uses a NAT bastion host and HANA Studio for accessing SAP HANA. The SAP HANA Studio instance and the bastion host are deployed in the same subnetwork as the SAP HANA instance.

You provision a Windows host on which you install SAP HANA Studio, with the instance placed in the same subnetwork, and with firewall rules that enable you to connect to the SAP HANA database from SAP HANA Studio.

You deploy SAP HANA using a single-node, scale-up architecture that has the following components:

  • One Compute Engine instance (n1-highmem-32 or n1-highmem-64 type) for the SAP HANA database, with SSD persistent disks having a size greater than 1.7 terabytes, and a network bandwidth of up to 16 Gbps. The SSD persistent disk is partitioned and mounted with 1 terabyte for the mount /hana/data to host the data.

  • An optional, but recommended, subnetwork with a custom topology and IP ranges in the GCP region of your choice. The SAP HANA database and the other Compute Engine instances are launched within this subnetwork. You can use an existing subnetwork for SAP HANA.

  • An optional, but recommended, Internet gateway configured for outbound Internet access for your SAP HANA and other instances. This guide assumes you are using this gateway.

  • Compute Engine firewall rules restricting access to instances.

  • Persistent disk, standard 1 terabyte for backup of SAP HANA database.

  • Compute Engine VM, n1-standard-2, with Windows OS to host SAP HANA studio.

  • Compute Engine VM, n1-standard-1 as a bastion host.

  • Automated SAP HANA database installation with a configuration file that you create.

  • SAP HANA Studio.

Multi-node architecture

The following diagram shows the multi-node architecture.

Multi-node architecture diagram.

As the workload demand increases, especially when using OLAP, a multi-node (up to 4 nodes), scale-out architecture can distribute the load across all nodes.

The scale-out architecture consists of one master node and number of worker nodes. They are inter-connected through a network with a capacity up to 16 Gbps. Each node has its own /hana/data, /hana/log, /usr/sap volumes on SSD persistent disk, which provide consistent, high IOPS, IO services. The master node also serves as an NFS master for /hana/shared and /hanabackup volumes, which is mounted on each worker node. Compute Engine's live migration and automatic instance restart features provide for high availability. For more information, see the SAP HANA Operations Guide.

In the event of a live migration or automatic instance restart event, the protected-persistent-storage-based /hana/shared and /hanabackup volumes can be back online as soon as an instance is up.

Backing up directly to Cloud Storage buckets by using Cloud Storage FUSE is currently not supported. However, if you want to utilize this functionality, you can mount your Cloud Storage volumes to /hanabackup_gcs and create a script to schedule the movement of your backups from /hanabackup to /hanabackup_gcs.

You deploy SAP HANA on a multi-node scale-out architecture with the following components:

  • Deploy one Compute Engine instance (n1-highmem-32 or n1-highmen-64 type), defining the setup script as detailed later in this guide. This script creates the additional required virtual instances and automatically adds the required SSD and HDD storage to each host, mounted in the correct location. It creates a central NFS location for the shared HANA binaries and /hanabackup location. Finally it automatically installs SAP HANA across the entire cluster.

  • An optional, but recommended, subnetwork with a custom topology and IP ranges in the GCP region of your choice. The SAP HANA database and the other Compute Engine instances are launched within this subnetwork. You can use an existing subnetwork if you prefer.

  • Optional Internet gateway configured for outbound Internet access for your SAP HANA instance and other instances. This guide assumes you are using this gateway.

  • Optional Compute Engine VM: n1-standard-2 with Windows operating system to host SAP HANA Studio.

  • Optional Compute Engine VM: n1-standard-1 as a bastion host.

  • Compute Engine firewall rules to restrict access to Compute Engine instances.

Planning the deployment

Before deploying SAP HANA on GCP, make sure you know the instance types, storage configuration, and networking you need to use.

Instance types

The following machine types are officially certified by SAP for production use on GCP.

Instance Types Virtual CPUs DRAM
n1-highmem-32 32 208
n1-highmem-64 64 416

Both instance types are also supported for a scale-out scenario for production, with 3 additional worker nodes, totaling 4 nodes.

For more information about different instance types and their use cases, see machine types.

Storage configuration

SAP HANA is an in-memory database, so data is mostly stored and processed in memory. Protection against data loss is provided by saving the data to a persistent storage location. To achieve optimal performance, the storage solution used for SAP HANA data and log volumes should meet SAP's storage KPIs. Google has worked with SAP to certify SSD persistent disks for use as the storage solution for SAP HANA workloads, so long as you use the configuration described in this guide:

vCPUs Reads (MB/sec) Writes (MB/sec)
32+ 800 400

For production workloads, we recommend using the n1-highmem-32 or n1-highmem-64 instance type with 32 virtual CPUs. As the table above indicates, you can get up to 400 MB/sec for writes and 800 MB/sec for reads with this instance type with a volume sized at 1.7 TiB for data and log files.

Storage for SAP HANA backup is configured with standard HDD persistent disks. Standard HDD persistent disks are efficient and economical for handling sequential read-write operations, but are not optimized to handle high rates of random input-output operations per second (IOPS). SAP HANA uses sequential IO with large blocks to back up the database. Standard HDD persistent disks provide a low-cost, high-performance option for this scenario.

The SAP HANA backup volume size is designed to provide optimal baseline and burst throughput as well as the ability to hold several backup sets. Holding multiple backup sets in the backup volume makes it easier to recover your database if necessary. This deployment guide uses a 1 terabyte standard HDD persistent disk for local backup.

Memory configuration

Google has joined with SAP to certify the n1-highmem-32 instance type with 208 GB DRAM and the n1-highmem-64 instance type with 416 GB DRAM for SAP HANA.

Operating System Configuration

You can run SAP HANA on the following operating systems on Compute Engine:

SAP HANA Version OS Versions
SAP HANA 1.0 SPS12 11 SP4, 12 SP1, 12 SP1 for SAP
SAP HANA 2.0 SP00 SLES: 12 SP1, 12 SP1 for SAP

Refer to the SAP Note on supported operating systems for more information.

Deploying SAP HANA on GCP

This section shows you how to deploy a 4-node SAP HANA installation on GCP.

Set up your Google Cloud account

A Google account is required to work with GCP.

  1. Sign up for a Google account if you don't already have one.
  2. Log in to the Google Cloud Platform Console, and create a new project.
  3. Enable your billing account.
  4. Configure SSH keys so that you are able to use them to SSH into your Compute Engine instances. Use the gcloud tool to create a new SSH key, or, if you already have an existing SSH key, use the glcoud tool to format your existing SSH keys.
  5. Use the glcoud tool to add the SSH keys to your project metadata. This allows you to access any Compute Engine instance created within this project, except for instances that explicitly disable project-wide SSH keys.

    Instead of using the gcloud command line tool, you can create and add SSH keys by using the Cloud Platform Console


  6. Use the gcloud tool to check your quota to make sure you have enough available quota to launch resources in your account. Watch for CPUs, total persistent disk reserved, and total SSD disk reserved (GB) in the region where you are planning to launch your SAP HANA database.

These instructions assume you have enough quota to create on each of the four nodes:

  • 64 virtual CPUs (SAP HANA instances plus Bastion/NAT instance plus SAP HANA Studio host)
  • 2.0 TB of persistent SSD storage
  • 1 TB of standard persistent disk

If you don't have sufficient quota for these resources, you can use any combination of the following approaches:

Before following the rest of these deployment instructions, verify that you have enough quota available for your deployment. The requirements are as follows:

Instance Type CPU Memory Standard PD SSD PD
highmem-32[1] 32 208 GB 544 GB 1.7 TB
highmem-64[1] 64 416 GB 1056 GB 2.0 TB
Bastion 1 3.75 GB 8 GB 0 GB

[1] If you are deploying a scaled-out HANA instance, multiply these numbers by the number of nodes deployed.

Setting up networking and VPN

Create a custom Google Cloud Network to host your SAP HANA database environment.

  1. Use the Cloud Shell to execute the following gcloud commands.


  2. Run the following commands:

        export NETWORK_NAME="sapnetwork1"
        export REGION="us-west1"
        export CIDR=""
        export SUBNET=${NETWORK_NAME}-${REGION}
        gcloud compute networks create $NETWORK_NAME --mode custom
        gcloud compute networks subnets create $SUBNET --network $NETWORK_NAME --region $REGION --range $CIDR

    These commands create a custom network and a subnet with a CIDR IP range of in zone us-west1. You can customize this IP range and region. Consider choosing the region closest to your data center or corporate network, which can help reduce network latency between systems running on GCP and the systems and users on your corporate network.

    Note that this example uses the default routes when creating the network. The default routes allow VMs within the network to communicate by using the private IP. The default also provides a route to the default Internet gateway for any other IP.

    Also note that there is a soft limit of 5 on the number of networks you can create, but you can exceed this limit by requesting quota increase.

  3. Add firewall rules. If you are connecting your network to the Google Cloud Network by using VPN, you'll need to add firewall rules to the network.

    gcloud compute firewall-rules create ${NETWORK_NAME}-internal  --network $NETWORK_NAME --allow tcp:0-65535,udp:0-65535,icmp --source-ranges $CIDR
    gcloud compute firewall-rules create ${NETWORK_NAME}-ssh --network $NETWORK_NAME --allow tcp:22,tcp:3389,icmp

Create the NAT Gateway.

We recommend this step, and these instructions assume you're using a NAT gateway. However, you aren't required to perform this step if you are planning to assign an external, public IP address for your SAP HANA instance.

  1. From the Cloud Shell, invoke the following commands.


    export NETWORK_NAME="sapnetwork1"
    export ZONE="us-west1-a"
    export TAG="private-hana-instance"
    export REGION="us-west1"

    gcloud compute instances create ${NETWORK_NAME}-nat-gateway --can-ip-forward  --zone $ZONE --image-family debian-8  --image-project debian-cloud  --subnet $SUBNET --metadata startup-script="sysctl -w net.ipv4.ip_forward=1; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" --tags nat
    gcloud compute routes create ${NETWORK_NAME}-priv-internet-route --network $NETWORK_NAME --destination-range --next-hop-instance ${NETWORK_NAME}-nat-gateway --next-hop-instance-zone $ZONE --tags $TAG --priority 800

    These commands create a Compute Engine VM in the same subnetwork you created in the earlier step, with a route for a VM tagged with private-hana-instance, to route traffic through the NAT instance instead of the default Internet gateway. Note this tag because you must use it later when you create an SAP HANA instance.

  2. If you want to use the NAT Gateway VM as a bastion host, you must allow inbound SSH access into this instance from the Internet by executing the following command from the Cloud Shell:

    gcloud compute firewall-rules create ${NETWORK_NAME}-allow-ssh --network $NETWORK_NAME --allow tcp:22 --source-ranges --target-tags "nat"

    Note that this command specifies a target tag for this inbound rule. This target tag is used so the firewall rule applies only to the instance that has that tag and not to all instances in the network. That is, because the NAT instance is created with the tag nat, the above command applies the firewall rule only to this NAT instance.

Download SAP HANA

Unless you have already extracted the SAP HANA binaries to a Cloud Storage bucket, download SAP HANA now:

  1. Log into the SAP support portal.

    If your SAP Support Portal account does not allow access to the software and you believe that you should be entitled to the software, contact the SAP Global Support Customer Interaction Center.

  2. In the left navigation pane, choose Installation and Upgrades.

  3. Choose A – Z index. 0 In the Installations and Upgrades window, choose H.
  4. Choose SAP HANA Platform Edition from the list.
  5. Choose SAP HANA Platform Edit. 1.0 or 2.0.
  6. Choose Installation.
  7. In the Downloads windows, find the revision you wish to download and download each file directly to your local drive.
  8. Use the Cloud Platform Console to Create a Cloud Storage bucket for storing the SAP HANA installation files. Note that the bucket name must be unique across GCP.

    • During bucket creation, if you are going to create SAP HANA instances in a single region, choose Regional for your storage class, as shown here:

      Creating Buckets

    • If you are creating SAP HANA instances in other regions in the same continent, choose Multi-Regional for your storage class. If you are not sure, choose Multi-Regional.

  9. Configure bucket permissions. By default, as owner of the bucket, you have read-write access to the bucket. If you want, you can allow other members in your group or individual users to access your bucket, as shown here:

    Bucket Permissions

  10. In the Cloud Platform Console, in the Cloud Storage bucket page, choose Upload Files to upload the software to your bucket from your local media:

    Upload Files

  11. Note the name of the bucket that you uploaded the binaries to. You need to use it later when you install SAP HANA.

  12. Create a text file named install.cfg, which is used later by an install script to configure your SAP HANA installation, and add the following lines:

    # SAP HANA System ID
    # Instance Number
    # SAP Host Agent User (sapadm) Password
    # System Administrator Password
    # Database User (SYSTEM) Password
    Restart system after machine reboot? ( Default: n )

    Replace <SID> with the system ID, replace <Password> with your corresponding passwords for SAP Admin, sys admin, and database user, respectively.

  13. Upload install.cfg to the root of the bucket you created.

Creating a VM with SAP HANA installed

The following instructions create an SAP-certified n1-highmem-64 instance with all of the required disk configuration and install SAP HANA. Please refer to costs and licenses section to understand the costs. You can modify these instructions to create the setup that you need.

  1. Use the Cloud Shell to invoke the following commands.


  2. Set the variables:

    export INSTANCE_NAME="saphana01"
    export MEDIA_BUCKET="gcshana"
    export NETWORK_NAME="sapnetwork1"
    export REGION="us-west1"
    export INSTANCE_TYPE="n1-highmem-64"
    export ZONE="us-west1-a"
    export ADDITIONAL_NODES="3"
    export SLES_IMAGE=$(gcloud compute images list --project "suse-sap-cloud"| grep sles | grep sap | awk '{ print $1 }' | grep -i sp1)

    Setting ADDITIONAL_NODES to 3 deploys 4 instances in total and creates a HANA scale-out cluster.

  3. Create the instances:

    gcloud compute instances create "$INSTANCE_NAME" --machine-type $INSTANCE_TYPE --subnet "$SUBNET" --zone "$ZONE"  --metadata "hana_media=$MEDIA_BUCKET,startup-script=curl | bash -s $ADDITIONAL_NODES" --image "$SLES_IMAGE" --image-project "suse-sap-cloud" --boot-disk-size "32" --boot-disk-type "pd-standard" --boot-disk-device-name "$INSTANCE_NAME" --scopes "","","","","","",""
  4. After the commands finish, a startup script is instantiated as part of the VM creation. It downloads the SAP HANA software from the Cloud Storage bucket and installs SAP HANA with the configuration you specified in install.cfg. Wait for the installation to complete.

    • There is a reboot after the master instance is created, so wait up to 2 minutes to sign in to the master node.

    • This startup script takes around 10 to 15 minutes to complete, depending on the number of nodes deployed, so wait for the installation to complete. After the installation is done, a copy of the installation log is uploaded the Cloud Storage bucket you defined, which contains your media.

  5. Validate the installation by verifying the following:

    • The script should create volume groups for data, log, backups and shared. Check this by running the command df -h: you should see output similar to the followingscreenshot:

      Data volumes created by the script.

    • Determine whether all the SAP HANA services are running on the instance by running the commandHDB info as the **<SID>**adm user.

    • Check landscape info:

      Landscape information.

    If any of the above validation steps show that the installation failed, re-run the startup script on the instance.

  6. If you are using NAT gateway, add tags to all instances, including the worker nodes:

    export INSTANCE_NAME="saphana01"
    export NETWORK_NAME="sapnetwork1"
    export ZONE="us-west1-a"
    export TAG="private-hana-instance"

    gcloud compute instances add-tags "$INSTANCE_NAME" --tags="$TAG" --zone=$ZONE
    gcloud compute instances add-tags "$INSTANCE_NAME"w1 --tags="$TAG" --zone=$ZONE
    gcloud compute instances add-tags "$INSTANCE_NAME"w2 --tags="$TAG" --zone=$ZONE
    gcloud compute instances add-tags "$INSTANCE_NAME"w3 --tags="$TAG" --zone=$ZONE

    Delete external IPs:

        gcloud compute instances delete-access-config "$INSTANCE_NAME" --access-config-name "external-nat" --zone=$ZONE
        gcloud compute instances delete-access-config "$INSTANCE_NAME"w1 --access-config-name "external-nat" --zone=$ZONE
        gcloud compute instances delete-access-config "$INSTANCE_NAME"w2 --access-config-name "external-nat" --zone=$ZONE
        gcloud compute instances delete-access-config "$INSTANCE_NAME"w3 --access-config-name "external-nat" --zone=$ZONE

Creating a Windows VM for SAP HANA Studio

  1. Use the Cloud Shell to invoke the following commands.


    export NETWORK_NAME="sapnetwork1"
    export REGION="us-west1"
    export ZONE="us-west1-a"

    gcloud compute instances create "saphanastudio" --zone $ZONE --machine-type "n1-standard-2" --subnet $SUBNET --metadata "tag1=hanastudio" --image "windows-server-2012-r2-dc-v20170117" --image-project "windows-cloud" --boot-disk-size "100" --boot-disk-type "pd-standard" --boot-disk-device-name "saphanastudio"

    gcloud compute firewall-rules create ${NETWORK_NAME}-allow-rdp --network $NETWORK_NAME --allow tcp:3389 --source-ranges --target-tags "hanastudio"

    These commands create a Windows server in the subnetwork you created earlier, with a firewall rule to allow access to the instance through Remote Desktop Protocol(RDP). Although not shown here, you can also whitelist your customer IP address range in the firewall rules.

  2. Install SAP HANA Studio on this server.

Connect to SAP HANA

Note that because these instructions don't use an external IP for SAP HANA, you can only connect to the SAP HANA instances through the bastion instance using SSH or through the Windows server through SAP HANA Studio.

  1. To connect to SAP HANA through the bastion instance, connect to the bastion host and then to the SAP HANA instance(s) by using an SSH client of your choice.

  2. To connect to the SAP HANA database through SAP HANA Studio, use a remote desktop client to connect to the Windows Server instance. After connection, manually install SAP HANA Studio and start accessing your SAP HANA database.

Performing post-deployment tasks

Before using your SAP HANA instance, we recommend that you perform the following post-deployment steps (see also SAP HANA Installation and Update Guide.

  1. With SLES as the operating system for your SAP HANA instance, make sure that the Linux kernel version is at least 3.12.51 to avoid possible XFS corruption. If your kernel version is less than3.12.51, update the kernel to the minimum required version. See SAP OSS Notes 2205917 and 2246163.
  2. Update your SAP HANA software with the latest patches.
  3. Install any additional components such as Application Function Libraries (AFL) or Smart Data Access (SDA).
  4. Configure and back up your new SAP HANA database.

Troubleshooting and Support

Google Cloud Platform customers with Gold or Platinum Support can request assistance with SAP HANA provisioning and configuration questions on Compute Engine. You can find additional information about support options at the Google Cloud Support page.

You can also contact SAP support for SAP-related issues. SAP does the initial evaluation of the support ticket and transfers the ticket through to the Google queue if SAP considers it an infrastructure issue.

Send feedback about...