Added options -o and -r to save/read a list of files to use#43
Open
EtienneBruines wants to merge 1 commit intohoytech:masterfrom
Open
Added options -o and -r to save/read a list of files to use#43EtienneBruines wants to merge 1 commit intohoytech:masterfrom
EtienneBruines wants to merge 1 commit intohoytech:masterfrom
Conversation
Owner
|
Thanks! Yes, this has been something we've been thinking about for a while...
I'm not opposed to adding similar functionality to vmtouch, but vmprobe is much more advanced than vmtouch in this department:
|
Owner
|
We landed a similar patch here: #49 Of course I'll be mentioning you in the changes file for design help. We still need to get to your "-o" functionality, but we're half way there I suppose. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not sure if you want this, but since I wanted it, I thought I'd share it. (If you don't want to merge, I completely understand; I'll personally be using my fork in that case)
Use case:
You want to preload a certain program, let's say the Intellij IDEA located in
/opt/idea. Let's say this is a huge directory, and you only want to preload the part of the program which it requires to start the program. To reduce the time needed to start it.First you make sure none of it is in memory. Then you start the Intellij IDEA. Now you run
vmtouch -o /opt/idea > ~/idea_preload.txt.Now if you were to preload it (perhaps on boot), then you could simply do
vmtouch -l -r ~/idea_preload.txt /opt/ideaand you're good to go.Caveats:
Using
-ris slower than not using-r, because we're linearly going through every single entry in the list. Some kind of parsing-tree might be faster, but doing that in C sounds like a nightmare.I'm also using filenames instead of resident_pages; so it'll preload more than it should, but less than it otherwise would if you loaded the entire directory.
Anyway, it's here if you want it.