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

Improve performance of in-container commands with many write on disks #3

Merged
merged 2 commits into from
Jul 6, 2020

Conversation

toricls
Copy link
Owner

@toricls toricls commented Jul 3, 2020

This PR improves container disk performance for the npx create-react-app command and fixes #2 by using in-container storage instead of mounted storage.

As excerpted from the updated README.md as follows, this PR includes a bash script to preserve files from remote container to user's host directory.


NOTE: You will find the boyaki directory in your remote container during the workshop (so as in the VSCode's explorer) but NOT in your host machine. This is a side-effect of the fix PR #3 (for the issue #2) to speed up the npx create-react-app command, thus you may lose your boyaki files once you stop the remote container. If you need to preserve and/or edit the files inside the boyaki folder outside of your remote container, you can use the bash script copy-boyaki-to-host.sh to copy those in-container files as a zip file boyaki.zip to your host machine's boyaki directory. Simply execute /workspaces/hostdir/copy-boyaki-to-host.sh /hostdir/copy-boyaki-to-host.sh inside your remote container and follow the guidance to run it.

To improving container disk performance for the `npx create-react-app` command, as pointed out at #2
@toricls toricls force-pushed the use-container-storage-instead-of-mounted-storage branch from a40a48a to 2f7abe5 Compare July 3, 2020 14:30
@toricls toricls changed the title Use in-container storage instead of mounted storage Improve container disk performance Jul 4, 2020
@jaga810
Copy link
Collaborator

jaga810 commented Jul 6, 2020

LTGM. Awesome work!
However it seems a bit confusing which to use workspaces or workspaces/hostdir.

I'd like to suggest to add below sentence at Usage section in READEME.md

  • Your working directory is workspaces not workspaces/hostdir by default.

@toricls
Copy link
Owner Author

toricls commented Jul 6, 2020

@jaga810 Thanks! That's a good point!

The only reason to mount the host directory was to make it available to copy the workshop output by a script execution within the working container, and there is no reason to keep the mount directory visible for users.

I'm thinking to change the directory structure as follows but can I have your thoughts on this? Is this still confusing for users?

/ <- container's root
...
├── hostdir <- The mounted host directory (moved out of 'workspaces')
...
└── workspaces <- Visible for users as their workspace as default, and will includes 'boyaki' folder during the workshop 

@jaga810
Copy link
Collaborator

jaga810 commented Jul 6, 2020

@toricls It seems less confusing! I love the suggested change of directory structure.

@toricls toricls changed the title Improve container disk performance Improve performance of in-container commands with many write on disks Jul 6, 2020
By moving mounted 'hostdir' directory out of 'workspace' directory
@toricls toricls merged commit f88beaa into master Jul 6, 2020
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 this pull request may close these issues.

npx create-react-app takes too much time.
2 participants