- How can design my file parser to maximize the hardware when processing (creating meta data for) a large file
(i.e. how to avoid being blocked by IO and running out of memory)
preferably I would like to give the user a "high priority" (locks the system apart from some progress UI) and a "run in background" option (Allows the user to start using data that has already been indexed/loaded)
- Presumably I will have no problems having multiple threads reading the same set of files?
- The way I see it the biggest bottleneck / will be writing to the database. Presumably I will have to lock/unlock that and have each thread queue up data to write in batches?
- As each thread will need its own data queues I am unsure how to make sure the machine does not run out of memory
- When processing the data blocks I basically want to get stuff like averages, minimums and maximums, I have assumed I can't use the GPU to process the data blocks like this? it feels like there is too much shared data to utilize the GPU here.
I am working with very large data sets, split across multiple files (each "full" data file is 1.5gb and there are often several of these files (I am looking at one now that has 10)
The data effectively contains a series of buffers that I want to access 1 or more at a time.
I want to go through the data file, filling a database with index information (so i can access specific blocks quickly based of either information in the header or the datablock itself). If I can I would also want to blit information to a graph image as I do it.
The machine it will be ran on is a proper workstation PC so there is plenty of ram and processing power to utilize :)
On the top spec machine there is 64GB of ram and a i7 that is 12 cores (hyperthreaded) so in theory i could get away with loading the whole file into memory and then processing. But some of the lower spec machines have a lot less ram and the files that people are producing are getting bigger every day, so Its not very forward thinking to rely on that plan.
I am using C# so any tips on the best ways to judge the hardware capabilities in C# (at run time) and maximize them when accessing a set of large files, would be a great bonus