Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

Improve synced folder performance #24

Merged
merged 6 commits into from
Jul 14, 2015
Merged

Conversation

dgerhardt
Copy link
Member

This PR tries to achieve better performance results by replacing
VirtualBox shared folders. Based on the host OS, different technologies
are now used:

  • Linux & MacOS: NFS
  • Windows: SMB

Additionally, the network for the boxes has been changed to avoid
conflicts.

These changes have now been tested on Windows, MacOS and Linux and
consistently result in performance improvements.

dgerhardt added 2 commits June 3, 2015 12:32
Unfortunately, the VirtualBox shared folder driver performs poorly. It
is now replaced based on the host's OS with:
- NFS on MacOS and Linux or
- SMB on Windows.
A class C network (192.168.33.0/24) is now used for the boxes.
@dgerhardt
Copy link
Member Author

Test results

Config

System

Hardware: iMac (2012, 3,4 GHz Intel Core i7)
OS: OS X Yosemite (10.10.3)
VirtualBox: 4.3.22
Vagrant: 1.7.2

VM

Memory: 2048 MiB
CPUs: 2

vboxsf

$ time vagrant up (1st, w/ provisioning)
real 7m10.914s
user 0m3.613s
sys 0m1.386s

$ time ./start.sh (1st, mvn deps have to be downloaded)
real 4m36.901s
user 0m19.237s
sys 0m25.318s

$ time ./start.sh (2nd)
real 3m57.772s
user 0m14.161s
sys 0m32.858s

nfs

$ time vagrant up (1st, w/ provisioning)
real 8m28.420s
user 0m3.661s
sys 0m1.375s

$ time ./start.sh (1st, mvn deps have to be downloaded)
real 3m34.994s
user 0m15.917s
sys 0m4.220s

$ time ./start.sh (2nd)
real 1m9.095s
user 0m12.781s
sys 0m2.956s

$ time ant sencha:build:testing
real 0m12.162s
user 0m13.341s
sys 0m2.408s

Edit: Added VirtualBox and Vagrant versions

@dgerhardt dgerhardt changed the title Improve synced folder performance [WIP] Improve synced folder performance Jun 3, 2015
@commana
Copy link
Member

commana commented Jun 8, 2015

Just for the record, I got similar results (same hardware):

vboxsf

real 8m58.486s
user 0m3.987s
sys 0m1.573s

start.sh 1

real 4m48.473s
user 0m18.301s
sys 0m26.422s

start.sh 2

real 2m12.225s
user 0m17.213s
sys 0m24.246s

nfs

real 11m49.134s
user 2m33.550s
sys 0m28.859s

start.sh 1

real 2m51.059s
user 0m14.733s
sys 0m4.548s

start.sh 2

real 1m6.505s
user 0m15.605s
sys 0m3.964s

@commana
Copy link
Member

commana commented Jun 8, 2015

One problem, however, is that after provisioning the VM, my local user lost ownership of the already existing repositories. The VM works just fine, but I won't be able to develop on the host machine. Any suggestions how we could fix this?

@dgerhardt
Copy link
Member Author

Found the following on SO which is related to this problem but haven't tried any of the suggestions yet:
http://stackoverflow.com/questions/23798498/vagrant-synced-folder-options

@commana
Copy link
Member

commana commented Jun 8, 2015

I found that the real issue was the Git module which forced a specific user onto repos, the default being "root". I made some slight changes to that module to leave the user and group entries blank if the shared folder is of type "nfs".

@commana
Copy link
Member

commana commented Jun 9, 2015

A build using ant sencha:build:testing is finished in 13 seconds using NFS. This is really good! The watch task should be even faster because there is less work to do for an incremental build. However, I noticed that it takes a long time for file change events to propagate to the VM. While I didn't measure the exact time, it takes at least another 15-30 seconds until the build process even starts. Since we have to resort to polling the file system for changes, I don't see how we could speed this up...

@dgerhardt
Copy link
Member Author

Test results

Config

System

Hardware: AMD Phenom II X6 1055T @ 2.8 GHz, DDR3 RAM @ 1.6 GHz, Samsung SSD 840 EVO 250G
OS: Windows 7 (64 bit)
VirtualBox: 4.3.28
Vagrant: 1.7.2

VM

Memory: 2048 MiB
CPUs: 2

vboxsf

[Mingw32] $ time vagrant up (1st, w/ provisioning)
real 6m36.309s
user 0m0.060s
sys 0m0.015s

$ time ./start.sh (1st, mvn deps have to be downloaded)
real 9m46.731s
user 0m32.014s
sys 0m26.906s

$ time ./start.sh (2nd)
real 3m35.745s
user 0m26.510s
sys 0m25.826s

$ time ant sencha:build:testing
real 1m0.074s
user 0m28.978s
sys 0m14.529s

smb

[Mingw32] $ time vagrant up (1st, w/ provisioning)
real 8m23.630s
user 0m0.045s
sys 0m0.077s

$ time ./start.sh (1st, mvn deps have to be downloaded)
real 7m18.715s
user 0m23.249s
sys 0m9.209s

$ time ./start.sh (2nd)
real 1m26s.886s
user 0m20.005s
sys 0m6.776s

$ time ant sencha:build:testing
real 0m20.642s
user 0m18.569s
sys 0m6.760s

time from touch app.js until waiting for changes... while ant sencha:watch:testing is running: ~7s

@commana
Copy link
Member

commana commented Jun 11, 2015

I could not get SMB to work. After some digging I found that SMB requires Windows PowerShell v3 (hashicorp/vagrant#3139 (comment)), but I only had v2 installed. This is missing from the official documentation, so we will need to mention this in our README.

@commana
Copy link
Member

commana commented Jun 12, 2015

Here are my results for SMB (2010 iMac):

  1. vagrant up
    (including full repo download; some provisioning errors occurred due to problems with line endings)
    real 13m13.696s
    user 0m0.030s
    sys 0m0.106s
  2. vagrant up
    (repos already existing; some provisioning errors occurred due to problems with line endings)
    real 10m53.275s
    user 0m0.031s
    sys 0m0.107s
  3. start.sh
    real 5m13.706s
    user 0m25.190s
    sys 0m4.240s
  4. start.sh
    real 1m38.254s
    user 0m21.005s
    sys 0m2.792s
  5. ant sencha:build:testing
    (after mvn clean)
    Total time: 48 seconds
  6. touch app.js while ant sencha:watch:testing is running
    ~4s

@dgerhardt
Copy link
Member Author

Test results

Config

System

Hardware: ThinkPad Edge E530 (Intel i7-3632QM CPU @ 2.2 GHz, RAM @ 1.6 GHz, OCZ Vertex3 120 GB SSD)
OS: (K)Ubuntu Linux 14.10 (64 bit)
VirtualBox: 4.3.18
Vagrant: 1.6.5

VM

Memory: 2048 MiB
CPUs: 2

vboxsf

$ time vagrant up (1st, w/ provisioning)
real 9m48.730s
user 0m6.761s
sys 0m3.425s

$ time ./start.sh (1st, mvn deps have to be downloaded)
real 8m33.192s
user 0m35.670s
sys 0m23.433s

$ time ./start.sh (2nd)
real 4m26.077s
user 0m22.857s
sys 0m29.502s

$ time ant sencha:build:testing (after mvn clean)
real 0m48.798s
user 0m27.338s
sys 0m15.637s

time ant sencha:watch:testing: ~40s

nfs

$ time vagrant up (1st, w/ provisioning)
real 8m21.348s
user 0m5.569s
sys 0m2.917s

$ time ./start.sh (1st, mvn deps have to be downloaded)
real 6m37.310s
user 0m23.493s
sys 0m2.496s

$ time ./start.sh (2nd)
Note: /start.sh: fork: Cannot allocate memory
real 2m51.461s
user 0m19.917s
sys 0m5.816s

$ time ./start.sh (3rd)
real 1m27.896s
user 0m19.053s
sys 0m2.060s

$ time ant sencha:build:testing (after mvn clean)
real 0m14.733s
user 0m18.513s
sys 0m1.804s

time ant sencha:watch:testing: <3s

@commana
Copy link
Member

commana commented Jun 13, 2015

Consistent speed-up across platforms. 👍 Will merge this very soon.

@kqc-real
Copy link
Member

Having merged this PR, please summarize the test results in the README.md.

@commana
Copy link
Member

commana commented Jun 22, 2015

As mentioned in #26, git submodule sync has to be run once since we changed the URL of the Git submodule.

@thomasrehm
Copy link

Performance test results

Config

System

Hardware:

  • Macbook Pro 7.1 (Mid 2010)
  • 2,4 GHz Intel Core 2 Duo
  • 8 GB 1067 MHz DDR3
  • FusionDrive (120 GB SSD + 1 TB HDD)

OS: OS X 10.10.3

VirtualBox: 4.3.20

Vagrant: 1.7.2

VM

Memory: 2048 MiB

CPUs: 2

Performance Tests

Tests with VBOXSF

Please take a look at the following Gist Log of ARSnova Vagrant Performance Tests (old), if you are interested in detail information provided by the system/scripts while running the following commands.

Vagrant up

$ time vagrant up

real    16m12.815s
user    0m16.651s
sys     0m4.738s

Start script

$ time start.sh -v

First run Second run Third run
real 12m0.604s real 7m54.838s real 7m53.043s
user 0m55.383s user 0m53.999s user 0m53.243s
sys 1m36.046s sys 1m29.022s sys 1m30.094s

Sencha build

time ant sencha:build:testing

real    5m50.404s
user    0m51.999s
sys     1m40.494s

ant sencha:watch:testing and make change in app.js

~7s

Tests with NFS

Please take a look at the following Gist Log of ARSnova Vagrant Performance Tests, if you are interested in detail information provided by the system/scripts while running the following commands.

Vagrant up

$ time vagrant up

real    16m41.628s
user    0m17.378s
sys     0m5.653s

Start script

$ time start.sh -v

First run Second run Third run
real 9m15.876s real 4m2.302s real 3m58.245s
user 0m39.982s user 0m41.023s user 0m44.379s
sys 0m20.713s sys 0m21.333s sys 0m18.477s

Sencha build

time ant sencha:build:testing

real    1m34.372s
user    0m47.423s
sys     0m23.133s

ant sencha:watch:testing and make change in app.js

~3s

Comparison of real times

The following table compares the measured times:

-- NFS VBOXSF
vagrant up 16m41.628s 16m12.815s
1. start sh 9m15.876s 12m0.604s
2. start sh 4m2.302s 7m54.838s
3. start sh 3m58.245s 7m53.043s
sencha build 1m34.372s 5m50.404s
sencha watch ~3s ~7s

This change fixes the problem that files are owned by root on the host.
@stefanschmeisser
Copy link

Performance test results

System Config

System

Hardware: Apple iMac (Late 2012) 3,4 GHz Intel Core i7, 8GB RAM
OS: OS X Yosemite (10.10.3)
VM: VirtualBox 4.3.26
Development Environment: Vagrant 1.7.2

Virtual Machine

Memory: 2048
CPU's: 2

vboxsf

$ time vagrant up
real 6m57.100s
user 0m3.848s
sys 0m1.500s

$ time ./start.sh (1st)
real 6m15.523s
user 0m19.625s
sys 0m16.989s

$ time ./start.sh (2nd)
real 2m45.009s
user 0m17.397s
sys 0m21.457s

$ time ./start.sh (3rd)
real 1m59.145s
user 0m18.589s
sys 0m17.969s

nfs

$ time vagrant up
real 7m18.108s
user 0m3.689s
sys 0m1.537s

$ time ./start.sh (1st)
real 7m19.242s
user 0m25.746s
sys 0m19.601s

$ time ./start.sh (2nd)
real 2m5.895s
user 0m19.613s
sys 0m17.177s

$ time ./start.sh (3rd)
real 1m58.230s
user 0m20.513s
sys 0m16.181s

$ time ant sencha:build:testing
real 0m43.404s
user 0m8.033s
sys 0m13.393s

@TjarkWilhelmHoeck
Copy link

Performance test

Hardware

  • Intel i5-3230M @ 2.6 (base, turbo up to 3.2) GHz
  • 8GB DDR3 RAM @ 1600 MHz
  • ADATA Premier Pro SP900 256GB + 1TB HDD

Software

OS: Windows 8.1 (64 bit)
VirtualBox: 4.3.28
Vagrant: 1.7.2

VM

Memory: 2048 MB
CPUs: 2

Test results

vboxsf

[Cygwin] $ time vagrant up (1st run, with provisioning)
real 6m35.062s
user 0m0.030s
sys 0m0.060s

[Cygwin] $ time vagrant up (2nd run, machine already provisioned)
real 0m41.913s
user 0m0.045s
sys 0m0.075s

$ time ./start.sh (1st)
real 4m56.707s
user 0m39.870s
sys 0m22.981s

$ time ./start.sh (2nd)
real 3m13.931s
user 0m30.622s
sys 0m16.737s

$ time ant sencha:build:testing
real 0m42.560s
user 0m22.684s
sys 0m13.757s

smb

[Cygwin] $ time vagrant up (1st run, with provisioning)
real 7m32.372s
user 0m0.045s
sys 0m0.090s

[Cygwin] $ time vagrant up (2nd run, machine already provisioned)
real 0m53.249s
user 0m0.030s
sys 0m0.075s

$ time ./start.sh (1st)
real 4m19.894s
user 0m18.554s
sys 0m07.641s

$ time ./start.sh (2nd)
real 1m01.357s
user 0m11.925s
sys 0m7.254s

$ time ant sencha:build:testing
real 0m09.801s
user 0m12.415s
sys 0m1.276s

@kathastaden
Copy link

Test Results

Configurations

System

Hardware:

  • MacBook Air (13 inch, Mid 2012)
  • 1,8 GHz Intel Core i5
  • 8 GB 1600 MHz DDR3
  • 128 GB Flash-Storage (SSD)

Software:

  • OS: OS X 10.10.3
  • VirtualBox: 4.3.28
  • Vagrant: 1.7.2

VM

  • Memory: 2048 MB
  • CPUs: 2

Tests with NFS

Vagrant Up

$ time vagrant up

real    6m36.944s
user    0m6.707s
sys  0m3.043s

Start Script

First execution

$ time ./start.sh

real    5m33.723s
user    0m29.262s
sys  0m6.616s

Second execution

$ time ./start.sh

real    1m49.372s
user    0m25.934s
sys  0m4.616s

Third execution

$ time ./start.sh

real    1m57.685s
user    0m24.458s
sys  0m4.280s

Sencha Build

$ time ant sencha:build:testing

real    0m46.134s
user    0m34.361s
sys  0m9.786s

Tests with VBOXSF

Vagrant Up

$ time vagrant up

real    12m15.661s
user    0m6.384s
sys  0m3.034s

Start Script

First execution

$ time ./start.sh

real    7m46.904s
user    0m35.954s
sys  0m34.462s

Second execution

$ time ./start.sh

real    3m19.158s
user    0m43.343s
sys  0m21.989s

Third execution

$ time ./start.sh

real    3m59.728s
user    0m34.826s
sys  0m35.506s

Sencha Build

$ time ant sencha:build:testing

real    1m37.245s
user    0m42.121s
sys     0m12.468s

Compare results

NFS VBOXSF
vagrant up 6m36.944s 12m15.661s
1) start.sh 5m33.723s 7m46.904s
2) start.sh 1m49.372s 3m19.158s
3) start.sh 1m57.685s 3m59.728s
build sencha 0m46.134s 1m37.245s

@ghost
Copy link

ghost commented Jun 26, 2015

System

Hardware:

MacBook Pro (Retina, 13-inch, Late 2013)
Intel Core i5 - 2,4 GHz - 2 Cores
2 x 4GB DDR3 - 1600 MHz
APPLE SSD SD0256F - 251 GB

Software

OS: OS X 10.10.3
VirtualBox: 4.3.28
Vagrant: 1.7.2

Test Results

vboxsf

time vagrant up 
real    9m44.881s 
user    0m5.765s 
sys 0m2.588s
time ./start.sh 
real    7m8.719s 
user    0m29.234s 
sys 0m26.586s
$ time ./start.sh (2nd) 
real    4m20.318s 
user    0m31.510s 
sys 0m40.823s

nfs

time vagrant up
real    8m32.833s 
user    0m4.835s 
sys 0m1.975s
time ./start.sh 
real    5m18.157s 
user    0m24.966s 
sys 0m4.492s
time ./start.sh (2nd) 
real    2m53.569s 
user    0m23.965s 
sys 0m5.064s
VBOXSF NFS
vagrant up 9m44.881s 8m32.833s
start.sh 1 7m8.719s 5m18.157s
start.sh 2 4m20.318s 2m53.569s

@M-Fiedler
Copy link

System:

Hardware:

HP EliteBook 8540w
Intel Core i7 M 620 - 2,66 GHz - 2 Cores
2 x 4GB DDR3
1000 GB SSHD (ST1000LM015)

Software:

Windows 7 64bit SP1
VirtualBox: 4.3.28
Vagrant 1.7.2

Test Results:

vboxsf:

(1st with Provisioning) PowerShell: Measure-Command { vagrant up dev | Out-Default }

Days : 0
Hours : 0
Minutes : 15
Seconds : 51
Milliseconds : 563
Ticks : 9515633432
TotalDays : 0,0110134646203704
TotalHours : 0,264323150888889
TotalMinutes : 15,8593890533333
TotalSeconds : 951,5633432
TotalMilliseconds : 951563,3432

(2nd) PowerShell: Measure-Command { vagrant up dev | Out-Default }

Days : 0
Hours : 0
Minutes : 1
Seconds : 28
Milliseconds : 962
Ticks : 889628962
TotalDays : 0,00102966315046296
TotalHours : 0,0247119156111111
TotalMinutes : 1,48271493666667
TotalSeconds : 88,9628962
TotalMilliseconds : 88962,8962

(1st) time ./start.sh

real 16m28.134s
user 0m51.159s
sys 0m25.022s

(2nd) time ./start.sh

real 4m19.327s
user 0m46.639s
sys 0m25.130s

nfs:

(1st with Provisioning) PowerShell: Measure-Command { vagrant up dev | Out-Default }

Days : 0
Hours : 0
Minutes : 18
Seconds : 32
Milliseconds : 206
Ticks : 11122068364
TotalDays : 0,0128727643101852
TotalHours : 0,308946343444444
TotalMinutes : 18,5367806066667
TotalSeconds : 1112,2068364
TotalMilliseconds : 1112206,8364

(2nd) PowerShell: Measure-Command { vagrant up dev | Out-Default }

Days : 0
Hours : 0
Minutes : 1
Seconds : 40
Milliseconds : 498
Ticks : 1004982628
TotalDays : 0,00116317433796296
TotalHours : 0,0279161841111111
TotalMinutes : 1,67497104666667
TotalSeconds : 100,4982628
TotalMilliseconds : 100498,2628

(1st) time ./start.sh

real 15m5.959s
user 0m38.178s
sys 0m4.824s

(2nd) time ./start.sh

real 2m0.595s
user 0m27.738s
sys 0m3.308s

@Max-St
Copy link

Max-St commented Jun 30, 2015

System

Laptop: Acer Aspire VN7-591G
Betriebssystem: Windows 8.1 64 Bit-Version (6.3, Build 9600)
Prozessor: i7-4710HQ CPU 2.5GHz (4CPUs)
Speicher: 8GB DDR3 (1600 MHz)
Festplatte: 128 GB SSD + 1.000 GB HDD (S-ATA, 5400 U/min)
Virtual Box: 4.3.26 r98988
Vagrant: 1.7.2

VM

Memory: 2048 MiB
CPUs: 2

smb

time vagrant up

1:real 8m36.770s
user 0m0.076s
sys 0m0.061s

time ./start.sh

First:

real 3m23.879s
user 0m17.345s
sys 0m3.788s

second:

real 1m31.869s
user 0m13.961s
sys 0m3.184s

vboxsf

time vagrant up

real 11m53.099s
user 0m0.030s
sys 0m0.015s

time ./start.sh

First

real 8m30.994s
user 0m26.382s
sys 0m9.421s

second:

real 2m0.474s
user 0m24.198s
sys 0m8.729s

@dgerhardt dgerhardt changed the title [WIP] Improve synced folder performance Improve synced folder performance Jun 30, 2015
@dgerhardt
Copy link
Member Author

Thank you all for sharing your results. Since there are no reports about problems after these changes, I think this PR is now ready for merging.

@M-Fiedler, @Max-St: I guess you used the "nfs" heading instead of "smb" by mistake? AFAIK NFS is only available for Server editions of Windows and has to be installed explicitly.

@wtfomgroflstfu
Copy link

Config

System

  • Ubuntu 14.04 LTS 64 Bit
  • Intel® Core™ i7-3520M CPU @ 2.90GHz × 4
  • 8 GB DDR3 @ 1600 MHz
  • Crucial MX100 (512 GB SSD)

VM

  • Memory: 2048 MB
  • CPUs: 2

vboxsf

$ time vagrant up
real 22m16.371s
user 0m5.516s
sys 0m2.751s

$ time ./start.sh 1st
real 6m31.966s
user 0m34.290s
sys 0m16.749s

$ time ./start.sh 2nd
real 2m37.360s
user 0m25.770s
sys 0m15.901s

nfs

$ time vagrant up
real 8m50.580s
user 0m5.398s
sys 0m2.473s

$ time ./start.sh 1st
real 3m51.632s
user 0m20.840s
sys 0m5.143s

$ time ./start.sh 2nd
real 1m42.093s
user 0m15.732s
sys 0m4.921s

@commana
Copy link
Member

commana commented Jul 1, 2015

@Max-St, @wtfomgroflstfu, @jemm14: Your results differ from the other results. To better understand potential outliers, could you confirm that you:

  1. destroyed all boxes before timing each vagrant up
  2. either had no repositories for both vagrant up runs so the Git checkout is measured or you already had the repos in place so no checkout is measured
  3. did a mvn clean between first and second run of start.sh

Consistency is key here. Thanks for your help!

@jemm14
Copy link

jemm14 commented Jul 1, 2015

Hardware: Intel® Core™ i5-4210U CPU @ 1.70GHz × 4 , 8G RAM
OS: Ubuntu 14.04 LTS
VirtualBox: 4.3.10
Vagrant: 1.7.2

VM
Memory: 2048 MB
CPUs: 2

Vboxsf
time vagrant up (1st time)
real 7m43.831s
user 0m5.765s
sys 0m2.588s

$time vagrant up (2nd time)
real 0m36.051s
user 0m4.240s
sys 0m2.256s

$time ./start.sh (1st time)
real 8m26.132s
user 0m36.514s
sys 0m19.469s

$time ./start.sh (2nd time)
real 3m48.439s
user 0m30.730s
sys 0m18.937s

Nfs
time vagrant up (1st time)
real 6m32.853s
user 0m4.835s
sys 0m1.975s

$time vagrant up (2bd time)
real 0m37.123s
user 0m4.086s
sys 0m2.301s

$time ./start.sh (1st time)

real 1m39.292s
user 0m22.933s
sys 0m2.424s

$time ./start.sh (2nd time)
real 1m33.368s
user 0m22.545s
sys 0m1.868s

@tflm84
Copy link

tflm84 commented Jul 1, 2015

Config

System

  • Hardware: Dell XPS15 | Intel i5 CPU M560 @ 2.67 GHz, 4GB Hynix DDR3 RAM, Kingston SSDNow V300 480GB
  • OS: Windows 8.1 (64 bit)
  • VirtualBox: 4.3.28
  • Vagrant: 1.7.2

VM

  • Memory: 2048 MiB
  • CPUs: 2

Info

to run vagrant up successfully, i have to use this workaround.

vboxsf

$ time vagrant up (1st)
real 8m40.575s
user 0m0.090s
sys 0m0.181s

$ time ./start.sh (1st)
real 8m50.690s
user 0m44.419s
sys 0m37.566s

$ time ./start.sh (2nd)
real 3m53.153s
user 0m47.871s
sys 0m20.205s

smb

$ time vagrant up (1st)
real 9m33.467s
user 0m0.075s
sys 0m0.165s

$ time ./start.sh (1st)
real 3m51.651s
user 0m31.338s
sys 0m7.404s

$ time ./start.sh (2nd)
real 2m9.393s
user 0m23.869s
sys 0m4.676s

@snape84
Copy link

snape84 commented Jul 1, 2015

Config

System

Hardware 2012, 3,4 GHz Intel Core i7
OS: Windows 8.1
VirtualBox: 4.3.28
Vagrant: 1.7.2, cygwin

VM

Memory: 2048 MiB
CPUs: 2

Vboxsf

$ time vagrant up (1st, with provision)
real 6m31.031s
user: 0m0.040s
sys 0m0.017s

$ time ./start.sh (1st, mvn deps have to be downloaded)
real 5m44.730s
user 0m35.024s
sys 0m23.404s

$ time ./start.sh (2nd)
real 3m17.952s
user 0m32.334s
sys 0m17.622s

$ time ant sencha:build:testing
real 0m43.420s
user 0m21.652s
sys 0m12.764s

SMb

$ time vagrant up (1st run, with provisioning)
real 7m33.250s
user 0m0.074s
sys 0m0.085s

$ time vagrant up (2nd run, machine already provisioned)
real 0m55.354s
user 0m0.042s
sys 0m0.094s

$ time ./start.sh (1st)
real 4m21.492s
user 0m20.427s
sys 0m08.321s

$ time ./start.sh (2nd)
real 1m03.4527s
user 0m12.342s
sys 0m8.345s

$ time ant sencha:build:testing
real 0m10.432s
user 0m13.313s
sys 0m2.342s

@fancyFranci
Copy link

System

Hardware: Lenovo Z50 (2014, 4 x 2.1GHz, 16GB RAM)
OS: Windows 8.1, x64
VirtualBox:4.3.26
Vagrant: 1.7.2

vboxsf

Measure-Command { vagrant up dev | Out-Default } (in PowerShell)
Minutes : 14
Seconds : 18
Milliseconds : 262

./start.sh (1st)
real 11m19.388s
user 0m39.058s
sys 0m55.915s

.start.sh (2nd)
real 5m31.923s
user 0m31.338s
sys 0m49.355s

smb

Measure-Command { vagrant up dev | Out-Default } (in PowerShell)
Minutes : 12
Seconds : 20
Milliseconds : 440

./start.sh (1st)
real 12m59.384s
user 0m38.342s
sys 0m59.608s

./start.sh (2nd)
real 8m2.278s
user 0m28.062s
sys 1m1.952s

@sasschreiber
Copy link

System Specs

Hardware

Acer Aspire V Nitro
Intel Core i7-4170HQ, 2,5-3,5 GHz
8 GB RAM
SSD

VM

1 Core, 2GB RAM via vagrant-faster

Performance Test

vboxsf

time vagrant up (first run)
real 9m 58.031s
user 0m 0.030s
sys 0m 0.061s

time vagrant up --provision
real 3m 10.412s
user 0m 0.030s
sys 0m 0.076s

time ./start.sh (first run)
real 13m21.598s
user 0m23.389s
sys 0m19.561s

time ./start.sh (second run)
real 3m11.747s
user 0m19.961s
sys 0m18.869s

time ant sencha:build:testing (after running mvn clean)
real 0m58.498s
user 0m20.985s
sys 0m15.741s

smb

time vagrant up (first run)
real 9m44.463s
user 0m0.061s
sys 0m0.045s

time vagrant up --provision
real 2m44.899s
user 0m0.015s
sys 0m0.105s

time ./start.sh (first run)
real 10m52.857s
user 0m19.121s
sys 0m3.180s

time ./start.sh (second run)
real 2m8.070s
user 0m15.561s
sys 0m2.340s

time sencha:build:testing (after running mvn clean)
real 0m22.757s
user 0m15.661s
sys 0m1.824s

@wnnz34
Copy link

wnnz34 commented Jul 1, 2015

Performance Test Results

System Config

System

Hardware:

• Sony Vaio
• Intel(R) Core™ i3 – 2370 M CPU@ 2,40 GHz
• RAM: 4

Software:

• Operating System: Windows 7 (64 Bits)
• Vagrant: 1.7.2
• Virtual box: 4.3.26

VM

• Memory: 2048 MB
• CPUs: 2

Test Results

Vboxsf

$time vagrant up
real 15m12.126s
user 0m0.045s
sys 0m0.136s

$ time ./start.sh
real 15m56.841s
user 1m6.108s
sys 0m52.887s

$ time ./start.sh
real 5m38.205s
user 0m52.575s
sys 0m28.234s

$ time ./start.sh
real 4m57.666s
user 0m50.563s
sys 0m27.410s

NFS

$time vagrant up
real 3m52.378s
user 0m0.060s
sys 0m0.107s

$ time ./start.sh
real 5m16.843s
user 0m47.819s
sys 0m32.974s

$ time ./start.sh
real 4m14.211s
user 0m51.063s
sys 0m22.385s

$ time ./start.sh
real 4m34.670s
user 0m50.847s
sys 0m25.902s

$ time ant sencha:build:testing
real 0m20.257s
user 0m0.091s
sys 0m0.138s

@SamiJarmoud
Copy link

Performance test

System

  • Hardware: lenovo ThinkPad T510 Core i5 CPU M 450 @2.40GHz x 4 , 2 x 4GB DDR3
  • OS: Ubuntu 14.04 LTS (64 bit)
  • VirtualBox : 4.3.26
  • Vagrant : 1.7.2

Virtual Machine

  • Memory: 2048
  • CPU's: 2

vboxsf

$ time vagrant up

real  8m15.727s
user  0m5.827s 
sys   0m2.600s

$ time ./start.sh (1st)

real  6m8.342s
user  0m32.379s
sys   0m29.457s

$ time ./start.sh (2nd)

real  4m12.469s
user  0m44.682s
sys   0m48.387s

nfs

$ time vagrant up

real  7m11.122s
user  0m4.679s
sys   0m1.637s

$ time ./start.sh (1st)

real  4m69.345s
user  0m23.866s
sys   0m4.671s

$ time ./start.sh (2nd)

real  2m51.495s
user  0m21.163s
sys   0m5.187s

@Blutengel89
Copy link

Test results

Configuration

System

Hardware

- CPU: Intel Core i7 2600K@3,4Ghz - RAM: 16GB DRR3 - 1600Mhz - Disk: SSD - Samsung 840PRO - 256GB

Software

- Operating System: Windows 8.1 (64-Bit) - Virtualization: VirtualBox 4.3.28 - Virtualization-Software: Vagrant 1.7.2

VM

- CPUs: 2 Cores - RAM: 2048MB

Test with VBOXSF

$time vagrant up (1st)
   real 6m38.411s
   user 0m0.046s
   sys 0m0.019s
$ time ./start.sh (1st)
   real 5m51.814s
   user 0m34.716s
   sys 0m24.147s
$ time ./start.sh (2nd)
   real 3m21.629s
   user 0m33.215s
   sys 0m18.168s

Test with SMB

$time vagrant up (1st)
   real 7m34.098s
   user 0m0.081s
   sys 0m0.103s
$ time ./start.sh (1st)
   real 4m22.616s
   user 0m21.511s
   sys 0m9.007s
$ time ./start.sh (2nd)
   real 1m4.776s
   user 0m13.107s
   sys 0m9.285s

@timhaeuser
Copy link

Hardware

Intel i7-3537U CPU @ 3.0 Ghz
8GB DDR3 RAM @ 1600 MHz
SAMSUNG SSD PM830 512GB
Software

OS: Ubuntu 15.04 (64 bit)
VirtualBox
Vagrant: 1.7.2

VM

Memory: 2048 MB
CPUs: 2

Test results

vboxsf

$ time vagrant up (first run)
real 9m36.516s
user 0m4.552s
sys 0m1.700s

$ time vagrant up (second run)
real 0m38.181s
user 0m4.708s
sys 0m1.664s

$ time ./start.sh (first run)
real 10m45.105s
user 0m30.838s
sys 0m23.557s

$ time ./start.sh (second run)
real 2m52.784s
user 0m25.678s
sys 0m23.957s

$ time ./start.sh (third run)
real 3m7.829s
user 0m29.454s
sys 0m24.594s

NFS

$ time vagrant up (first run)
real 9m12.243s
user 0m5.968s
sys 0m1.848s

$ time vagrant up (second run)
real 0m35.573s
user 0m4.628s
sys 0m1.448s

$ time ./start.sh (first run)
real 9m25.417s
user 0m31.970s
sys 0m18.205s

$ time ./start.sh (second run)
real 2m35.025s
user 0m30.206s
sys 0m15.497s

$ time ./start.sh (third run)
real 2m26.566s
user 0m27.422s
sys 0m15.033s

@CedricTakongmo
Copy link

Config

OS

Windows 7 Home Premium Service Pack 1

Hardware

Hersteller: ACER
Modell: Aspire 5741G
Prozessor: Intel(R) Core™ i5 CPU M430 @ 2.27GHz 2.27GHz
Installierter Arbeitsspeicher 4,00 GB (3,87 GB verwendbar)
Systemtyp: 64-Bit-Betriebssytem

VM

VirtualBox: 4.3.28 r 100309
Vagrant: 1.7.2
Memory: 2048 MiB
CPUs: 2

vboxsf

Time vagrant up (1st, w/ provisioning)

real 16m12.113s
user 0m0.053s
sys 0m0.0786s

Time ./start.sh (1st)

real 15m75.580s
user 0m36.027s
sys 0m26.118s

Time ./start.sh (2nd)

real 08m05.879s
user 0m35.196s
sys 0m20.365s

Time ant sencha:build:testing (1st)

real 0m50.521s
user 0m24.652s
sys 0m12.655s

Time ant sencha:build:testing (2nd)

real 0m30.420s
user 0m23.012s
sys 0m12.026s

SMB

Time vagrant up (1st, w/ provisioning)

real 18m46.118s
user 0m0.059s
sys 0m0.0965s

Time ./start.sh (1st)

real 16m08.720s
user 0m38.459s
sys 0m31.258s

Time ./start.sh (2nd)

real 08m15.925s
user 0m38.452s
sys 0m18.365s

Time ant sencha:build:testing (1st)

real 0m21.505s
user 0m19.024s
sys 0m09.026s

Time ant sencha:build:testing (2nd)

real 0m19.420s
user 0m20.014s
sys 0m09.452s

vboxsf SMB
vagrant up 16m12.113s 18m46.118s
./start.sh (1st) 15m75.580s 16m08.720s
./start.sh (2nd) 4m05.879s 08m15.925s
ant sencha:build:testing (1st) 0m50.521s 0m21.505s
ant sencha:build:testing (2nd) 0m30.420s 0m19.420s

@ghost
Copy link

ghost commented Jul 1, 2015

Test results

Config

System

Hardware: MacBook (2012, 2,3 GHz Intel Core i7)
OS: OS X Yosemite (10.10.3)
VirtualBox: 4.3.22
Vagrant: 1.7.2

VM

Memory: 2048 MiB
CPUs: 2

vboxsf

$ time vagrant up (1st)

real 8m7.748s
user 0m4.721s
sys 0m1.964s

$ time ./start.sh (1st)

real 4m49.527s
user 0m33.354s
sys 0m18.561s

$ time ./start.sh (2nd)

real 2m29.268s
user 0m28.746s
sys 0m19.581s

nfs

$ time vagrant up (1st)

real 9m44.278s
user 2m3.914s
sys 0m1.625s

$ time ./start.sh (1nd)

real 1m14.645s
user 0m15.824s
sys 0m3.714s

$ time ./start.sh (2nd)

real 1m02.641s
user 0m9.525s
sys 0m1.691s

dgerhardt added a commit that referenced this pull request Jul 14, 2015
Improve synced folder performance

This PR tries to achieve better performance results by replacing
VirtualBox shared folders. Based on the host OS, different technologies
are now used:
* Linux & MacOS: NFS
* Windows: SMB

Additionally, the network for the boxes has been changed to avoid
conflicts.

These changes have now been tested on Windows, MacOS and Linux and
consistently result in performance improvements.
@dgerhardt dgerhardt merged commit 526086f into master Jul 14, 2015
@commana
Copy link
Member

commana commented Jul 14, 2015

Thank you all for reporting your results! Here is a summary that will find its way into our README:

vboxsf (n = 23) vagrant up start.sh (1) start.sh (2) ant
Arithmetic Mean 640.668 534.591 237.64 93.94
Median 576.516 506.132 215.745 54.51
nfs (n = 12) vagrant up start.sh (1) start.sh (2) ant
Arithmetic Mean 546.624 309.224 128.568 42.161
Median 510.627 313.751 117.634 43.404
smb (n = 12) vagrant up start.sh (1) start.sh (2) ant
Arithmetic Mean 628.574 466.31 173.089 21.913
Median 545.12 315.275 109.425 20.642

All values are seconds.

Reduction in % vagrant up start.sh (1) start.sh (2) ant
nfs 14.68 42.16 45.9 55.12
smb 1.89 12.77 27.16 76.67

Reduction percentages are based on the arithmetic mean.

Please note that "vagrant up" and "start.sh (1)" are biased by download speed. "start.sh (2)" and "ant" are more accurate, but they are also biased by the available hardware. However, since we have a wide range of different machines and bandwidths, these biases may cancel out.

@dgerhardt dgerhardt deleted the synced-folder-performance branch July 14, 2015 12:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.