Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: 32 or 64 for web server and mysql
Date: Fri, 20 Jul 2007 18:11:07
Message-Id: pan.2007.07.20.18.08.43@cox.net
In Reply to: [gentoo-amd64] 32 or 64 for web server and mysql by "P.V.Anthony"
1 "P.V.Anthony" <pvantony@×××××××××××.sg> posted
2 46A0B6C6.5000803@×××××××××××.sg, excerpted below, on Fri, 20 Jul 2007
3 21:21:10 +0800:
4
5 > I going to built a 1U server which will have the following.
6 >
7 > 1. Apache 2
8 > 2. Lighttpd
9 > 3. qmail
10 > 4. vpopmail
11 > 5. mysql
12 > 6. postgres
13 > 7. ruby
14 > 8. php
15 > 9. perl
16 > 10. tinydns
17 > 11. pureftpd
18 > 12. high availblity tools for fail over
19 >
20 > The question is which way to go 64bit or 32bit? Which more stable? Which
21 > is better?
22 >
23 > The reason for this questions is that there are some information on the
24 > net that says that there is no much difference between them. Is that
25 > true? Thought that 64bit is always better.
26
27 Generically, 64-bit can at times be worse, because some things (integers,
28 memory addresses, etc) take 64-bits rather than 32, meaning bigger
29 binaries on disk, more memory used, more bandwidth necessary between disk
30 and memory and memory and CPU, larger cache required for the same effect,
31 etc. Thus, on many archs other than x86, it's quite common to have the
32 kernel as 64-bit to allow addressing larger memory and etc, but run a 32-
33 bit userland -- basically everything but the kernel.
34
35 On x86, it's a bit different. 32-bit x86 was always severely register
36 constrained, among other things, and one of the improvements AMD made
37 with the 64-bit extensions was that the spec required more registers. As
38 someone else already posted, this is often a big win on x86_64 as
39 compared to x86 (32), especially when apps are optimized to efficiently
40 use all those extra registers. The difference the extra registers make
41 is generally way more than the cost associated with the larger integers,
42 so on x86, 64-bit is generally better than 32-bit, even with the
43 additional expense of the larger integers and as a result binaries and
44 etc.
45
46 There are additional considerations, however. The biggest one is whether
47 you'll be running any closed source software. Often, that's not
48 available for 64-bit, or is available but with less testing and support.
49 Of course, if it's Oracle or the like, they should support 64-bit no
50 problem.
51
52 On a server, most of the typical 32-bit only binary-only stuff isn't an
53 issue, and if you ARE running any binary-only stuff, it's far more likely
54 to have native Linux 64-bit binaries available and well supported (xref
55 Oracle as already mentioned). Be sure to look before you jump, however.
56
57 If you are going to be running 100% FLOSS on your server, as with the
58 desktop, things lean rather more 64-bit.
59
60 How much memory are you going to be running? If >3 gig, you almost
61 certainly want 64-bit if you can, as 32-bit gets rather more inefficient
62 at addressing >4 gig.
63
64 Also what sort of CPUs are you running? True AMD64 or Intel em64t? True
65 AMD64 CPUs tend to be better at 64-bit than Intel, which still optimizes
66 for 32-bit even on their em64t stuff. If you are running true AMD64 and
67 there's no closed-source-ware preventing it, 64-bit will almost certainly
68 be your better choice. If you are running em64t, you just might be
69 better on 32-bit, depending on your exact app and load profile.
70
71 Finally... 64-bit /can/ be more secure from a hardware perspective.
72 There's certain features built into the 64-bit extensions that improve
73 resistance to buffer overflows and the like, or more precisely, compiling
74 a hardened profile, as you may be doing on a server, doesn't cause the
75 performance penalty on amd64 (generically, so em64t also) that it does on
76 x86. If you are going to be using a hardened profile, I'd strongly
77 recommend going 64-bit for that reason.
78
79 --
80 Duncan - List replies preferred. No HTML msgs.
81 "Every nonfree program has a lord, a master --
82 and if you use the program, he is your master." Richard Stallman
83
84 --
85 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] Re: 32 or 64 for web server and mysql "P.V.Anthony" <pvantony@×××××××××××.sg>