-1

I have a device generating some values say N, each value having 32 bit. I am logging these values every 10 seconds by writing a new row in an excel file. I will be creating a new file every day. I have to estimate the hard disk storage capacity necessary to store these log files for a period of 10 years. Can someone give any hints regarding the calculation of the size of log file generated per day ?

soulemane moumie
  • 1,005
  • 1
  • 14
  • 26
  • 1
    Excel can, and any other calculator can as well. But first you need to explain (to yourself at least) what exactly are you writing, in which format, and for what duration. – Amit Sep 23 '15 at 12:21
  • As I am using structured text, values are of type DWORD (32 bit) – soulemane moumie Sep 23 '15 at 12:37

2 Answers2

1

Assuming worst case 2's complement 32-bit ASCII... -2147483648 is 13 characters per value

  • 1 value / 10 seconds

3600 seconds / hour

24 hours /day

that's 112,320 bytes per day, per number of values N,

"round" that off to 112,640 bytes (divisible by 1024) per day

365.25 days per year

10 years

that's N * 411,417,600 or slightly more than N * 4Mbytes

So if N was 10, that would be slightly more than 41MBytes.

franji1
  • 3,088
  • 2
  • 23
  • 43
  • thank you for the ideas, it is a smart one. – soulemane moumie Sep 30 '15 at 09:39
  • 1
    Just a correction: 13 characters x N columns x 6 times per second x 60 min X 24 hours = n bytes per day – soulemane moumie Sep 30 '15 at 09:41
  • @soulemanemoumie corrected – franji1 Sep 30 '15 at 14:01
  • Please just a rectification in my previous comment: – soulemane moumie Oct 01 '15 at 07:45
  • 13 characters x N columns x 6 times per minutes x 60 min X 24 hours = n bytes per day – soulemane moumie Oct 01 '15 at 07:46
  • as every 10 seconds is equivalent to 6 times per minute – soulemane moumie Oct 01 '15 at 07:47
  • I think you're off by a factor of 10 or so. There are 86400 seconds per day, so roughly 10k measurements per day. There are roughly 4k days in 10 years. And there are roughly 10 bytes per record (partly compensates for over-estimates on the other two numbers). 10k x 4k * 10 = 400M rather than just 40M. The third and fourth digits in the estimate are spurious; so probably is any second digit. One of the comments says '4 bytes per record'; that may be correct for the value, but there's probably coordinate information too. Measurements, as suggested by the other answer, would help calibrate this. – Jonathan Leffler Jan 25 '17 at 00:50
0

Create a sample spreadsheet. Add 1000 rows and save it as a different name.

That will give an estimate for per-row cost.

Incremental writing is not a good scenario for complex formats such as spread sheet. Text log file could be appended.

A spread sheet would tend to re-write whole file for each flush.

mksteve
  • 12,614
  • 3
  • 28
  • 50