SSDの代わりにRAMを使用したい。これについてアドバイスをくれる経験者を探しています。パーティションをマウントして、そこに Rails アプリを配置したいと考えています。
何か案は?
UPD: SSD と RAM をテストしました。4x4Gb Kingston @ 1333 RAM、Intel Core i3 @ 2,8 Ghz、OCZ Vertex3 @ 120Gb、HDD Seagate ST3000DM001 @ 3Tb を搭載した OSX を使用しています。私のOSはSSDにインストールされ、ルビーはSSDのホームフォルダーに配置されています。sqlite で 10.000 個の製品項目を持つ新しい Rails アプリを作成し、コードでコントローラーを作成します。
@products = Product.all
Rails.cache.clear
ABでテストしました。
SSD
Document Length: 719 bytes
Concurrency Level: 4
Time taken for tests: 39.274 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 130600 bytes
HTML transferred: 71900 bytes
Requests per second: 2546.21
Transfer rate: 3325.35 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 0 0
Processing: 398 1546 1627
Total: 398 1546 1627
羊
Document Length: 719 bytes
Concurrency Level: 4
Time taken for tests: 39.272 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 130600 bytes
HTML transferred: 71900 bytes
Requests per second: 2546.33
Transfer rate: 3325.51 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 0 0
Processing: 366 1546 1645
Total: 366 1546 1645
HDD
Document Length: 719 bytes
Concurrency Level: 4
Time taken for tests: 40.510 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 130600 bytes
HTML transferred: 71900 bytes
Requests per second: 2468.54
Transfer rate: 3223.92 kb/s received
Connnection Times (ms)
min avg max
Connect: 0 0 0
Processing: 1193 1596 2400
Total: 1193 1596 2400
ですから、SSD に配置された gem を含む ruby のことを考えて、このスクリプトをゆっくりと取得します。実際のサーバーでテストし、より複雑なコードまたは実際のアプリケーションを使用してすべての ruby スクリプトを RAM に配置します。
ps: 私の英語でごめんなさい :)