3 ms·
What an unhelpful post. The realization that modern servers can easily persist multiple terabytes of data is profound. The fact that some datasets are just fl
by forrestthewoods 4y ago
What an unhelpful post.
The realization that modern servers can easily persist multiple terabytes of data is profound.
The fact that some datasets are just floats and you can quantize some floats from 32-bits down to 8-bits is true but not a helpful observation.
I also don’t know where you get “Python float is 24 bytes + 8-byte pointer for each item in the list”. Wat.
- tomatotomato37 4y agoThere's still a difference between terabytes of data spread between RAM sticks multiple inches away from the CPU die and the megabytes of cache data close enough to the compute silicon to experience quantum effects. A modern CPU can burn through hundreds of instructions in the time it takes to resolve a thrashing cache
- forrestthewoods 4y agoYes and? Latency (hand wavey) L1: 1 ns L2: 2.5 ns L3: 10 ns RAM: 50 ns SSD: 50,000 ns / 50 us Those are very approximate and specifics vary. RAM is 5 to 50 times more latent than cache. SSD is ~1000 times slower than RAM. And a spinning HDD is I think ~100 times slower than an SSD. If your database fits in RAM you’re likely in a happy place. If your DB is so massive it needs to spill to disk you wind up with a mountain of complexity. Multiple machines, sharding, hot/cold etc. The point of the article is “modern servers have a lot of RAM and you might be able to delete a lot of complexity if you throw money at a server with 4 terabytes of RAM. This option is more practical than you might have realized!”
- minitech 4y ago> I also don’t know where you get “Python float is 24 bytes + 8-byte pointer for each item in the list”. Wat. Not sure how many ways there are to reword that. A CPython float takes 24 bytes of memory, and storing them in a list means 8 bytes per item for the pointer. So in CPython, a list of n floats takes 32n bytes of memory. >>> sys.getsizeof(1.0) 24 >>> l = list(map(float, range(62_500_000))) # memory use goes up by >2 GB >>> del l # memory use goes down by >2 GB (no need to go straight to NumPy to avoid this when relevant, though – array.array is built in.)
- forrestthewoods 4y agoWell I’ll be. 8 bytes for the 64-bit double 8 bytes for object type pointer 8 bytes for reference count Lists are dynamic arrays with object pointers, some another 8 bytes per pointer. TIL and I stand corrected on that point. I thought CPython was more clever than that for lists of floats, but apparently not!