Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

High CPU when using file watchers and volumes

オープン
#279 コメント 4 件 リアクション 7 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
docker, macos, node.js, typescript

調査の方向性

yarnWatch.sh、node:12.16.1-alpine イメージ、および提供された Docker コマンドの /proj ボリュームマウントを使用して、報告されたセットアップを再現します。パフォーマンス上の問題がないと報告されているカスタムイメージと、アイドル時およびリロード時の CPU 使用率を比較し、ボリューム構成が低速化の原因になっているかどうかを判断して、結果を記録します。

索引モデルが issue の本文から書いたものです。

説明

My project (A small, ~8 endpoint express app) uses typescript compiler file watching (tsc --watch) and nodemon for local development.

The combination of these two processes running outside of docker, on MacOS, uses approximately 5% of one CPU core when idle, 25% cpu of one core when compiling/reloading, and finishes in approximately 2 seconds.

We've been experimenting with developing inside of Docker, as an alternative to using Node Version Manager and juggling multiple projects with different node versions.

Here is the example script we have been running:

yarnWatch.sh


#!/bin/sh

tsc --watch
nodemon app.js
docker run \
  --volume $(pwd):/proj \
  --workdir /proj \
  --rm \
  --publish 3030:3030 \
  --detach \
  node:12.16.1-alpine scripts/yarnWatch.sh

When running in this way, the hyperkit process idles at 200% CPU (my guess is 100% of two cores), uses 500%cpu when compiling/relaoding, and finishes in 20 seconds.

My hypothesis is this is some sort of bottleneck regarding volumes, as running the app in a custom built image has no performance problems.

主要言語
C
スター
3.7k
フォーク
335
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

moby/hyperkit のほかの issue

moby/hyperkit の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。