{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/14790","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/14790/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/14790/comments","events_url":"https://api.github.com/repos/golang/go/issues/14790/events","html_url":"https://github.com/golang/go/issues/14790","id":140340284,"number":14790,"title":"runtime: Go 1.6 regresses Windows performance due to timeBeginPeriod removal","user":{"login":"jstarks","id":9548354,"avatar_url":"https://avatars.githubusercontent.com/u/9548354?v=3","gravatar_id":"","url":"https://api.github.com/users/jstarks","html_url":"https://github.com/jstarks","followers_url":"https://api.github.com/users/jstarks/followers","following_url":"https://api.github.com/users/jstarks/following{/other_user}","gists_url":"https://api.github.com/users/jstarks/gists{/gist_id}","starred_url":"https://api.github.com/users/jstarks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstarks/subscriptions","organizations_url":"https://api.github.com/users/jstarks/orgs","repos_url":"https://api.github.com/users/jstarks/repos","events_url":"https://api.github.com/users/jstarks/events{/privacy}","received_events_url":"https://api.github.com/users/jstarks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/OS-Windows","name":"OS-Windows","color":"ededed"},{"url":"https://api.github.com/repos/golang/go/labels/Performance","name":"Performance","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/31","html_url":"https://github.com/golang/go/milestones/Go1.7","labels_url":"https://api.github.com/repos/golang/go/milestones/31/labels","id":1414133,"number":31,"title":"Go1.7","description":"","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":258,"closed_issues":117,"state":"open","created_at":"2015-11-16T16:57:07Z","updated_at":"2016-03-16T03:18:23Z","due_on":"2016-07-31T07:00:00Z","closed_at":null},"comments":14,"created_at":"2016-03-12T03:04:10Z","updated_at":"2016-03-16T06:48:39Z","closed_at":null,"body":"1. What version of Go are you using (`go version`)?\r\ngo version go1.6 windows/amd64\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\nset GOARCH=amd64\r\nset GOBIN=\r\nset GOEXE=.exe\r\nset GOHOSTARCH=amd64\r\nset GOHOSTOS=windows\r\nset GOOS=windows\r\nset GOPATH=\r\nset GORACE=\r\nset GOROOT=C:\\Go\r\nset GOTOOLDIR=C:\\Go\\pkg\\tool\\windows_amd64\r\nset GO15VENDOREXPERIMENT=1\r\nset CC=gcc\r\nset GOGCCFLAGS=-m64 -mthreads -fmessage-length=0\r\nset CXX=g++\r\nset CGO_ENABLED=1\r\n\r\n3. What did you do?\r\nRun a benchmark from my go-winio package, which uses completion ports to provide non-thread-blocking IO on top of named pipes. It regressed significantly between go 1.5.3 and go 1.6, but only when I don't call timeBeginPeriod(1000). It seems that some aspect of the go scheduler still depends on a fast timer.\r\n\r\n You can see this with:\r\n\r\n        go get github.com/Microsoft/go-winio\r\n        cd <wherever>; git checkout go_16_regression_test\r\n        go test -bench .\r\n        set gofasttick=1\r\n        go test -bench .\r\n\r\n4. What did you expect to see?\r\nSame performance before and after setting gofasttick=1 (which makes go-winio call timeBeginPeriod(1000) before doing any IO).\r\n\r\n5. What did you see instead?\r\n\r\n        Z:\\jostarks\\go\\src\\github.com\\Microsoft\\go-winio>go test -bench .\r\n        PASS\r\n        BenchmarkPipeIo-8           2000            998036 ns/op\r\n        ok      _/Z_/jostarks/go/src/github.com/Microsoft/go-winio      2.304s\r\n\r\n        Z:\\jostarks\\go\\src\\github.com\\Microsoft\\go-winio>set gofasttick=1\r\n\r\n        Z:\\jostarks\\go\\src\\github.com\\Microsoft\\go-winio>go test -bench .\r\n        PASS\r\n        BenchmarkPipeIo-8           3000            517709 ns/op\r\n        ok      _/Z_/jostarks/go/src/github.com/Microsoft/go-winio      1.797s\r\n\r\nI can try to get a more minimal repro if it would be helpful. This has regressed Docker client performance significantly in Windows when operating over named pipes."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/197182980","html_url":"https://github.com/golang/go/issues/14790#issuecomment-197182980","issue_url":"https://api.github.com/repos/golang/go/issues/14790","id":197182980,"user":{"login":"dvyukov","id":1095328,"avatar_url":"https://avatars.githubusercontent.com/u/1095328?v=3","gravatar_id":"","url":"https://api.github.com/users/dvyukov","html_url":"https://github.com/dvyukov","followers_url":"https://api.github.com/users/dvyukov/followers","following_url":"https://api.github.com/users/dvyukov/following{/other_user}","gists_url":"https://api.github.com/users/dvyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/dvyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvyukov/subscriptions","organizations_url":"https://api.github.com/users/dvyukov/orgs","repos_url":"https://api.github.com/users/dvyukov/repos","events_url":"https://api.github.com/users/dvyukov/events{/privacy}","received_events_url":"https://api.github.com/users/dvyukov/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T06:48:39Z","updated_at":"2016-03-16T06:48:39Z","body":"> Why do you think this is? How can I find out?\r\n\r\nWhat's the value of GOMAXPROCS? If it is 1, try to set it to 4."}}