TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is occasional 100ms disk latency normal in shared hosting?

3 点作者 littlethrowaway超过 3 年前
Hi HN,<p>We have a small site we&#x27;re hosting on Linode. It&#x27;s a single app box, and a single db box. Thanks to datadog I noticed some occasional (random) slow requests. Digging into it revealed it was slow responses from the (MySQL) database eventually working out that it correlated <i>exactly</i> with disk latency spikes.<p>I then ran `iostat` in a loop to catch the slowdowns when it happened, and I can see `w_await` times of up to 2seconds at times!!. After contacting support they moved a few of our noisiest neighbours away which has reduced the issue a lot.<p>My question is: Is this just <i>normal</i> in cloud&#x2F;shared infrastructure? Would moving to AWS (or similar) help <i>at all</i>? Maybe I should just forget about a handful (10-30) slow requests per week which are impacted by this (we have maybe 800K requests served by the app server a week, so it&#x27;s a tiny percentage). I just find it annoying that for some people they get 5-10second requests when it ought to be 200-300ms.<p>Any insights most welcome!

3 条评论

toast0超过 3 年前
Higher than normal disk latency is going to happen ocassionally, regardless of your hosting environment.<p>Dedicated hardware helps, and over provisioned ram helps, but sometimes disks (including ssds) are off doing something else when it comes to servicing your requests and it takes more time.
pornel超过 3 年前
Yes, I&#x27;ve seen such slowdowns too with a different provider. In my case the local disk was used for a cache, so I&#x27;ve just added a 50ms timeouts on disk access and treat them as a cache miss.
PaulHoule超过 3 年前
Going to AWS is going from the frying pan to the fire.<p>The best you can do to get latency down is spend a lot more money on RAM and pray.