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

Light resource use on new Mac Pro, but heavier resource use on older Mac Pro #25

Open
nfloersch opened this issue Sep 20, 2015 · 3 comments

Comments

@nfloersch
Copy link

My work machine is a 2013 Mac Pro (the tube thing). As stated by the project description, when gatling is running, it really has little CPU impact on that machine. It is great

On my 2008 Mac Pro at home, the CPU is generally stuck no lower than 20% utilization when gatling is running. I am guessing that this might have something to do with higher CPU overhead for older disk controllers? Or other inefficiencies?

The older Mac Pro at home has conventional magnetic disk drives, and the one at work uses SSD storage.

The older Mac Pro at home has less RAM (10gb) compared to the 16gb I have at work.

Aside from the hardware, the software versions are the same... same OS level, same VMWare Fusion, same Vagrant, same Git, etc. I disable antivirus before enabling any of these auto-rsync types of things, so it shouldn't factor in, either. That said, same AV software and version at work and home.

If I understand event coalescing, it is not the same as simply turning down the frequency with which gatling runs... I don't mind it triggering 1 second after a file change is event is raised, but I would be interested in being able to turn down the overall frequency from checking constantly to, say, every 5 seconds or so. I am wondering if it currently just runs too fast for my old home system to keep up with painlessly.

@nfloersch
Copy link
Author

Moreover, now I'm wondering if it is working right...

I just noticed this if I am manually starting the gatling ... so say I up my vagrant, then hit ctrl-c and do something, then start the gatling-rsync-auto again.

==> default: Doing an initial rsync...
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: Watching: /Volumes/Virtua/vagrants/vtag47g

Ok... so it does this "watching" thing. And just sits there using no real CPU time to worry about. Great. Then I change one file in one place. Save. It triggers a new rsync... and another... and another...

==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: 00:11:53: The rsync operation completed in 17772.461 milliseconds.
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: 00:12:16: The rsync operation completed in 17881.274 milliseconds.
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: 00:12:40: The rsync operation completed in 17716.353000000003 milliseconds.
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: 00:13:03: The rsync operation completed in 17868.328 milliseconds.
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: 00:13:27: The rsync operation completed in 17984.73 milliseconds.
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: 00:13:50: The rsync operation completed in 17971.716 milliseconds.
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: 00:14:14: The rsync operation completed in 17883.106 milliseconds.
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: 00:14:37: The rsync operation completed in 17923.645 milliseconds.
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: 00:15:01: The rsync operation completed in 18037.328999999998 milliseconds.
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]
==> default: 00:15:25: The rsync operation completed in 18150.939000000002 milliseconds.
==> default: Rsyncing folder: /Volumes/Virtua/vagrants/vtag47g/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git/", "vtag/app/css/"]

After that first "watching" wait that occurred, I never see it "watch" or wait again. And so I had not really noticed this when it was launching automatically at "up" time. Is it supposed to constantly run the rsync over and over and over even if no file changes have been made?

@ledinhhuy88
Copy link

same problem here

==> app: Doing an initial rsync...
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: Watching: /Users/warren/Documents/dev/webapp
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 07:25:30: The rsync operation completed in 11914.019 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 07:31:04: The rsync operation completed in 10867.479 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 07:31:31: The rsync operation completed in 10972.454000000002 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 07:32:35: The rsync operation completed in 10810.747 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 07:32:52: The rsync operation completed in 10847.154 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 07:33:04: The rsync operation completed in 10952.222000000002 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 07:33:17: The rsync operation completed in 12034.800000000001 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 07:33:29: The rsync operation completed in 10820.224 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 07:33:41: The rsync operation completed in 10895.018 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 07:33:54: The rsync operation completed in 10788.756 milliseconds.

it used to be around 3s or better, under 1s for a while

number of files

vagrant@app:/vagrant$ find -type f | wc -l
7785

@ledinhhuy88
Copy link

this plugin trigger vagrant rsync. rsync process includes creating ssh connection.
in my case, it is because of slow ssh connection.

$ time vagrant ssh -- true

real    0m11.839s
user    0m1.314s
sys 0m0.253s

this idea leads me to https://gist.github.com/jedi4ever/5657094

then

$ time vagrant ssh -- true

real    0m1.841s
user    0m1.327s
sys 0m0.247s

and eventually

==> app: Doing an initial rsync...
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: Watching: /Users/warren/Documents/dev/webapp
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 10:40:34: The rsync operation completed in 353.33799999999997 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 10:40:38: The rsync operation completed in 289.362 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 10:45:37: The rsync operation completed in 377.86199999999997 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 10:52:34: The rsync operation completed in 370.39 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 10:52:36: The rsync operation completed in 325.094 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 10:52:38: The rsync operation completed in 294.699 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 10:52:41: The rsync operation completed in 297.048 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 10:52:43: The rsync operation completed in 303.008 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 10:52:46: The rsync operation completed in 321.113 milliseconds.
==> app: Rsyncing folder: /Users/warren/Documents/dev/webapp/ => /vagrant
==> app:   - Exclude: [".vagrant/", ".git/", "log/", "public/uploads/"]
==> app: 10:52:48: The rsync operation completed in 305.986 milliseconds.

i don't understand why when i delete configuration for dns in my Vagrant file and then reload the machine, ssh connection is still quick. however, this is a different story.

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