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

unreasonable about of disk writes #1964

Open
silles79 opened this issue Dec 23, 2022 · 2 comments
Open

unreasonable about of disk writes #1964

silles79 opened this issue Dec 23, 2022 · 2 comments
Labels
discussion Any label or pull request that contains a relevant discussion.

Comments

@silles79
Copy link

Every time I open a project in vcode, which was previously fully compiled,
i'm getting a very high amount of disk writes:
image

PID: 33049 is Bloop server...

metals log
2022.12.23 13:55:48 INFO time: Connected to build server in 0.61s
2022.12.23 13:55:48 INFO Connected to Build server: Bloop v1.5.6
2022.12.23 13:55:48 INFO time: Imported build in 0.31s
2022.12.23 13:55:57 INFO time: indexed workspace in 8.29s

No recompile happens, but still a lot of disk writes

ok it's a very big project:
du -hs .bloop/
3.7G .bloop/

but why does it have to rewrite 1G?

@tgodzik
Copy link
Contributor

tgodzik commented Dec 23, 2022

Thanks for reporting! This is because for each client of Bloop artifacts are copied to a separate directory for that client only, so when Metals in VS Code connects to Bloop it gets a new directory. I am not sure if that is needed really, but that was the architecture choice made a while ago.

We can start a conversation here whether this separate directory is really needed and if it actually causes more issues than it solves.

@tgodzik tgodzik added the discussion Any label or pull request that contains a relevant discussion. label Dec 23, 2022
@silles79
Copy link
Author

silles79 commented Dec 23, 2022

looks like every bloop-internal-classes folder is copied into bloop-bsp-clients-classes and on exit it's cleared out.

I noticed it while investigating why my brand new SSD already has +400GB written to it.
Data Units Written: 844,391 [432 GB
ouch

as a workaround I linked all bloop-internal-classes folders to a ramdisk:

export RAMDISK=~/ramdisk/bloop-cache for d in 'find . -type d -name bloop-bsp-clients-classes'; do echo mkdir -p $RAMDISK/$d echo rm -rf $d echo ln -s $RAMDISK/$d $d done

@silles79 silles79 changed the title unreasable about of disk writes unreasonable about of disk writes Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Any label or pull request that contains a relevant discussion.
Projects
None yet
Development

No branches or pull requests

2 participants