Since all current CPU in new servers are able to run in 64 bits mode, and most Linux distribution are also available in 64 bits version, I was wondering why we still continue to install 32 bits operating systems ?
So, I took two Dell Poweredge 1950 with two Intel Pentium 4 Xeon quad-core 2 GHz with 2 Go of Ram and installed the Debian 4.0 (Etch) Linux distribution on both servers. On the first one, the usual i386 version is installed; on the second, the amd64 version.
Do not confuse EM64T with IA-64: IA-64 is the name hof an architecture used (mostly unused now) for Itanium processors, developped by Intel in collaboraion with HP. EM64T is the 64 bit intruction set that you get when you buy a server with an Intel processor. Officialy, it is different from AMD’s. In fact, really not much: apart from subtle differences in instruction sets, and one which implements 3DNow, and the other SSE3, they are almost compatible.
The tests were performed in two areas, where high CPU performance is required: database and SSL requests, and in two forms, a generic benchmark, and a home-made test, which aims to to be more representative of real-life:
- First, Mysql performance, ussing sql-bench (provided by Myql) and secondly, SQL stats requests with a 1 507 500 entries database extracted from a production Mysql Radius log server.
- Next, a SSL performance test, with Openssl built-in speed test, followed by a (quickly) home-made script which made an incremental number of concurrent HTTPS requests on a 14K text file, and measures the time spent.
- sql-bench (only the final result is represented):
This is a 6% increase.
- MySQL stats requests on Radius logs database:
This test was composed of stats requests on a big database with more than 1 500 000 entries (of authentication logs), that may take up to a few hours on production server. On the 64 bit version, the performance gain was between 7 and 9%.
- OpenSSL speed test:
The openssl speed command produces the results which are partially reproduced bellow (and can be fully downloaded here). The following table represents the how many bytes per second can be processed for each algorithm :
|des cbc||16 B||44435.86||35326.76|
|des ebe3||16 B||16987.46||13823.47|
|blowfish cbc||16 B||72394.74||64395.70|
|aes 256 cbc||16 B||60277.60||78290.24|
And the second one, the number of sign and verify cycles per second:
Note that these tests were made using only one core.
In 64 bits, the asymmetric functions (RSA and DSA) perform clearly better. For the symmetric cyphers, there is not much difference, and the 32 bits mode tends to beat 64 bits. It is important to notice that asymmetric algorithm (used in public-key cryptography) are really CPU intensive.
- HTTPS concurrent requests:
For this test, I made a script which made an incremental number of concurrent HTTPS requests (downloading a 14 K text file) and logs the time needed to answer. The TLS/SSL ciphers used was the default one: DHE-RSA-AES256-SHA.
This aims to be a more realistic test and the AMD64 version is always about 15-20% faster, even under high load. We can explain this result by the fact that the key exchange at the beginning of the SSL negotiation uses asymmetric ciphers, so the 64 bits mode outperforms easily the 32 bit mode. The results may have been less contrasted for longer sessions with more data downloaded.
In some case, the AMD64 performs better than the same CPU in 32 bit mode. However, the AMD64 (or IA64) architecture has some limitations: if you intend to use software distributed as binary-only, it must be available for this architecture. If this should not be a big problem for most servers, it might be a problem for a workstation (flash player for example). Moreover, 64 bits numbers requires theoretically more memory, since pointer and long data types uses twice more memory, but this should not have a big impact in practice. And in 64 bits mode, OS can natively access more memory.
To conclude, you should seriously consider installing an AMD64 distribution on your new servers (whatever it is Intel or AMD processors) if they are dedicated to task where CPU performance matters.
Update: This article is quite outdated, and now 64bits can lead to big improvements. For example, search on Splunk 64bits can be be up to ten times faster compared to 32bits according to some Splunk people (I’ve not been able so far to test by myself).