Details on HANA Fast restart
The SAP HANA Fast Restart option helps speed up the restart of the SAP HANA service. It does this by reusing certain data fragments stored in the file system instead of reloading them from the storage. This is useful when the operating system doesn't need to be restarted.
With the Fast Restart option, the SAP HANA service can quickly start up by using the data fragments already stored in memory, which reduces the time it takes to get everything up and running again. This is different from the usual method of reloading data from the storage, which can be slower. The Fast Restart option stores these data fragments in a special type of file system that can grow and shrink as needed.
The Fast Restart option works with different types of hardware and operating systems that are supported by SAP HANA. It doesn't affect the performance or sizing of SAP HANA when it's running normally.
When comparing it to another feature called Persistent Memory, the Fast Restart option is an alternative for situations where servers with Persistent Memory are not available or cannot be used together with Persistent Memory. While the Fast Restart option reduces the downtime, it doesn't offer the same cost savings as Persistent Memory. Here's a comparison of when each option can be used to reuse the data fragments without reading them from the storage:
- HANA restart: Both options can be used.
- HANA service restart: Both options can be used.
- HANA upgrade/service patch: Both options can be used.
- Operating system update/service patch: Only Persistent Memory can be used.
- Planned server reboot: Only Persistent Memory can be used.
- Server reboot due to hardware failure: Only Persistent Memory can be used.
- Power outage: Only Persistent Memory can be used.
- BIOS/firmware update: Only Persistent Memory can be used.
- Hardware upgrade without Persistent Memory replacement: Only Persistent Memory can be used.
To sum it up, the SAP HANA Fast Restart option makes it faster to restart the SAP HANA service by reusing data fragments stored in the file system. It's a convenient option when the operating system doesn't need to be restarted. However, it's not as cost-efficient as using Persistent Memory, which provides even faster restart times.
To use the SAP HANA Fast Restart option, you need to follow these steps:
1. Determine the number of CPU sockets (The number of CPU sockets available on a HANA server is important because it determines the maximum number of CPUs that can be installed and utilized by the system. Each CPU socket can typically accommodate a single physical CPU chip, which may contain multiple CPU cores) available on your HANA server by running the following command:
```
cat /sys/devices/system/node/node*/meminfo | grep MemTotal | awk 'BEGIN {printf "%10s | %20s\n", "NUMA NODE", "MEMORY GB"; while (i++ < 33) printf "-"; printf "\n"} {printf "%10d | %20.3f\n", $2, $4/1048576}'
```
This will provide you with information about the nodes, such as their numbers and the amount of memory they have.
2. Create a directory and mount for each node that has memory. Make sure that all tmpfs mounts have a preferred NUMA policy. Here's an example:
```
mkdir -p /hana/tmpfs0/<SID>
mount tmpfs<SID>0 -t tmpfs -o mpol=prefer:0 /hana/tmpfs0/<SID>
mkdir -p /hana/tmpfs1/<SID>
mount tmpfs<SID>1 -t tmpfs -o mpol=prefer:1 /hana/tmpfs1/<SID>
```
Replace `<SID>` with the appropriate identifier for your system. Ensure that you have proper access rights for these directories:
```
chown -R <SID>adm:sapsys /hana/tmpfs*/<SID>
chmod 777 -R /hana/tmpfs*/<SID>
```
3. If you want to limit the size of these mounts, you can use the SIZE option of the mount command. For example:
```
mount tmpfs<SID>0 -t tmpfs -o mpol=prefer:0,size=250G /hana/tmpfs0/<SID>
```
4. To ensure that the mount points remain available after an operating system reboot, you need to add entries to the file system table, usually located at `/etc/fstab`. Add the following entries, replacing `<sid>` with your system's identifier:
```
tmpfs<sid>0 /hana/tmpfs0/<sid> tmpfs rw,relatime,mpol=prefer:0 0 0
tmpfs<sid>1 /hana/tmpfs1/<sid> tmpfs rw,relatime,mpol=prefer:1 0 0
```
Configuration:
In the [persistence] section of the global.ini file, you need to define the basepath location for the in-memory storage of MAIN data fragments. Use the `basepath_persistent_memory_volumes` parameter to specify the basepath location.
You can define multiple locations corresponding to NUMA nodes, separated by a semicolon. For example:
```
/hana/tmpfs0/<SID>;/hana/tmpfs1/<SID>
```
Ensure that you also refer to the Persistent Memory topic for further details on using the same basepath parameter.
You can enable the Fast Restart option for partitions, tables, or columns by using SQL CREATE and ALTER table statements with the `alter_persistent_memory_spec` clause. Refer to the examples in the Persistent Memory section for more information.
To limit the overall tmpfs memory usage for all NUMA nodes, you can set the `persistent_memory_global_allocation_limit` parameter in the [memorymanager] section of the global.ini file. By default, no limit is specified, and HANA determines a reasonable value. You can enter a value in MB to set a limit on the size of the used tmpfs space for each host.
When unloading tables from memory, the standard UNLOAD statement and implicit table unloads do not free the memory by default. The `table_unload_action` parameter in the [
persistent_memory] section of the indexserver.ini file controls this behavior. The default value for tmpfs is DELETE, which clears the MAIN data fragments from tmpfs. However, you can set it to RETAIN if needed.
To completely free memory, you can use the UNLOAD statement with the additional DELETE PERSISTENT MEMORY clause:
```
UNLOAD MYTABLE01 DELETE PERSISTENT MEMORY;
```
If you wish to limit the size of the main memory storage, you can decrease the tmpfs file system size or use the `persistent_memory_global_allocation_limit` parameter to restrict the used tmpfs size.
Remember to adjust the commands and configuration settings to match your specific system setup and requirements.
Comments
Post a Comment