Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

メモリがもりもりしておる #3437

Closed
SanMurakami opened this issue Nov 29, 2018 · 6 comments
Closed

メモリがもりもりしておる #3437

SanMurakami opened this issue Nov 29, 2018 · 6 comments

Comments

@SanMurakami
Copy link
Contributor

SanMurakami commented Nov 29, 2018

image
image


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@tamaina

This comment has been minimized.

@SanMurakami

This comment has been minimized.

@acid-chicken
Copy link
Member

もう一度調べたけど、node.jsのインスペクタでMisskeyのプロセスを見ると、メモリを120MB使ってると表示されるのに、Linuxのtopコマンドでプロセスのメモリ使用率を見ると1.2GBってなってる

(ガベコレ発動させても、1.2GBから変化しない)
https://github.com/syuilo/misskey/issues/1913#issuecomment-407774998

@mei23
Copy link
Contributor

mei23 commented Nov 30, 2018

実際のメモリ状態と表示が違う

たぶんそれぞれメモリのカウント方法が違うせいです。
Misskey のUsedは、Activeというものをカウントしていますが
freeコマンドの出力には直接対応する値がないと思います。

@khws4v1
Copy link
Contributor

khws4v1 commented Dec 7, 2018

これもしかしたらsysteminformationパッケージの問題かもしれません。
Misskeyのコードはこうなっていています。
https://github.com/syuilo/misskey/blob/5e0f5c31e72fc5e6af1a96b46052cfb57508d436/src/daemons/server-stats.ts#L57-L66
activeにはbuffers/cacheは含まれない(=ファイルページは含まれない)とあるのですが、なぜか含まれてしまっているようです。
https://www.npmjs.com/package/systeminformation

試しに以下のコマンドでファイルページを開放してみたところ、Misskeyから見えるメモリ使用量が大幅に減りました。
# echo 1 > /proc/sys/vm/drop_caches

@SanMurakami
Copy link
Contributor Author

これもうFixでいいと思う

nokotaro pushed a commit to nokotaro/misskey that referenced this issue Mar 25, 2022
Bumps [@types/websocket](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/websocket) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/websocket)

---
updated-dependencies:
- dependency-name: "@types/websocket"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants