LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-13-2008, 03:21 PM   #1
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Rep: Reputation: 31
Differences in performance for 32-bit and 64-bit software


Hi

Im setting up some servers and those servers are running a 64-bit version of a linux distribution. Im for example going to run the application server "resin" and the program jmagic. The servers will probably receive very many queries from clients, so this wont be a light traffic server.

What im wondering is how much difference it will make to install a 32-bit version of "resin" instead of a 64-bit and the same question goes about jmagic.

Thanks for all help, its appericiated.
 
Old 03-13-2008, 03:48 PM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
32-bit vs 64-bit has really nothing to do with performance. Sure, its possible the 64-bit might be faster, but only in a few special cases. You should not expect to see that much of a performance difference (unless those programs happen to do a lot of special math).
 
Old 03-13-2008, 04:59 PM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Usually, the 32-bit version is slightly faster than the 64-bit, but there are also cases of the opposite. One reason to use 64-bit might be that you have more than 4 GB RAM, even tho there are ways around this as well.
 
Old 03-13-2008, 05:20 PM   #4
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
While there is little if any discernible difference in the apparent quickness of 64 and 32 bit systems, that will soon change. Already, in Debian at least, 64-bit development is beginning to run ahead of 32-bit since most of the developers are using 64-bit systems. Within a year or two 32-bit applications will begin to fall by the wayside as the move to 64-bit gains critical mass.

I don't intend to do any more "from scratch" installations during that time unless it's on a new machine. Every installation I do now is 64-bit because it's the OS of the near future, and I lose nothing by going there now.
 
Old 03-13-2008, 06:32 PM   #5
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Databases are one type of application that tends to run faster on a 64 bit system as are multimedia processing applications and other highly CPU intensive ones. For the rest, it doesn't really make any difference at this time. But as suggested above, if you have or are going to have more than 3GB of RAM (not 4) , getting it to work with a 32 bit OS takes extra effort so you may as well choose 64 bit.
 
Old 03-14-2008, 02:52 AM   #6
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
Thanks for replying.

Could you please explain why the developers have choosen to move over to 64-bit systems if there isnt any notable advantages of doing so? And, it seems like pretty much everyone wants to run 64-bit software these days which confuses me a little since i dont see any more advantages with using 64-bit instead of 32-bit (I thought there was a performance loss when using 32-bit applications on a 64-bit system, but i was wrong here?)

Some of the servers have 2GB of RAM and some other servers have as much as 16GB. When you say that there will be problems when using a 32-bit version of the OS when having more than 4GB of RAM installed, do you then mean that 32-bit versions of the OS doesnt support larger memory support than 4GB?

Also, if you install a 32-bit version of a linux distribution and the server has over 4GB of memory, what kind of problems can this cause?


Quote:
Originally Posted by rickh View Post
While there is little if any discernible difference in the apparent quickness of 64 and 32 bit systems, that will soon change. Already, in Debian at least, 64-bit development is beginning to run ahead of 32-bit since most of the developers are using 64-bit systems. Within a year or two 32-bit applications will begin to fall by the wayside as the move to 64-bit gains critical mass.

I don't intend to do any more "from scratch" installations during that time unless it's on a new machine. Every installation I do now is 64-bit because it's the OS of the near future, and I lose nothing by going there now.

Last edited by exceed1; 03-14-2008 at 05:07 AM.
 
Old 03-14-2008, 05:11 AM   #7
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
I think you might be wrong here. 32-bit vs. 64-bit does have to do with performace, but not only with performance. I have talked to some of the unix staff and they say that as long as the applications has been written to take advantage of 64-bit, then it can and will be an increase in performance.


Quote:
Originally Posted by SciYro View Post
32-bit vs 64-bit has really nothing to do with performance. Sure, its possible the 64-bit might be faster, but only in a few special cases. You should not expect to see that much of a performance difference (unless those programs happen to do a lot of special math).
 
Old 03-14-2008, 05:40 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you install a compiled 32 bit binary, it may have been compiled for the 386 architecture.

A 64 bit application will also be able to use >2 GB of ram. for some applications this may make a difference. I imagine that a version written for a 64 bit processor may be more likely written to take advantage of other things like multithreading on multi-core processors.

Unless a program uses plugins that don't have 64 bit versions, I don't see any reason to install a 32 bit program on a 64 bit machine.
 
Old 03-14-2008, 06:35 AM   #9
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by exceed1 View Post
When you say that there will be problems when using a 32-bit version of the OS when having more than 4GB of RAM installed, do you then mean that 32-bit versions of the OS doesnt support larger memory support than 4GB?
The PAE feature of the CPU is needed to use more than 4Gb of physical address space with a 32 bit kernel. A full 4Gb of RAM requires more than 4Gb of physical address space because the BIOS and/or chipset map other things into the first 4Gb of physical address space. Some systems fit as little as three and an eighth Gb of RAM in the first 4Gb physical.

I have read vague posts about some things not working with PAE. Certainly it presents an extra layer of complication on the boundary between the kernel and any DMA device driver. I don't know if PAE is really incompatible with anything or really reduces any performance. The posts I've seen have little if any detail. The Linux servers used by my employer include 32 bit PAE kernels with up to 8Gb of ram. No one there has mentioned any PAE specific problem.

There are a bunch of reasons why a 64 bit application should be faster than 32 bit and a bunch of reasons why a 64 bit application should be slower than 32 bit. But I haven't seen any benchmarks fairly comparing them. There just seems to be anecdotal evidence saying performance is pretty much the same.

The 32 bit PAE kernel should be a little slower than the 32 bit non PAE kernel, but not by enough to be worth using non PAE 32 bit if that costs some of your total ram. Again, I haven't seen any measurements of the difference.

Running 32 bit applications on a 64 bit kernel gives you a little more virtual memory than the same applications on a 32 bit kernel. At work, I use programs where that makes a significant difference. Most Linux users don't ever use such applications. Assuming you don't need that extra virtual memory, the difference between a 32 and 64 bit kernel when running a 32 bit application should be pretty subtle. Again, I haven't heard of anyone measuring it.

Last edited by johnsfine; 03-14-2008 at 06:37 AM.
 
Old 03-14-2008, 11:34 AM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I'd like to see some benchmarks, I'll look around for some, but if anyone already has found some good ones, please post a link.
 
Old 03-14-2008, 04:50 PM   #11
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Back in the day when Computer Shopper in the UK had a dedicated Linux column they did do some benchmarking when AMD first had its 64 bit arch available.

From what I remember, in none of the combinations that they tested was there a dramatic difference one way or the other, and some of the combinations were out and out puzzling. However, what you can say is:

i) It depends

ii) If you need the extra memory space, then you probably have no choice

iii) If you are going to run proprietary apps which are not available in 64 bit form, there is a case for not bothering with 64 bit, except if ii) above applies

iv) If you were just changing to 64 bit and didn't need the extra addressing range, a legitimate expectation would be that this would slow down applications slightly

v) iv) above doesn't really apply... At least with the AMD implementation, at the same time as extending the instruction set to 64 bits they also did some minor clean up of the instruction set, which did result in some minor speed-ups (and then there are the streaming/multi-media extensions...in general 32 bit programs will be compiled for a lowest common denominator 32 bit CPU (so, with a relatively low numbered version of streaming extension) and the 64 bit code will be compiled for a low level of streaming extension for a 64 bit processor which will be a lot more competent
(although the streaming stuff doesn't have much impact on general purpose code but in the special cases in which they are significant, they are very significant)

vi) and then the Intel implementations probably have some differences to the AMD ones which may or may not be significant. Certainly, historically, the Intel compiler has been better at shoving out code specifically optimised for the requirements/preferences of its newer CPUs than gcc has. (Although, usually, as most stuff is optimised for the 'lowest common denominator' processor, this may well be of zero significance. Or not.)

Did I say it depends?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
64 bit cpu-64 bit Ubuntu-are there 32 bit app issues? sofasurfer Ubuntu 7 04-09-2014 02:02 PM
How to install 32-bit software in 64-bit system jshih Linux - Kernel 5 04-14-2007 12:26 PM
LXer: Ubuntu: 32-bit v. 64-bit Performance LXer Syndicated Linux News 0 12-30-2006 06:03 AM
64 bit vs. 32 bit Performance CelticBlues Linux - General 4 03-10-2006 10:29 PM
Using 32 bit software on 64 bit Kantonix rahish Linux - Newbie 1 02-24-2006 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration