solid state seeks are like 10 or 50 times faster.
How to speed up massive data analysis by eliminating disk seeks
11–20 of 28 posts
Re: How to speed up massive data analysis by eliminating disk seeks
#12Re: How to speed up massive data analysis by eliminating disk seeks
#13Re: How to speed up massive data analysis by eliminating disk seeks
#14how about not using a mechanical disk. solid state seeks are like 10 or 50 times faster.
Re: How to speed up massive data analysis by eliminating disk seeks
#15Re: How to speed up massive data analysis by eliminating disk seeks
#16Re: How to speed up massive data analysis by eliminating disk seeks
#17I'm certain I'm re-inventing the wheel with this approach, but I obviously haven't been researching in the right places, since I hadn't run across this approach before I cobbled it together. I'm expecting an education on what I'm missing from the HN community!
Re: How to speed up massive data analysis by eliminating disk seeks
#18is it really faster to write to a bunch of text files, sort them to a new bigger text file, and then do the insert? seems like a lot of extra steps, all involving a lot of reading and writing..
This approach can be easily augmented too. For example, doing a binary search for a particular line in a text file when you don't have all the lines in RAM is somewhat tedious; it can be made much easier by creating a simple index for the file, consisting of a flat array of the file offset of every line start. That flat array can be stored in a file also; then, both the total number of lines and the contents of a line at any given index are trivial to retrieve.
If you have to handle a small number of updates while still handling lots of reads, then you can use a two-layer approach. Keep a cache of all pending updates in memory in an efficient manner (e.g. hash table), and look up the cache before falling back to the disk; and when writing, both update the cache and write out to an update log, which can be sorted and included in the main store later, when it makes sense.
Re: How to speed up massive data analysis by eliminating disk seeks
#19I'm certain I'm re-inventing the wheel with this approach, but I obviously haven't been researching in the right places, since I hadn't run across this approach before I cobbled it together. I'm expecting an education on what I'm missing from the HN community!
That said, their ideas are quite straightforward and you could look them up quickly (I forgot the blog I was thinking about, but check also here: http://www.vldb.org/ ).
Re: How to speed up massive data analysis by eliminating disk seeks
#20I'm certain I'm re-inventing the wheel with this approach, but I obviously haven't been researching in the right places, since I hadn't run across this approach before I cobbled it together. I'm expecting an education on what I'm missing from the HN community!
Crunching the data down in size to make it both small yet low-cost to extract was then the challenge. I started out with sorted text files on the order of 550MB, and ended up with memory dumps of efficiently packed tries on the order of 95MB, with further scope for compression possible through huffman encoding of markov chains (encoding letter transition probabilities with a path through a huffman binary tree), that I didn't need to implement because I had already achieved my goals.
The trivial parallelization available through sorting massive text files is hard to beat, though, especially as you can write ad-hoc bash scripts to do work with sort, uniq, sed, etc.