问题
I have a Java background, and am new to Ruby on Rails, and have a lot of confusion choosing 32-bit or 64-bit Linux OS for my server.
This is what I know, please correct me if I am wrong:
A 32-bit OS cannot utilize more than 4GB of RAM, but through pae it's possible. In this way, the extra memory is useful even though no single regular application can access it all simultaneously. So I plan to go with a 64-bit Linux OS server.
- Is there a 64-bit Ruby enterprise edition available?
- Is it better to install 32-bit MySQL 5 or 64-bit MySQL 5 in 64-bit Linux OS? I will have 32GB RAM.
- Does running a 32-bit application on 64-bit OS, and considering MySQL 32-bit on a 64-bit OS, have any physical memory (RAM) restrictions? I would like to know any pitfalls or cons of running a 32-bit MySQL on a 64-bit OS.
- Assuming I installed 32-bit MySQL 5 on a 64-bit Linux OS, is it capable of utilizing my RAM efficiently? I am asking this because 32-bit application processes cannot use more than 4GB RAM per process. (Correct me if I am wrong) 32-bit Mysql will run as a single processes (mysqld) for N number of databases. If I have 100 databases, for transactions to 100 DBs, MySQL uses 4GB of RAM due to MySQL's 32-bit limit.
- Assuming I installed 64-bit MySQL 5 on a 64-bit Linux OS, are there any gem incompatibilities between MySQL 64-bit and Ruby on Rails? I would like to know if there is a MySQL 5 64-bit gem available? Note: I am using MySQL adapter not MySQL 2.
- I plan to use Phusion Passenger for my Rails application deployment. I have 100 Rails applications and my questions are:
- Is there a 64-bit Phusion Passenger available. If yes, where can I find it?
- If I am running 100 Rails applications with 32-bit Phusion Passenger in 64-bit OS, will my Phusion utilize my 32-GB RAM efficiently?
- Are 100 Rails applications in Phusion Passenger i100 processes or 100 threads?
- To utilize my hardware efficiently through Ruby on Rails + Nginx-Phusion Passenger + MySQL, what should I need to do regarding 32-bit and 64-bit applications as well as OS?
My application information is:
Ruby - 1.8.7
Rails - 2.3.5
Database - mysql5
Database adapter - MySQL, Note - not mysql2
server - Phussion Passenger + Nginx Module
My dedicated server configuration is:
OS Debian 32-bit or 64-bit (still not decided)
CPU AMD Opteron™ 3280
Quantity Octo-Core
Clock Rate 8x 2.4 GHz (so total 19.2 GHz)
Processor passmark score is 5722 [http://www.cpubenchmark.net/cpu.php?cpu=AMD+Opteron+3280]
Main Memory
Capacity 32 GB RAM
Type DIMM (DDR3)
Hard Disks
Quantity 2
Capacity 2,000 GB (ie) 2 TB + 2 TB
Type SATA II, 7,200 rpm, 8 MB
RAID RAID 1 by software
Mainboard
Chipset AMD 880G
Network Broadcom BCM57780
Any reviews and comments about server configuration and 32-bit/64-bit application/OS architecture are always welcome and I am glad to take it.
回答1:
Is there a 64-bit Ruby enterprise edition available?
- Ruby is free, and there is no enterprise edition or other edition.
Is it better to install 32-bit MySQL 5 or 64-bit MySQL 5 in 64-bit Linux OS? I will have 32GB RAM.
- Use 64bit.
Does running a 32-bit application on 64-bit OS, and considering MySQL 32-bit on a 64-bit OS, have any physical memory (RAM) restrictions? I would like to know any pitfalls or cons of running a 32-bit MySQL on a 64-bit OS.
- There is also a 64-bit version of MySQL available so there is no problem.
Assuming I installed 32-bit MySQL 5 on a 64-bit Linux OS, is it capable of utilizing my RAM efficiently? I am asking this because 32-bit application processes cannot use more than 4GB RAM per process. (Correct me if I am wrong) 32-bit Mysql will run as a single processes (mysqld) for N number of databases. If I have 100 databases, for transactions to 100 DBs, MySQL uses 4GB of RAM due to MySQL's 32-bit limit.
- Use the 64-bit version and you don't even have to think about this.
Assuming I installed 64-bit MySQL 5 on a 64-bit Linux OS, are there any gem incompatibilities between MySQL 64-bit and Ruby on Rails? I would like to know if there is a MySQL 5 64-bit gem available? Note: I am using MySQL adapter not MySQL 2.
- It's not important which version of MySQL you use because the interface is the Unix socket or the TCP/IP socket which doesn't depend on 32 or 64 bit.
I plan to use Phusion Passenger for my Rails application deployment. I have 100 >Rails applications and my questions are:
- Is there a 64-bit Phusion Passenger available. If yes, where can I find it?
- If I am running 100 Rails applications with 32-bit Phusion Passenger in 64 bit OS, will my Phusion utilize my 32-GB RAM efficiently?
- Are 100 Rails applications in Phusion Passenger i100 processes or 100 threads?
- I dont know exactly, but you should also think about using Thin and nginx which is as good an equivalent to Phusion Passenger when it comes to performance.
To utilize my hardware efficiently through Ruby on Rails + Nginx-Phusion Passenger + MySQL, what should I need to do regarding 32-bit and 64-bit applications as well as OS?
- Use 64-bit!
Also I would suggest you to buy a RAID card.
来源:https://stackoverflow.com/questions/11930551/running-ruby-on-rails-phusion-passenger-with-nginxmysql-in-32-bit-or-64-bit-l