cancel
Showing results for 
Search instead for 
Did you mean: 

Strange disk space usage

Ganimede-Dignan
Contributor
0 Kudos

Hi,

I've got a strage case. A Hana (a S/4 Hana database) box with 170 GB disk usage database. After master data update during holidays it is 320 GB. OK... but what kind of table has got 150 GB space usage? Datafile is used to 97%

If I run a "select sum(DISK_SIZE) from M_TABLE_PERSISTENCE_STATISTICS" I can see only "174,602,876,256" (that more or less is the same previous disk space usage)... so what is use all other disk space in datafile?

Accepted Solutions (0)

Answers (5)

Answers (5)

lbreddemann
Active Contributor

This is not really "so strange" but rather looks like a direct consequence of the way SAP HANA writes into its data files.

SAP HANA uses the "shadow pages"/"copy on change" approach, where changed data does not overwrite current data at the same location in the data files. Instead, a new location is used that does not contain current data (but may contain outdated data at this point).

When a lot of data gets changed (e.g. due to a master data update that touches many tables/records), it can lead to many pages being overwritten; maybe even multiple times.

Due to this mechanism, the data file usage may be much more than the actual table data would indicate. But since SAP HANA keeps track of which pages in the data files contain current data, it automatically reuses the outdated pages, so no space is "wasted".

Since SAP HANA backups also only ever copy the current pages out, this approach does not impact backups either.

Ganimede-Dignan
Contributor
0 Kudos

Hi,

during we, I run: alter system reclaim datavolume 105 defragment

After 30 minutes the datafile return to the originali size... so strange.

former_member233657
Active Participant
0 Kudos

Hi,

Maybe note 2562939 helps you.

With note 1969700 you can import some useful SQL Queries. With query HANA_Tables_TopGrowingTables_Size_History you can check the table history.

Kind regards,
Martin

AtulKumarJain
Active Contributor
0 Kudos

Hi,

Please check

table size from HANA studio -> administration editor -> System Information -> Size of Tables on Disk.

BR

Atul

Ganimede-Dignan
Contributor
0 Kudos

Hi,

more or less, 170 GB

Ganimede-Dignan
Contributor
0 Kudos

Hi,

a detail: same qry on dev system results 174,793,485,272 that is, more or less, the same disk space usage of datafile.

Thank you.