# Storage service speed testing (Windows and OS X)

**URL:** <https://forum.odrive.com/t/storage-service-speed-testing-windows-and-os-x/305>\
**Category:** General\
**Created:** [March 3, 2016, 7:53pm UTC](https://forum.odrive.com/t/storage-service-speed-testing-windows-and-os-x/305 "2016-03-03T19:53:40Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Tony](https://forum.odrive.com/user_avatar/forum.odrive.com/tony/32/19_2.png) [@Tony](https://forum.odrive.com/u/Tony)\
**Post date:** [March 3, 2016, 7:53pm UTC](https://forum.odrive.com/t/storage-service-speed-testing-windows-and-os-x/305/1 "2016-03-03T19:53:40Z")

</div>

I’ve been doing a little bit of testing across the various services for upload speed and reliability. I thought some folks might be interested in testing, themselves.

Here are basic “upload speed testers” for both Windows and MacOS. These aren’t perfect or supremely accurate, but they should give you a general idea of your own performance for a specific source and allow you to compare across different sources.

To use them:

1. Open a command prompt or terminal
2. Change the directory to the source you want to test (ex: odrive\Dropbox).
3. Copy and paste the appropriate single-line command below
4. Adjust the test file size by changing the `sizeinmb` value. _Low sizes are not going to be very accurate because of the “looseness” in some areas of these tests._
5. Adjust the number of files by changing the `numfiles` value.
6. Hit enter

Windows:  
`powershell -command "& {$sizeinmb = 10;$numfiles = 10;$randstr = ([char[]]([char]'a'..[char]'z') + 0..9 | sort {get-random})[0..5] -join '';$tmpdir = \"$pwd\~tmpuploadtest_$randstr\";$tmpdirstart = \"$pwd\tmpuploadtest_$randstr\";mkdir -Force $tmpdir > $null;$filebasename = \"$($sizeinmb)MB.file\";$sizeinbytes = $sizeinmb * 1024 * 1024;for($i = 1; $i -le $numfiles; $i++){$thefile = \"$tmpdir\$filebasename\" + $i;fsutil file createnew $thefile $sizeinbytes > $null;};Start-Sleep -m 8000;ren $tmpdir $tmpdirstart;echo \"\",\"Waiting for odrive\";$locked = 0;while($locked -ne 1) { $files = Get-ChildItem $tmpdirstart; for ($i=0; $i -lt $files.Count; $i++) { try { [IO.File]::OpenWrite($files[$i].FullName).close(); } catch { $locked = 1; }} Start-Sleep -m 50};echo \"Starting upload ....\";$starttime = [int64](([datetime]::UtcNow)-(get-date \"1/1/1970\")).TotalSeconds;Start-Sleep -m 5000;while($locked -ne 0) { $locked = 0; $files = Get-ChildItem $tmpdirstart; for ($i=0; $i -lt $files.Count; $i++) { try { [IO.File]::OpenWrite($files[$i].FullName).close(); } catch { $locked = 1; }} echo "uploading..."; Start-Sleep -m 1500};$endtime = [int64](([datetime]::UtcNow)-(get-date \"1/1/1970\")).TotalSeconds;$totaltime = $endtime - $starttime; $mbpersec = $sizeinmb * $numfiles / $totaltime; $mins = $totaltime / 60;echo \"$mins minutes\";echo \"$($mbpersec) MB/sec\";rm -Force -Recurse $tmpdirstart;}"`

MacOS:  
`sizeinmb=10; numfiles=10; randstr=$(openssl rand -hex 3); tmpdir="$(pwd)/._tmpuploadtest_$randstr"; tmpdirstart="$(pwd)/tmpuploadtest_$randstr"; echo ""; mkdir "$tmpdir"; filebasename=$sizeinmb"MB.file"; sizeinbytes=$(($sizeinmb * 1024 * 1024));for (( i=1; i<=$numfiles; i++)) do thefile="$tmpdir/$filebasename$i"; < /dev/zero head -c $sizeinbytes > "$thefile"; done; echo "Waiting for odrive"; mv "$tmpdir" "$tmpdirstart"; while [[-z $(lsof -nPl -c odrive | grep "$tmpdirstart")]]; do sleep .05; done; starttime=$(date +%s); echo "Starting upload ...."; while [[-n $(lsof -nPl -c odrive | grep "$tmpdirstart")]]; do sleep .05; done; endtime=$(date +%s); totaltime=$(($endtime - $starttime)); mbpersec=$(awk "BEGIN {printf \"%.2f\",${sizeinmb}*${numfiles}/${totaltime}}"); mins=$(awk "BEGIN {printf \"%.2f\",${totaltime}/60}"); echo "$mins minutes"; echo "$mbpersec MB/sec"; rm -r "$tmpdirstart";`

---

_[View the full topic](https://forum.odrive.com/t/storage-service-speed-testing-windows-and-os-x/305)._
