Slow speed to save sim results

A Python package that facilitates development and use of models of biological neural networks

Moderator: tom_morse

Post Reply
bremen
Posts: 26
Joined: Mon Apr 24, 2017 8:15 am
Location: Italy

Slow speed to save sim results

Post by bremen » Sat Apr 21, 2018 10:32 am

Hi Salvador.

I'm saving the voltage traces of about 200 neurons, into a mat file, and the time to save them can be up to 3 time the total run time of the simulation. The file is saved at the same rate (about 2-3MB/s) on clusters and on workstations with SSD drives, and it is independent on the number of cores used to do the simulation. Is it normal?

I have seen on GitHub that you planned to implement a new parallel way to save the results. Is it something that will taken a lot of time to finish?
https://github.com/Neurosim-lab/netpyne/issues/291

Best
Stefano

salvadord
Posts: 69
Joined: Tue Aug 18, 2015 3:49 pm

Re: Slow speed to save sim results

Post by salvadord » Tue Apr 24, 2018 12:53 pm

Hi Stefano,

Sorry to hear the saving is taking so long. The independence of num of cores is normal, since data is gathered on the master node and then saved. The similar speed with SSD drives might indicate that what's taking longer could be the internal conversion to Matlab format (prior to saving to file).

Things you can try:
- saving to pkl or json and see if that's faster (cfg.savePickle and cfg.saveJson)
- if you only need the traces, you can reduce the save time by setting cfg.saveDataInclude = ['simData']
- reduce the gather time by setting self.gatherOnlySimData = True
- increase the cfg.recordStep value so less total data (depends on the resolution you need)

I'm hoping to get saving to HDF5 format (faster) and saving in parallel (distributed in each node) implemented soon, but will probably take a few months still.

Hope this helps, let me know if you have other questions.
Thanks
Salva

bremen
Posts: 26
Joined: Mon Apr 24, 2017 8:15 am
Location: Italy

Re: Slow speed to save sim results

Post by bremen » Sat Apr 28, 2018 3:15 pm

Hi Salva.
- if you only need the traces, you can reduce the save time by setting cfg.saveDataInclude = ['simData']
With this option and saveMat, the saving time was reduced over 100 times. From minutes/hours to a few seconds.
It is great.

Thank you

Best
Stefano

Post Reply