[Numpy-discussion] tofile speed

Charles R Harris charlesr.harris@gmail....
Wed Jul 25 09:58:22 CDT 2007


On 7/25/07, Lars Friedrich <lfriedri@imtek.de> wrote:
>
> Hello,
>
> I tried the following:
>
>
> ####### start code
>
> a = N.random.rand(1000000)
>
> myFile = file('test.bin', 'wb')
>
> for i in range(100):
>         a.tofile(myFile)
>
> myFile.close()
>
> ####### end code
>
>
> And this gives roughly 50 MB/s on my office-machine but only 6.5 MB/s on
> the machine that I was reporting about.
>
> Both computers use Python 2.4.3 with enthought 1.0.0 and numpy 1.0.1
>
> So I think I will go and check the harddisk-drivers. array.tofile does
> not seem to be the problem and actually seems to be very fast. Any other
> recommendations?


You might check what disk controllers the disks are using. I got an almost
x10 speedup moving some disks from a DELL PCI CERC board to the onboard SATA
and using software raid.  Sometimes DMA isn't enabled, but that is pretty
rare these days.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070725/6432feb1/attachment.html 


More information about the Numpy-discussion mailing list