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

A lot of temp files are created but not deleted #140

Open
cdhermann opened this issue Jan 2, 2025 · 2 comments · May be fixed by #141
Open

A lot of temp files are created but not deleted #140

cdhermann opened this issue Jan 2, 2025 · 2 comments · May be fixed by #141

Comments

@cdhermann
Copy link

cdhermann commented Jan 2, 2025

When running the model a lot of temp files with a file size of 8 MB are created but never deleted. They aren't deleted while the program using the model is running. They aren't deleted after the program terminates.

E.g.

-rw-r--r--   1 usr usr 8.0M Jan  2 03:54 ffeca7a8-bfbe-41c7-a05f-82a1d42dfec4-L0C2.page
-rw-r--r--   1 usr usr 8.0M Jan  2 03:54 ffeca7a8-bfbe-41c7-a05f-82a1d42dfec4-L0C3.page
-rw-r--r--   1 usr usr 8.0M Jan  2 03:54 ffeca7a8-bfbe-41c7-a05f-82a1d42dfec4-L0C4.page
-rw-r--r--   1 usr usr 8.0M Jan  2 03:54 ffeca7a8-bfbe-41c7-a05f-82a1d42dfec4-L0C5.page
-rw-r--r--   1 usr usr 8.0M Jan  2 03:54 ffeca7a8-bfbe-41c7-a05f-82a1d42dfec4-L0C6.page
-rw-r--r--   1 usr usr 8.0M Jan  2 03:54 ffeca7a8-bfbe-41c7-a05f-82a1d42dfec4-L0C7.page
-rw-r--r--   1 usr usr 8.0M Jan  2 03:54 ffeca7a8-bfbe-41c7-a05f-82a1d42dfec4-L0C8.page
-rw-r--r--   1 usr usr 8.0M Jan  2 03:54 ffeca7a8-bfbe-41c7-a05f-82a1d42dfec4-L0C9.page

OS: Linux XXX 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 GNU/Linux
Java: OpenJDK21U-jdk_x64_linux_hotspot_21.0.5_11.tar.gz from https://adoptium.net/de/temurin/releases/?os=linux&arch=x64&package=jdk
Jlama version: 0.8.3

The model is run as shown in the README without langchain4j and without the builder pattern.

The temp files flood the disk until no disk space is available anymore.

What are these temp files for? When can they be deleted safely?

@cdhermann
Copy link
Author

The filename pattern is
/tmp/<some number>/<session ID>-L<line counter>C<column counter>.page
where

  • <some number> is a number I can't relate to anything in the code
  • <session ID> is the UUID generated in Generator.Response r = m.generate(UUID.randomUUID(), ctx, 0.0f, 256, (s, f) -> {});
  • <line counter> seems to indicate a line or row in a matrix
  • <column counter> seems to indicate a column in a matrix

@cdhermann
Copy link
Author

As soon as a lot of short lived sessions are created, the process accumulates a lot of entries like the following one, when checking the open files with lsof

java    2963654 usr  DEL    REG                9,3             73928345 /tmp/5699401751264898995/5623006e-9c62-46ac-842f-26d12bf9c0ee-L0C16.page

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

Successfully merging a pull request may close this issue.

1 participant