This post is more than 5 years old
11 Legend
•
20.4K Posts
•
87.4K Points
0
7784
December 5th, 2017 19:00
Retrieving "estimated usable capacity remaining"
Hello folks,
How can i retrieve this metric either from FSA report or directly from PostgreSQL on IIQ system ? I would like to pull this value every so often via an automated process.
Thank you
No Events found!


dynamox
11 Legend
•
20.4K Posts
•
87.4K Points
1
December 7th, 2017 14:00
Brian,
I am trying to give them a ball park number based on the data that is currently on the cluster. We had a brand new 3 node cluster and we started migrating a lot of data from Centera. These were millions of small files, probably a lot of them less than 128kb (hello triple mirror) so when i looked in IIQ it was saying that protection overhead was 44%. Much greater then 33.3% that I was assuming for 2d:1n protection.
dynamox
11 Legend
•
20.4K Posts
•
87.4K Points
0
December 7th, 2017 14:00
Peter,
The number that is listed in InsightIQ is TiB and the number that i get using your method is in bytes which i then convert to Terabytes. Numbers in IIQ and the calculated # are identical so does IIQ really mean TiB or TB ?
Thanks
Brian_Coulombe_
1 Rookie
•
107 Posts
0
December 7th, 2017 15:00
Uhhh you and I both know that should be 33%. What OneFS version are you running and what hardware?
Peter_Sero
6 Operator
•
1.2K Posts
1
December 8th, 2017 09:00
InsightIQ uses the TiB etc units correctly, as far as I see.
When you compute overhead ratio, it's a division and the units cancel out -- nothing should go wrong here...
For quick checks it's nice that df on OneFS offers both unit systems:
df -h --> power of 1024
df -H --> powers of 1000
-- Peter
Peter_Sero
6 Operator
•
1.2K Posts
0
December 8th, 2017 09:00
With many really small files in the mix one ends up between 33% and 200% (or 3x),
so 44% still is towards the nicer end.
The example just shows that measuring the actual overhead
can make a significant difference from the nominal, configured protection level.
-- Peter
dynamox
11 Legend
•
20.4K Posts
•
87.4K Points
0
December 8th, 2017 10:00
Peter,
If i take the number from IIQ and convert TiB to Terabytes I get a larger number than what i get from using the computed number.
Thank you
Peter_Sero
6 Operator
•
1.2K Posts
0
December 8th, 2017 10:00
Do the raw capacities match? (IIQ and df)
What is your the computed protection ratio? (physical / logical)
Not that the percentage in IIQ is (physical - logical) / physical = 1 - 1/ratio, expressed as percent
dynamox
11 Legend
•
20.4K Posts
•
87.4K Points
0
December 8th, 2017 20:00
Peter,
This is what i get from the API
phys_size_sum :201373832746496
log_size_sum :128663300537168
f_bavail: 24878445210
ratio :1.56512254781093
estimate in Terabytes :118.430893109624
This is what i see in InsightIQ. If i convert 119 TiB to Terabytes that's 130 Terabytes, not 118.43 as i calculated ?
Peter_Sero
6 Operator
•
1.2K Posts
0
December 11th, 2017 14:00
f_bavail = 24878445210 (blocksize 8 * 1024 B) => 203804223160320 Bytes => 203.8 TB => 185.4 TiB
This is consistent with both the df outputs, and basically also with IIQ's "remaining 186 TiB".
The latter could be from a slightly different pointing time, or could have undergone some unlucky rounding.
Dividing by ratio 1.56512254781093 gives: 130.2 TB or 118.5 TiB usable capacity:
again consistent with IIQs final 119 TiB figure.
What was the math for your "estimate in Terabytes :118.430893109624"?
-- Peter
dynamox
11 Legend
•
20.4K Posts
•
87.4K Points
0
December 11th, 2017 21:00
$ratio = $phys_size_sum / $log_size_sum;
$fs_free_estimate = ($f_bavail * 8192 / $ratio) / 1024 / 1024 / 1024 /1024;
203804223160320 Bytes / 1.56512254781093 ratio , how are you getting 130.2 TB out of that ?
Peter_Sero
6 Operator
•
1.2K Posts
0
December 12th, 2017 08:00
Just divide... make sure you calculator can deal with very long integers or mantissae.
(Google-Search's builtin works, as does UNIX/Linux 'dc')
Double checking, looking only at the leading digits with any calculator:
203.8 / 1.565 = 130.22 TB (power-of-10)
Converting to power-of-2 units:
130.22 TB / (1.024^4) = 130.22 / 1.0995 = 118.44 TiB
I think you got it right, just that your result is already in TiB, not in decimal "terabytes".
-- Peter
dynamox
11 Legend
•
20.4K Posts
•
87.4K Points
0
December 12th, 2017 10:00
sorry Peter if i am being dense here:
203804223160320 Bytes / 1.56512254781093 = 130216144061928.1 Bytes. Now if convert that number to Terabytes I get 118.43089311 TB ( 130216144061928.1 / 1024 / 1024 / 1024 / 1024). What am i doing wrong, why do i end up with 118 TB and you end up with 130TB ?
Peter_Sero
6 Operator
•
1.2K Posts
0
December 12th, 2017 11:00
Going from 130216144061928.1 Bytes. to power-of-10 TBs involves no 1024s at all,
just shifting the decimal point... => 130.2 TB aka (decimal) terabytes in todays speak.
Sadly we have been using power-of-2 "terabytes" for so long,
misusing the decimal prefix.
But here I use terabyte and TB strictly for the decimal unit,
and tebibyte resp. TiB for power-of-2.
Bonus observation: 1 TiB = 1.1 TB within 1% accuracy
dynamox
11 Legend
•
20.4K Posts
•
87.4K Points
0
December 14th, 2017 10:00
Peter,
give that my calculated number (converting bytes to Terabytes by /1024 multiple times) is identical to the number listed in IIQ, makes me wonder if the number it IIQ is really Terabytes not Tebibytes.
Peter_Sero
6 Operator
•
1.2K Posts
0
December 14th, 2017 10:00
In our modern times, dividing by 1024 four times gives you Tebibytes, not Terabytes.
1 Tebibyte = 2^40 Bytes = 1024^4 Bytes
1 Terabyte = 10^12 Byes = 1000^4 Bytes
Problem is, we grew up calling 1024 Bytes a "Kilo"byte and so on.
As ugly as the word "Tebibyte" might appear,
calling 1024^4 Bytes a Terabyte will keep creating confusion.
IIQ correctly computes and displays Tebibytes,
and that's a free choice of the IIQ team.
Instead IIQ could use power-of-10-based Terabytes,
and the end result here would be 130.2 TB.
(try doing both exercises side by side, in two columns.)