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

Avoid writing .log file to disk when possible #57

Open
SukkaW opened this issue Jan 14, 2024 · 1 comment
Open

Avoid writing .log file to disk when possible #57

SukkaW opened this issue Jan 14, 2024 · 1 comment

Comments

@SukkaW
Copy link

SukkaW commented Jan 14, 2024

I noticed that the agent consistently collects server status data, compresses and encodes it, and stores it in the hetrixtools_agent.log file:

echo "j=$jsoncomp" > "$ScriptPath"/hetrixtools_agent.log

This process signifies that the agent writes several hundred kilobytes of data to the disk every minute, potentially diminishing SSD lifespan.

Would it be possible to simply save the data within a shell variable and directly send the request using that variable (i.e., store all information in memory)? This could enhance performance and extend disk lifespan.

@SukkaW
Copy link
Author

SukkaW commented Jan 14, 2024

Do notice that we can use the /run directory (newer Linux) or /var/run (older Linux) directly. /run or /var/run is the tmpfs (in RAM), not in disk.

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

1 participant