The size of 32-bits

0 views
Skip to first unread message

Loren M. Lang

unread,
Sep 14, 2010, 8:59:18 PM9/14/10
to Life Logging
I decided to ponder a little what the real size of a 32-bit integer is
when used as an ID for points in our database. A 32-bit number is more
than 136 years when it represents seconds. Now, when recording at
100Hz, that would be more than 1.36 years worth of continous recording
at that rate. More importantly, since it takes 4 bytes to record a
32-bit integer, it actually takes 16GB to store all 4 billion possible
IDs assuming no points have been deleted from history. This isn't
counting any useful data. Assuming a 32-bit timestamp as well is
another 16GB and latitude, longitude, and altitude all use 64-bit
floating point numbers taking 32GB per field for a total of 128GB for a
full database. SQLite3 natively uses 64-bit IDs so we won't be limited
to only 128GB of storage.
--
Loren M. Lang
lor...@north-winds.org
http://www.north-winds.org/


Public Key: ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc
Fingerprint: 10A0 7AE2 DAF5 4780 888A 3FA4 DCEE BB39 7654 DE5B

Reply all
Reply to author
Forward
0 new messages