在构建服务器上使用 ramdisk 是否明智? [英] Is it sensible to use a ramdisk on a build server?
问题描述
在我的公司,我们目前正在研究加快 CI 构建速度的各种策略.我们已经分析了我们的构建,并确定我们受到 I/O 瓶颈的限制.在不久的将来(约 1-2 个月),我们有很多选择来解决这个问题,但我们真的希望看到改进现在.
At my company we are currently researching various strategies for speeding up our CI builds. We have profiled our builds and determined that we are constrained by an I/O bottleneck. We have quite a few options to deal with that in the near future (~1-2 months) but would really like to see an improvement now.
我建议使用 ramdisk 作为检出和构建文件的位置.构建输出和日志当然会存储在物理磁盘上.
I proposed using a ramdisk as the checkout and buildfile location. The build outputs and logs would of course be stored on physical disk.
这是一个明智的做法,还是这种方法存在重大缺陷?我不是在寻找有关硬件方面的答案,而是在寻找常见构建系统(例如 MSBuild)和 ramdisk 之间的交互是否会导致任何问题以及我需要注意的其他风险.
Is that a sensible thing to do or are there significant drawbacks to this approach? I am not looking for answers that regard the hardware side of things but rather than if the interaction between common build systems (e.g. MSBuild) and a ramdisk will cause any issues and if there are other risks I need to be aware of.
推荐答案
只要你有足够的内存,这是一件非常明智的事情.
As long as you have enough memory, it's a very sensible thing to do.
唯一真正的缺点自然是,您的构建在关机/电源故障时会丢失,这通常不是 CI 构建的大问题.
The only real drawback is, naturally, your build gets lost on shutdown/power failure which usually isn't a big concern for the CI builds.
这篇关于在构建服务器上使用 ramdisk 是否明智?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!