thenickdude / snap-to-s3

Upload EBS volume snapshots to Amazon S3/Glacier
Other
114 stars 24 forks source link

Question regarding how percentages are calculated for analysis report #19

Open captainfalcon23 opened 2 years ago

captainfalcon23 commented 2 years ago

G'day,

I am reading https://www.npmjs.com/package/snap-to-s3, specifically the section around "Analyzing a Cost and Usage report".

Looking at this example:

Region us-west-2 ($166.16/month for 24 snapshots)
vol-xxx (500GB, MySQL Slave DB): 3016 GB total, $151/month for 16 snapshots, average snapshot change 32%
  snap-xxx  2016-11-01  448.7 GB
  snap-xxx  2016-12-01  261.7 GB (52%)
  snap-xxx  2017-01-01  301.5 GB (60%)
  snap-xxx  2017-02-01  275.4 GB (55%)
  snap-xxx  2017-03-01  250.5 GB (50%)
  snap-xxx  2017-04-01  279.3 GB (56%)
  snap-xxx  2017-05-01  320.6 GB (64%)
  snap-xxx  2017-05-17  218.1 GB (44%)
  snap-xxx  2017-05-18  90.8 GB (18%)
  snap-xxx  2017-05-19  85.2 GB (17%)
  snap-xxx  2017-05-20  89.4 GB (18%)
  snap-xxx  2017-05-21  93.2 GB (19%)
  snap-xxx  2017-05-22  92.6 GB (19%)
  snap-xxx  2017-05-23  82.8 GB (17%)
  snap-xxx  2017-05-24  87.1 GB (17%)
  snap-xxx  2017-05-25  39.5 GB (7.9%)

How are you exactly calculating the percentage difference between snap 1 and 2? I'm not clear how 261.7 is 52% of 448? 448 * .52 = 232. Same with snap 2 and 3 - there's 60% change between the snaps.

I'm probably just interpreting incorrectly - and help is appriciated :)

Bonus question: Is the recomendation to move anything >30% changed to archive (even though archive is a full image? The total billed storage for these snaps is about 1904GB. So 1904 x 0.0550000000 = 104.72 USD approx.

  snap-xxx  2016-12-01  261.7 GB (52%)
  snap-xxx  2017-01-01  301.5 GB (60%)
  snap-xxx  2017-02-01  275.4 GB (55%)
  snap-xxx  2017-03-01  250.5 GB (50%)
  snap-xxx  2017-04-01  279.3 GB (56%)
  snap-xxx  2017-05-01  320.6 GB (64%)
  snap-xxx  2017-05-17  218.1 GB (44%)

But if I moved these 7 snaps @ 448GB each to archive, that would be 3136GB x $0.0125=$39. But then this snap's change % would increase, so you would be slightly billed more.

  snap-xxx  2017-05-18  90.8 GB (18%)

Sorry for the silly questions! Just trying to work out the best strategy to move snaps to archive.

thenickdude commented 2 years ago

The percentages are actually as a percentage of the total volume size (500GB).

Yes, the pricing for Infrequent Access would make migrating that series pretty much a wash as you say. But if you achieve 2 or 3x compression, which is very realistic for MySQL for example, then it becomes a lot cheaper.

Also if you can use Glacier instead of Infrequent Access it cuts the cost significantly, to $0.0036 per GB-month.

captainfalcon23 commented 2 years ago

Ah gotchya. I didn't even notice the 500GB. Wouldn't it make more sense to have the percentages sho the difference between the current snap and the previous snap, since snaps are all based on a lineage?

In your experience, is moving snaps with > 30% change the way to go to achieve savings? With little impact to remaining snaps?