speed of Neuron under Win vs Linux

The basics of how to develop, test, and use models.
Post Reply
Gannier

speed of Neuron under Win vs Linux

Post by Gannier »

Hi all,

I ran the same model (Mammalian ventricular cell on ModelDB) from Neuron under Windows XP and Linux (Mandriva 2008 spring) on the same computer. I found that under Windows XP Neuron takes 153 seconds to simulate 1hour and 308 seconds under linux. I was very surprised by such a difference.
More, under both OS, the speed wasn't the same at the beginning and at the end. it took about one third of total time for the first half and then the simulation slows down until the end.

someone knows why simulation is slowing over time ? and Is there a solution?
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: speed of Neuron under Win vs Linux

Post by ted »

My experience is that it's faster under Linux than under MSWin. Were you using exactly the same version of NEURON in both cases? Was MSWin configured for "optimum performance," while Linux was configured for "maximum slick desktop effects"? What else was your computer doing while it was executing the simulation? Modern OSes frequently launch background tasks that can affect performance adversely, e.g. among the many possible CPU cycle suckers under Linux there are prelinking, and rebuilding the file database used by locate, to name just two. And MSWin always seems to be tinkering with something or the other on the hard drive.

As for why execution slowed toward the end, did the simulation involve graphs or other stuff that needs screen updates?
Gannier

Re: speed of Neuron under Win vs Linux

Post by Gannier »

I've tested this using Neuron ver. 7 on both OS. three graphs was displayed.
The processor is an Intel DualCore 6420. Under linux, I use KDE without Compiz.
On both system, the minimum services was started and no other apps was launch.

to compare with the latest version 6 of Neuron, I do more tests in different configuration and effectively linux was the speediest for the simulation but lost more of the time displaying data on graph.

Neuron 6.2.3 (2203) Win OS,
without Graph window opened : 22.6 s
with one graph window opened : 40.7 s
with one 1 minimized graph : 25.2 s

Neuron 6.2.3 (2203) Linux OS,
without Graph window opened : 19.3 s
with one graph window opened : 65 s
with one 1 minimized graph : 21.6 s

==========================
Neuron 7.0.1064 (2213) Win OS,
without Graph window opened : 23.4 s
with one graph window opened : 41.7 s
with one 1 minimized graph : 25.8 s

Neuron 7.0 (196) Linux OS,
without Graph window opened : 20.3 s
with one graph window opened : 70 s
with one 1 minimized graph : 23.1 s

In both OS, only when graph is displayed, the simulation took about one third of total time for the first half and then the simulation slows down until the end. So if simulation is long, you can minimized graph's windows to save time especially under linux.
hines
Site Admin
Posts: 1607
Joined: Wed May 18, 2005 3:32 pm

Re: speed of Neuron under Win vs Linux

Post by hines »

What model are you talking about?
Does the v7 computation time (no graphs) improve if invoke
cvode.cache_efficient(1)
before the Init&Run?
Graph plotting can become slower as time increases if the entire graph has to be
redrawn when points are added. This happens when a new point is within the
bounding box of the entire set of old points. There are ways to avoid it but I'd like
to observe the problem on my machine.
Gannier

Re: speed of Neuron under Win vs Linux

Post by Gannier »

I gave the model's name in my first post (Mammalian ventricular cell on ModelDB)
in v7 under Windows, if I use cvode.cache_efficient(1) before init&run I get an error from the solver
oc>cvode.cache_efficient(1)
1
oc>CVode-- Warning: Internal t = 0 and h = 0 are such that t + h = t on the next step.
The solver will continue anyway.
CVode-- At t = 0 and h = 0, the corrector convergence failed repeatedly or with |h| = hmin.
CVode 8844d8 soma advance_tn failed, err=-7.
err=-7
nrniv: variable step integrator error
near line 7
{run()}
^
fadvance( )
advance( )
step( )
continuerun(5600 )
and others
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: speed of Neuron under Win vs Linux

Post by ted »

Gannier wrote:I gave the model's name in my first post (Mammalian ventricular cell on ModelDB)
Model names are somewhat arbitrary and often insufficient for disambiguation. For xample, a search for "mammalian ventricular cell" returns 306 hits, but
+Mammalian +ventricular +cell
returns 4 hits. The accession number is the unambiguous identifier of any ModelDB entry.
Gannier

Re: speed of Neuron under Win vs Linux

Post by Gannier »

ted wrote:The accession number is the unambiguous identifier of any ModelDB entry.
The accession number is 97863
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: speed of Neuron under Win vs Linux

Post by ted »

Somehow this discussion thread was overlooked. Sorry about the inordinate delay in this reply.

I have run some tests with the model in question. Here are my findings and conclusions.

Code: Select all

NEURON 7.0 (281:80827e3cd201) 2009-01-16 was tested under Win 2K SP 4 and Centos 5 Linux on a PC that can be called low end, if not frankly obsolete: a single processor 4 gHz P4 with 2 GB RAM, and NVIDIA GeForce FX 5200 graphics.

It was necessary to increase NIClamp[0].n to 1e9 to ensure that it delivers current pulses throughout even the longest simulations.

Run time was determined under Linux and Win 2K for several values of Tstop under three different conditions:
"Control" -- simulations were executed without changing the GUI in any way.
"mingraphs" -- simulations were executed after minimizing all graphs so that they would not be updated during the runs.
"Quiet" -- simulations were executed after activating "Quiet" in the RunControl panel (can also be done via hoc with the statement stdrun_quiet = 1). This disables updates of all graphs and all numerical fields during a simulation.

In each case, run time was taken to be the value displayed in the "Real time" field of the RunControl panel at the end of a simulation.

CentOS 5 Linux
Tstop   Run Time in seconds
in ms   control   mingraphs   Quiet (stdrun_quiet = 1)
5600    0.12      0.09
5.6e4   1.21      0.88
5.6e5   25        7.9
5.6e6             75          73

Win 2K SP 4
Tstop   Run Time in seconds
in ms   control   mingraphs   Quiet (stdrun_quiet = 1)
5600    0.16      0.13        0.11
5.6e4   1.41      1.13        1.0
5.6e5   23        11.2        10.1
5.6e6             105         96
Conclusions:
For run times on the order of a few seconds, the difference in NEURON's performance under MSWin and Linux was too small to be consequential, regardless of whether screen updates were active or disabled. For long run times, screen updates were the speed limiting factor. No surprise here; this is why people who need to grind out lots of long simulations abandon interactive execution and resort to batch processing.

With screen updates active, simulations that took about half a minute to execute may have run slightly faster under MSWin than under Linux. With screen updates disabled, NEURON consistently ran about 20 - 30% faster under Linux than under Win 2K.
Post Reply