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

Mechanism logic update for managing files #838

Open
renhiyama opened this issue May 31, 2024 · 2 comments
Open

Mechanism logic update for managing files #838

renhiyama opened this issue May 31, 2024 · 2 comments

Comments

@renhiyama
Copy link
Contributor

Considering most files transpiled and stuff are essentially very small files, and large in numbers, it's not uncommon for esm.sh server to hit its inode limit.
I've researched online, and found out that a better way to manage this type of scenario is to use a database system to save multiple file data all together at once and lower the overhead problem and inodes limitations too.
I'm currently on a vacation, and just saw the notification about inodes issue back in town, so if @ije can't make an fs driver or something to fix this, I'll look into it myself when I get back.

Setting up a database could introduce more ram usage I think, but will fix the inodes issue for real this time.

@ije
Copy link
Member

ije commented May 31, 2024

currently the server uses pnpm to install packages, that takes most inodes of the fs, how it works with a DB?

@renhiyama
Copy link
Contributor Author

The inodes problem, as far as I'm aware - is occuring due to large number of files in the server. We javascript devs have a tendency to provide large number of small sized js files, and all these ends up on your esm server, hitting the inodes limit.
With database based file management system, we can stop hitting inodes limit by creating a virtual filesystem by saving all those files together in a single file - that's how database servers generally save their data.
While yes, it would generate high memory usage, but we can allot swapfile for the time if issues occur, or use some database engine that focuses on using less ram and higher disk calls?

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

2 participants