LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 11-17-2009, 02:00 AM   #1
snjksh
Member
 
Registered: Jan 2008
Location: Pune, India
Distribution: RHEL
Posts: 34

Rep: Reputation: 0
32 or 64 bit


Hi All,

How to know the bit(32/64) of the following.

a)Hardware
b)Linux os
c)Application

Regards,
snj
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 11-17-2009, 02:17 AM   #2
michaaa62
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Rep: Reputation: 0
Hi suma5550,
for a)
Code:
grep flags /proc/cpuinfo
Look for lm, like long mode
for b)
Code:
uname -a
will output the kernel version

greetz Micha
 
Old 11-17-2009, 03:06 AM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
a)

Code:
cat /proc/cpuinfo
You should look up the cpu family and model to be sure what processor you have and what features it supports.

b)

Code:
uname -m
c)
Code:
file executable_name
 
Old 07-27-2013, 10:42 AM   #4
snjksh
Member
 
Registered: Jan 2008
Location: Pune, India
Distribution: RHEL
Posts: 34

Original Poster
Rep: Reputation: 0
Thanks buddy.
 
Old 07-30-2013, 12:26 PM   #5
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 10.2, 13.37
Posts: 215

Rep: Reputation: 45
A 64 bit CPU does not have to run a 64 bit operating system.
I have a 64 bit Athlon, but run it in 32 bit mode with 32 bit Linux. Unless you exceed the memory capability of 32 bit pointers, there are few reasons (besides scientific code) that require 64 bit execution. You would know if you have one of those reasons.
Running 64 bit mode requires 50% to 100% more memory because of the larger pointers and default integers. 64 bit execution is marginally faster for programs with large numbers (because can use single instruction), but can be slower for normal programs because it uses twice the memory bandwidth than 32bit to fetch data (the usual bottleneck, and the upper half of most 64 bit integers is all 0's).

Last edited by selfprogrammed; 07-30-2013 at 12:31 PM.
 
Old 07-30-2013, 01:05 PM   #6
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
Quote:
Originally Posted by selfprogrammed View Post
Running 64 bit mode requires 50% to 100% more memory because of the larger pointers and default integers.
This is NOT true. I have tested it and it uses 20-30% more RAM:
http://www.linuxquestions.org/questi...6/#post4907851

You clearly have never used a 64-bit system.

There are also very good reasons to use a 64-bit system in terms of RAM support (PAE is a hack) and performance even for the layman.

64-bit programs are rarely slower than 32-bit ones, and it is usually due to bad coding, or not up-to-date coding.

By default, integers are 4 bytes even of 64-bit systems.

See benchmarks:
http://www.phoronix.com/scan.php?pag...204_3264&num=1
 
2 members found this post helpful.
Old 07-30-2013, 03:06 PM   #7
johnsfine
Senior Member
 
Registered: Dec 2007
Distribution: Centos
Posts: 4,969

Rep: Reputation: 1074Reputation: 1074Reputation: 1074Reputation: 1074Reputation: 1074Reputation: 1074Reputation: 1074Reputation: 1074
Quote:
Originally Posted by selfprogrammed View Post
Running 64 bit mode requires 50% to 100% more memory because of the larger pointers and default integers
Pointers are twice as big in 64-bit mode, but default integers are still 32-bit in 64-bit mode. The size of floating point numbers is also not affected by 32 vs 64 bit architecture.

Very few programs have pointers as such a large fraction of their data that they could take even 50%, much less 100% more memory.
Some programs have pointers as a much larger fraction of their memory accesses than of their memory use. On early or cheap 64-bit CPUs with low L2 cache size, such programs might run around 20% slower in 64-bit mode because of the increased L2 cache misses. For many such programs, that problem goes away on CPUs with larger L2 cache.

Quote:
64 bit execution is marginally faster for programs with large numbers (because can use single instruction),
Programs getting a significant performance boost from that difference are so rare, they are statistically nonexistent.

The big boost from 64-bit mode happens because 64-bit has twice as many registers. GCC is especially bad (compared to other compilers) at dealing with the register shortage in 32-bit x86 architecture. Most Linux users use almost exclusively code compiled by gcc, so that magnifies the advantage of 64-bit.
Also, 32-bit compilers typically emit code using x86 legacy floating point, even though most 32-bit CPUs have newer floating point. 64-bit CPUs all have newer floating point, so the compilers all use it.

1) Most programs are limited by factors other than CPU speed, so no speed difference between 32-bit and 64-bit mode.

2) Few programs use pointers so heavily that on a CPU with small L2 cache, 32-bit mode will run significantly faster.

3) For the remainder, 64 bit is generally faster and may be significantly faster, especially for operations like transcoding video or audio.

Last edited by johnsfine; 07-30-2013 at 03:12 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are 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
64-bit or 32-bit Application on 64-bit Linux jjana123 Linux - General 4 05-06-2008 05:27 PM
Triple Boot Suse 10.3 32 bit, suse alpha 11.0 64 bit and Windows XP (32 Bit) 1kyle Suse/Novell 1 02-28-2008 10:25 AM
no KDE in Kubuntu 6.10 64-bit(ATI X800 GTO 256 bit DDr3) exul182 Linux - Hardware 2 01-04-2007 02:47 PM
32 bit or 64 bit install - is 32 bit easier for a newbie? dms05 Linux - Newbie 3 05-19-2006 03:05 PM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration