[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Using a file on an ssd for storage of nodes in complex networks.

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 5
Thread images: 3

File: 1471580612538.jpg (118KB, 968x334px) Image search: [Google]
1471580612538.jpg
118KB, 968x334px
I am working on a program that simulates nodes interacting. In the last versions I quickly hit a ceiling of several million nodes as they were quite large memory wise, around 80bytes iirc. My new version is much better because I do not store all of the information, instead it is gathered when needed. An example is storing the number of connections between nodes, now I loop through them until I hit a null connection and return the result. Much smaller memory, but much heavier on processing time.

My question is would it be feasible to store the nodes in a file on an ssd and use the file stream to manipulate them w/o loading them into memory? This way the ceiling would be so high it would no longer be a concern, however, what problems may I encounter? I could once again store all the node information saving processing time, but would the reading and writing be so slow to make it unworkable? Does anyone have experience with something like this? Any problems that are not obvious?

One thing I was worried about was working with multiple networks but I will not be anywhere near the 512 cap.
https://msdn.microsoft.com/en-us/library/kdfaxaay.aspx

Any thoughts would be greatly appreciated. C++ is the language I am using.
>>
>>56164578
instead, make a large memory-mapped file on the SSD. This is similiar to using the disk directly, but the OS will use all available RAM as a cache when accessing it. i. e. the OS will pick for you which parts to keep loaded in ram for faster access and which to evict back unto disk.
There are no issues with having a 100 GB memory mapped area on a machien with only 4 GB RAM (due to virtual memory)
>>
File: 1471625637196.gif (1MB, 320x175px) Image search: [Google]
1471625637196.gif
1MB, 320x175px
>>56165665
Holy hell, somehow googled right around this when searching. This fits what I need perfectly. The virtual memory may be an issue, but if so I will make the networks modular. Thank you good sir, this helps tremendously. And I can share between processes! That is pretty fucking cool desu.
>>
>>56167074
>The virtual memory may be an issue
you should have 64 bits of address space available
>>
File: IC72434.gif (5KB, 474x295px) Image search: [Google]
IC72434.gif
5KB, 474x295px
>>56168980
Looked into it and you are right, which means this will work in every way that I need to. Thank you guy(s), your help is much appreciated. I can do much more than I expected, things like this are why I love programming.
Thread posts: 5
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.