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

show cache location when warmup --check. #5534

Closed
zhoucheng361 opened this issue Jan 9, 2025 · 4 comments · Fixed by #5559
Closed

show cache location when warmup --check. #5534

zhoucheng361 opened this issue Jan 9, 2025 · 4 comments · Fixed by #5559
Assignees
Labels
kind/feature New feature or request

Comments

@zhoucheng361
Copy link
Contributor

What would you like to be added:
show the cache location and size when we warmup with --check.

Why is this needed:
to check the location and size when needed.

@zhoucheng361 zhoucheng361 added the kind/feature New feature or request label Jan 9, 2025
@anysql
Copy link
Contributor

anysql commented Jan 10, 2025

The warmup check was performed in background thread, not done by client. So it's easy to print log but a little complex to send it back to client.

Need to some time to implement it.

@anysql
Copy link
Contributor

anysql commented Jan 10, 2025

Can you show me an example output?

@anysql anysql self-assigned this Jan 10, 2025
@zhoucheng361
Copy link
Contributor Author

zhoucheng361 commented Jan 10, 2025

something like this:

Checking: 1                            3.3/s
Checking: 1.0 GiB (1073741824 Bytes)   3.3 GiB/s
+------------------------------------------------+---------+------------+
|                    Location                    |   Size  | Percentage |
+------------------------------------------------+---------+------------+
| LOCAL:/tmp/jfsCache0/test-volume/              | 204 MiB |      19.9% |
| LOCAL:/tmp/jfsCache1/test-volume/              | 160 MiB |      15.6% |
| REMOTE:172.20.0.100:/var/jfsCache/test-volume/ | 348 MiB |      34.0% |
| REMOTE:172.20.0.101:/var/jfsCache/test-volume/ | 312 MiB |      30.5% |
+------------------------------------------------+---------+------------+
2025/01/11 05:28:20.790563 juicefs[225695] <INFO>: 1.0 GiB of 1.0 GiB (100.0%) are cached [warmup.go:337]

@anysql
Copy link
Contributor

anysql commented Jan 16, 2025

#5559

sample output:

check cache file: 1 3.3/s
check cache size: 1.4 MiB (1515800 Bytes) 4.8 MiB/s
Location=/Users/loufangxin/.juicefs/cache/4b2e001e-afab-4b92-b05c-38019de6c105/, size=1.4m, pct=100.0%
2025/01/16 08:25:05.859064 juicefs[14213] : check cache: 1 files checked, 1.4 MiB of 1.4 MiB (100.0%) cached [[email protected]:306]

The output is not well formatted as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants