Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: on 32/64-bit OS, CPU and Stata


From   James Muller <[email protected]>
To   [email protected]
Subject   st: on 32/64-bit OS, CPU and Stata
Date   Fri, 29 Jul 2005 01:03:09 +1000

Hey,

I just saw this on the freebsd-amd64 mailing list. Someone did a little performance test and got some results they hadn't counted on. The reply seems to settle this issue.

The moral of the post (at bottom) is that taking advantage of 64-bit Stata is justified on grounds of accessing huge amounts of memory, but having the power to access more than can be accessed under 32-bit Stata comes at the cost of speed.

That said, using a 64-bit CPU and OS with 32-bit Stata will be faster than a 64-bit CPU and OS with 64-bit Stata.

As said so often, using a 64-bit CPU and OS will allow you access to lots and lots of memory with any Stata (32-bit or 64-bit), so if you need to access less than 4 Gb of RAM, but need more than say 2 Gb then you should use a 64-bit CPU and 64-bit OS with 32-bit Stata for optimal speed.

This seems unfortunate for those choosing which Stata to purchase with their $1000, since speed is important to everybody, and most of the time nobody actually needs to allocate more than 2Gb or 4Gb, but when you need it, you really need it. The point is that it would be nice to also get a 32-bit version when you purchase the 64-bit version.

The updated binaries for the Stata progam itself are available from the Stata website, for all OS's and both 32-bit and 64-bit on Win and Unix Stata. Depending on legalities, and on how the binaries read the licencing information saved on registration/input of serial number, it may be feasible to use both the 32-bit and 64-bit versions on the same computer, using whichever is most efficient for your purpose.
- StataCorp should comment on this, as there may
be real legal issues with that point.

Another reply to the initial post (the first reply) suggests that when coding it is best to write code to mix use of 8, 16, 32 and 64-bit data for optimal program performance (on a 64-bit platform) - the programmer ("ray") claimed this got his particular program to run _5_ times faster on the same 64-bit machine than exclusively using 64-bit code.

The interesting reply to the post from the FreeBSD list follows. See the thread "Benchmarks: AMD64 vs i386 on Dual 246 Opteron" at http://lists.freebsd.org/pipermail/freebsd-amd64/2005-July/.

Cheers,

James



----------------------------------------------------------


While this sounded like a long shot, I loaded FreeBSD 5.4 i386 on

the machine and after applying the exact same configuration to the
OS, Apache, PHP and MySQL, re-ran the benchmarks. Much to my
surprise, just changing the OS from 64 bit to 32 bit caused the
machine to double in speed. The results are attached in an Excel
spreadsheet [omitted in this forewarding]. So the exact same machine,
running the identical configuration, performed roughly twice as fast when running FreeBSD 5.4 i386 vs FreeBSD 5.4 AMD64. Something about this seems so wrong to me :-)

64-bit code uses up to twice as much CPU cache and twice as many
memory accesses to do the same work as the equivalent 32-bit code.

DES


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index