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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Another reason why Docker containers may be slow

196 点作者 pacavaca大约 7 年前

10 条评论

mratzloff大约 7 年前
One time we observed a dramatic drop-off in performance from one of our services after a certain day that week. I looked at recent releases and saw it perfectly coincided with one.<p>I asked the engineer in question to investigate, but after looking he said, &quot;It&#x27;s nothing I could be doing.&quot;<p>So I sat with him and used git-bisect to prove to him it was his commit: he had added trace logging within a couple of tight loops in the hottest parts of the code base. I smiled.<p>&quot;But it&#x27;s trace. That&#x27;s disabled in production. It can&#x27;t be that,&quot; he said. But we had already proven it was that commit, and the only thing that changed was additional logging.<p>Long story short, the logging library was filtering calls by level just before actually writing, rather than as close as possible to the call site—a design bug, for sure.<p>I had him swap out the library everywhere it was being used.<p>Moral: logging is not free.
评论 #16772485 未加载
评论 #16772639 未加载
lurker9大约 7 年前
I don&#x27;t understand why more people don&#x27;t use Solaris Zones, they seem to me to be the superior solution by far, and with work done by Joyent you now have modern LX-branded zones also. Is the lack of adoption mainly due to the fact that it&#x27;s Solaris, and not Linux?<p>(Solaris lives on in Illumos et al)
评论 #16769513 未加载
评论 #16770505 未加载
评论 #16769558 未加载
评论 #16770275 未加载
评论 #16770999 未加载
评论 #16771219 未加载
评论 #16769750 未加载
dstroot大约 7 年前
Better title: “nother reason why my code is slow and I’m logging too much”
评论 #16770237 未加载
评论 #16770106 未加载
rmrfrmrf大约 7 年前
Isn&#x27;t this kind of thing part of the reason why you log to stdout instead of handling disk writes in your app?
评论 #16769922 未加载
vivex大约 7 年前
<a href="https:&#x2F;&#x2F;sysdig.com&#x2F;blog&#x2F;container-isolation-gone-wrong&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sysdig.com&#x2F;blog&#x2F;container-isolation-gone-wrong&#x2F;</a>
jwildeboer大约 7 年前
TL;DR logging using glog uncovered a bottleneck which was fixed upstream 9 months ago. Maybe keep your dependencies up2date? :)
评论 #16771490 未加载
abpavel大约 7 年前
&quot;Due to a kernel bug...&quot; made me question the whole article right there
jaequery大约 7 年前
on osx, i know for a fact Docker for OSX is pretty darn slow due to its way they handle filesystem.<p>but using Dinghy greatly helped sped everything up due to it using nfs. just in case anyone wanted to know.
评论 #16769702 未加载
评论 #16770052 未加载
评论 #16772085 未加载
评论 #16770027 未加载
评论 #16769757 未加载
评论 #16769713 未加载
dingo_bat大约 7 年前
Nice debugging story but the conclusion was totally wrong! The author even knows this. If they would be logging 3-4x the usual rate they would have seen the same problem on bare metal too. Nothing to do with docker or competing containers or whatever.
评论 #16771084 未加载
jorisvh大约 7 年前
This is not the original title. The original title is &quot;Another reason why <i>your</i> Docker containers may be slow&quot;.
评论 #16773343 未加载
评论 #16778825 未加载
评论 #16777003 未加载
评论 #16772545 未加载