我想使用 RAM 而不是 SSD。我正在寻找有经验的人给我一些关于这方面的建议。我想挂载一个分区并将我的 Rails 应用程序放入其中。
有任何想法吗?
UPD:我测试了 SSD 和 RAM。我有一个 OSX,配备 4x4Gb Kingston @ 1333 RAM、Intel Core i3 @ 2,8 Ghz、OCZ Vertex3 @ 120Gb、HDD Seagate ST3000DM001 @ 3Tb。我的操作系统安装在 SSD 和 ruby 上,宝石放在 SSD 的主文件夹中。我在 sqlite 中创建具有 10.000 个产品项的新 Rails 应用程序,并使用代码创建控制器:
@products = Product.all
Rails.cache.clear
用AB测试过。
固态硬盘
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
硬盘
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 上的 ruby 中的东西并慢慢获取此脚本,我将在真实服务器上进行测试,并将所有 ruby 脚本放入具有更复杂代码或实际应用程序的 RAM 中。
ps:对不起我的英语:)