FAQ
Hi all,

   About a year ago there was some work done on lock contention profiling (see
here <https://codereview.appspot.com/6443115/>). Did this get to a usable
state, and if yes, how can I use it? The pprof tool has a few options
related to contention, but I've yet to figure out how I can invoke them.

Thanks,
   Peter

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Dmitry Vyukov at Aug 1, 2013 at 3:11 pm

    On Thu, Aug 1, 2013 at 6:58 PM, Péter Szilágyi wrote:
    Hi all,

    About a year ago there was some work done on lock contention profiling
    (see here). Did this get to a usable state, and if yes, how can I use it?
    The pprof tool has a few options related to contention, but I've yet to
    figure out how I can invoke them.

    It works now.
    The following produces very nice blocking graph:

    $ go test -run=none -bench=.* -cpu=1,8 -blockprofile=prof net/rpc
    $ go test -c net/rpc
    $ go tool pprof --web rpc.test prof

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Rob Pike at Aug 1, 2013 at 3:13 pm
    You don't need to run
       go test -c
    after you create a profile. The go test command now (1.1 I think) keeps the
    binary around if you enable profiling in the test.

    -rob

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Péter Szilágyi at Aug 1, 2013 at 3:16 pm
    Is there by any chance a possibility to run this outside of go test?

    I.e. similarly to invoking pprof.StartCPUProfile(...)?

    On Thu, Aug 1, 2013 at 6:12 PM, Rob Pike wrote:

    You don't need to run
    go test -c
    after you create a profile. The go test command now (1.1 I think) keeps
    the binary around if you enable profiling in the test.

    -rob
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dmitry Vyukov at Aug 1, 2013 at 3:18 pm
    Yes, sure, it's supported by net/http/pprof (however you need to
    additionally enable it with runtime.BlockProfileRate=1), and by
    runtime/pprof.

    On Thu, Aug 1, 2013 at 7:16 PM, Péter Szilágyi wrote:
    Is there by any chance a possibility to run this outside of go test?

    I.e. similarly to invoking pprof.StartCPUProfile(...)?

    On Thu, Aug 1, 2013 at 6:12 PM, Rob Pike wrote:

    You don't need to run
    go test -c
    after you create a profile. The go test command now (1.1 I think) keeps
    the binary around if you enable profiling in the test.

    -rob
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Péter Szilágyi at Aug 1, 2013 at 4:37 pm
    Thanks! That did it :)

    Though I still have an issue that sometimes (quite often), the profile
    remains empty (containing only the cycles/second entry). Am I doing
    something wrong? This is the code I've used:
    http://play.golang.org/p/jHVb7ytDG2

    Cheers,
       Peter

    On Thu, Aug 1, 2013 at 6:18 PM, Dmitry Vyukov wrote:

    Yes, sure, it's supported by net/http/pprof (however you need to
    additionally enable it with runtime.BlockProfileRate=1), and by
    runtime/pprof.

    On Thu, Aug 1, 2013 at 7:16 PM, Péter Szilágyi wrote:
    Is there by any chance a possibility to run this outside of go test?

    I.e. similarly to invoking pprof.StartCPUProfile(...)?

    On Thu, Aug 1, 2013 at 6:12 PM, Rob Pike wrote:

    You don't need to run
    go test -c
    after you create a profile. The go test command now (1.1 I think) keeps
    the binary around if you enable profiling in the test.

    -rob
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dmitry Vyukov at Aug 1, 2013 at 4:48 pm
    What OS/ARCH? Version of Go?
    On Thu, Aug 1, 2013 at 8:37 PM, Péter Szilágyi wrote:
    Thanks! That did it :)

    Though I still have an issue that sometimes (quite often), the profile
    remains empty (containing only the cycles/second entry). Am I doing
    something wrong? This is the code I've used:
    http://play.golang.org/p/jHVb7ytDG2

    Cheers,
    Peter

    On Thu, Aug 1, 2013 at 6:18 PM, Dmitry Vyukov wrote:

    Yes, sure, it's supported by net/http/pprof (however you need to
    additionally enable it with runtime.BlockProfileRate=1), and by
    runtime/pprof.

    On Thu, Aug 1, 2013 at 7:16 PM, Péter Szilágyi wrote:
    Is there by any chance a possibility to run this outside of go test?

    I.e. similarly to invoking pprof.StartCPUProfile(...)?

    On Thu, Aug 1, 2013 at 6:12 PM, Rob Pike wrote:

    You don't need to run
    go test -c
    after you create a profile. The go test command now (1.1 I think) keeps
    the binary around if you enable profiling in the test.

    -rob
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Péter Szilágyi at Aug 1, 2013 at 4:51 pm
    Fun fact

    OpenSuse 12.3, x64, Go 1.1.1 -> randomly works/not works
    Ubuntu <latest>, x64, same binary -> always works

    Any suggestions? :)

    On Thu, Aug 1, 2013 at 7:48 PM, Dmitry Vyukov wrote:

    What OS/ARCH? Version of Go?
    On Thu, Aug 1, 2013 at 8:37 PM, Péter Szilágyi wrote:
    Thanks! That did it :)

    Though I still have an issue that sometimes (quite often), the profile
    remains empty (containing only the cycles/second entry). Am I doing
    something wrong? This is the code I've used:
    http://play.golang.org/p/jHVb7ytDG2

    Cheers,
    Peter

    On Thu, Aug 1, 2013 at 6:18 PM, Dmitry Vyukov wrote:

    Yes, sure, it's supported by net/http/pprof (however you need to
    additionally enable it with runtime.BlockProfileRate=1), and by
    runtime/pprof.

    On Thu, Aug 1, 2013 at 7:16 PM, Péter Szilágyi wrote:
    Is there by any chance a possibility to run this outside of go test?

    I.e. similarly to invoking pprof.StartCPUProfile(...)?

    On Thu, Aug 1, 2013 at 6:12 PM, Rob Pike wrote:

    You don't need to run
    go test -c
    after you create a profile. The go test command now (1.1 I think)
    keeps
    the binary around if you enable profiling in the test.

    -rob
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Graham Anderson at Aug 1, 2013 at 5:50 pm

    On Thursday 01 Aug 2013 19:51:20 Péter Szilágyi wrote:
    Fun fact

    OpenSuse 12.3, x64, Go 1.1.1 -> randomly works/not works
    Ubuntu <latest>, x64, same binary -> always works

    Any suggestions? :)
    Any code you can share so I can try to reproduce? If so let me know which
    kernel you're using.

    Cheers the noo,
    Graham

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dave Cheney at Aug 2, 2013 at 2:13 am
    Try my profile package, github.com/davecheney/profile, use the BlockProfile config.

    On 02/08/2013, at 1:16, Péter Szilágyi wrote:

    Is there by any chance a possibility to run this outside of go test?

    I.e. similarly to invoking pprof.StartCPUProfile(...)?

    On Thu, Aug 1, 2013 at 6:12 PM, Rob Pike wrote:
    You don't need to run
    go test -c
    after you create a profile. The go test command now (1.1 I think) keeps the binary around if you enable profiling in the test.

    -rob
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Péter Szilágyi at Aug 2, 2013 at 9:28 am
    Dave, thanks, I'll take a look at it, but I feel the problem's rooted
    within the OS (or my install of it), rather than Go.

    Graham, this small sample also reproduces the issue:
    http://play.golang.org/p/jHVb7ytDG2, I ran it as:
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=367993859
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=417416962
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527010470
    5629389444 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527006312
    11385031912 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527008424
    11410546711 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=505278527
    [...]

    System details:
    cat /etc/SuSE-release
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    uname -a
    Linux [...] 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013
    (97c14ba) x86_64 x86_64 x86_64 GNU/Linux
    go version
    go version go1.1.1 linux/amd64

    Cheers,
       Peter

    On Fri, Aug 2, 2013 at 5:12 AM, Dave Cheney wrote:


    Try my profile package, github.com/davecheney/profile, use the
    BlockProfile config.


    On 02/08/2013, at 1:16, Péter Szilágyi wrote:

    Is there by any chance a possibility to run this outside of go test?

    I.e. similarly to invoking pprof.StartCPUProfile(...)?

    On Thu, Aug 1, 2013 at 6:12 PM, Rob Pike wrote:

    You don't need to run
    go test -c
    after you create a profile. The go test command now (1.1 I think) keeps
    the binary around if you enable profiling in the test.

    -rob
    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.


    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Graham Anderson at Aug 2, 2013 at 11:40 am

    On Friday 02 Aug 2013 12:28:52 Péter Szilágyi wrote:
    Graham, this small sample also reproduces the issue:

    http://play.golang.org/p/jHVb7ytDG2, I ran it as:
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=367993859
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=417416962
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527010470
    5629389444 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527006312
    11385031912 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527008424
    11410546711 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=505278527
    [...]

    System details:
    cat /etc/SuSE-release
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    uname -a
    Linux [...] 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013
    (97c14ba) x86_64 x86_64 x86_64 GNU/Linux
    go version
    go version go1.1.1 linux/amd64
    I'm sorry but I can't reproduce the missing contention prof data here...

    #!/bin/bash
    echo "$(cat /etc/SuSE-release)"
    echo `uname -irv`
    echo `go version`
    count=0
    max=1000
    found=0
    while [[ $count -lt $max ]]
    do
         rm block.prof && GOMAXPROCS=4 go run main.go -blockprof="block.prof"
      lc=$(wc -l block.prof | cut -c -2)
      if [ ! $lc -gt 2 ]; then
       echo "no prof data on iteration $i"
      else
       found=$((found + 1))
      fi
      count=$((count + 1))
    done
    echo "prof data found $found/$max times"

    • ganderson@excession [12:24:22] ~/tmp/contention
    : ./contention.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    prof data found 1000/1000 times

    One thing I see with the data you posted above, the cycles/second on the prof
    output which is missing data is much higher than the prof output which has the
    expected data. In trying to reproduce the issue here I don't see much variance
    in this at all.

    One last thing, did you compile Go from source or install the go package from
    devel:languages:go repo? I'm using the binary package from the repo so I'll
    try again if you're using Go built from source.


    Cheers the noo,
    Graham

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Péter Szilágyi at Aug 2, 2013 at 12:26 pm
    I originally (long time ago) had the 1.0.3 go from the official distro, but
    then due to a few bugs I needed fixing I uninstalled it and switched to
    source. Current source state:
    hg summary
    parent: 16810:a7bd9a33067b go1.1.1 release
      [release-branch.go1.1] doc: add go1.1.1 to the release notes
    branch: release-branch.go1.1
    commit: (clean)
    update: (current)


    On Fri, Aug 2, 2013 at 2:40 PM, Graham Anderson
    wrote:
    On Friday 02 Aug 2013 12:28:52 Péter Szilágyi wrote:
    Graham, this small sample also reproduces the issue:

    http://play.golang.org/p/jHVb7ytDG2, I ran it as:
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=367993859
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=417416962
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527010470
    5629389444 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527006312
    11385031912 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527008424
    11410546711 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=505278527
    [...]

    System details:
    cat /etc/SuSE-release
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    uname -a
    Linux [...] 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013
    (97c14ba) x86_64 x86_64 x86_64 GNU/Linux
    go version
    go version go1.1.1 linux/amd64
    I'm sorry but I can't reproduce the missing contention prof data here...

    #!/bin/bash
    echo "$(cat /etc/SuSE-release)"
    echo `uname -irv`
    echo `go version`
    count=0
    max=1000
    found=0
    while [[ $count -lt $max ]]
    do
    rm block.prof && GOMAXPROCS=4 go run main.go -blockprof="block.prof"
    lc=$(wc -l block.prof | cut -c -2)
    if [ ! $lc -gt 2 ]; then
    echo "no prof data on iteration $i"
    else
    found=$((found + 1))
    fi
    count=$((count + 1))
    done
    echo "prof data found $found/$max times"

    • ganderson@excession [12:24:22] ~/tmp/contention
    : ./contention.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    prof data found 1000/1000 times

    One thing I see with the data you posted above, the cycles/second on the
    prof
    output which is missing data is much higher than the prof output which has
    the
    expected data. In trying to reproduce the issue here I don't see much
    variance
    in this at all.

    One last thing, did you compile Go from source or install the go package
    from
    devel:languages:go repo? I'm using the binary package from the repo so I'll
    try again if you're using Go built from source.


    Cheers the noo,
    Graham
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Péter Szilágyi at Aug 2, 2013 at 12:45 pm
    Take care, the missing ones are when the cycles are reduced (about one
    fifth) compared to the correct ones.

    Just to make the whole think a lot weirder, I've tried running your script
    (reduced it to 100 iterations) when my system is idle and when it has some
    minor background processing (i.e. a youtube video was playing).

    With the background video:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    prof data found 100/100 times

    With an idle CPU:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    no prof data on iteration
    [...]
    no prof data on iteration
    prof data found 68/100 times

    My bet currently is that - since I'm on a laptop - Suse's power management
    somehow screws up something. But I've no idea what or where. (Also it might
    be not just Suse but Linux in general, but this is the only distro I have
    on my laptop so I cannot test it on anything else).



    On Fri, Aug 2, 2013 at 3:26 PM, Péter Szilágyi wrote:

    I originally (long time ago) had the 1.0.3 go from the official distro,
    but then due to a few bugs I needed fixing I uninstalled it and switched to
    source. Current source state:
    hg summary
    parent: 16810:a7bd9a33067b go1.1.1 release
    [release-branch.go1.1] doc: add go1.1.1 to the release notes
    branch: release-branch.go1.1
    commit: (clean)
    update: (current)


    On Fri, Aug 2, 2013 at 2:40 PM, Graham Anderson <graham.anderson@gmail.com
    wrote:
    On Friday 02 Aug 2013 12:28:52 Péter Szilágyi wrote:
    Graham, this small sample also reproduces the issue:

    http://play.golang.org/p/jHVb7ytDG2, I ran it as:
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=367993859
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=417416962
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527010470
    5629389444 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527006312
    11385031912 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=2527008424
    11410546711 9 @ 0x42ed5b 0x400e49 0x414f10
    GOMAXPROCS=4 go run main.go -blockprof="block.prof" && cat block.prof
    --- contention:
    cycles/second=505278527
    [...]

    System details:
    cat /etc/SuSE-release
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    uname -a
    Linux [...] 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013
    (97c14ba) x86_64 x86_64 x86_64 GNU/Linux
    go version
    go version go1.1.1 linux/amd64
    I'm sorry but I can't reproduce the missing contention prof data here...

    #!/bin/bash
    echo "$(cat /etc/SuSE-release)"
    echo `uname -irv`
    echo `go version`
    count=0
    max=1000
    found=0
    while [[ $count -lt $max ]]
    do
    rm block.prof && GOMAXPROCS=4 go run main.go -blockprof="block.prof"
    lc=$(wc -l block.prof | cut -c -2)
    if [ ! $lc -gt 2 ]; then
    echo "no prof data on iteration $i"
    else
    found=$((found + 1))
    fi
    count=$((count + 1))
    done
    echo "prof data found $found/$max times"

    • ganderson@excession [12:24:22] ~/tmp/contention
    : ./contention.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    prof data found 1000/1000 times

    One thing I see with the data you posted above, the cycles/second on the
    prof
    output which is missing data is much higher than the prof output which
    has the
    expected data. In trying to reproduce the issue here I don't see much
    variance
    in this at all.

    One last thing, did you compile Go from source or install the go package
    from
    devel:languages:go repo? I'm using the binary package from the repo so
    I'll
    try again if you're using Go built from source.


    Cheers the noo,
    Graham
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Graham Anderson at Aug 2, 2013 at 4:13 pm

    On Friday 02 Aug 2013 15:44:57 you wrote:
    With the background video:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    prof data found 100/100 times

    With an idle CPU:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    no prof data on iteration
    [...]
    no prof data on iteration
    prof data found 68/100 times
    That's really quite strange :)
    My bet currently is that - since I'm on a laptop - Suse's power management
    somehow screws up something. But I've no idea what or where. (Also it might
    be not just Suse but Linux in general, but this is the only distro I have
    on my laptop so I cannot test it on anything else).
    That's possible I guess... I'm also wondering if the issue manifests itself
    using the kernel-default kernel as well. kernel-desktop is built with more
    aggressive timers and different preemption options for latency, but this is
    purely speculation on my part in trying to narrow the problem down somewhat.

    # zcat /proc/config.gz |grep -e CONFIG_HZ -e PREEMPT

    kernel-default:

    # CONFIG_HZ_PERIODIC is not set
    # CONFIG_PREEMPT_RCU is not set
    CONFIG_PREEMPT_NOTIFIERS=y
    CONFIG_PREEMPT_NONE=y
    # CONFIG_PREEMPT_VOLUNTARY is not set
    # CONFIG_PREEMPT is not set
    # CONFIG_HZ_100 is not set
    CONFIG_HZ_250=y
    # CONFIG_HZ_300 is not set
    # CONFIG_HZ_1000 is not set
    CONFIG_HZ=250

    kernel-desktop:

    # CONFIG_HZ_PERIODIC is not set
    CONFIG_TREE_PREEMPT_RCU=y
    CONFIG_PREEMPT_RCU=y
    CONFIG_PREEMPT_NOTIFIERS=y
    # CONFIG_PREEMPT_NONE is not set
    # CONFIG_PREEMPT_VOLUNTARY is not set
    CONFIG_PREEMPT=y
    CONFIG_PREEMPT_COUNT=y
    # CONFIG_HZ_100 is not set
    # CONFIG_HZ_250 is not set
    # CONFIG_HZ_300 is not set
    CONFIG_HZ_1000=y
    CONFIG_HZ=1000
    # CONFIG_DEBUG_PREEMPT is not set
    # CONFIG_PREEMPT_TRACER is not set

    If you want to test the kernel-default you can keep multi-version kernels
    installed (and kmp modules packages). It's probably best to quickly check it's
    enabled in the software update stack.

    The config options in /etc/zypp/zypp.conf for this are:

         multiversion = provides:multiversion(kernel)
         multiversion.kernels = latest,latest-1,running

    If for any reason you have issues with kernel-default, the previous kernel-
    desktop will be one of the options in the secondary menu selection after
    choosing "advanced" on the grub2 menu/splash screen.


    Cheers the noo,
    Graham

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Péter Szilágyi at Aug 5, 2013 at 1:38 pm
    Sorry, no luck

    Idle system:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-default #1 SMP Fri May 31 20:21:23 UTC 2013 (97c14ba) x86_64
    go version go1.1.1 linux/amd64
    prof data found *8/100* times

    Youtube in the background:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-default #1 SMP Fri May 31 20:21:23 UTC 2013 (97c14ba) x86_64
    go version go1.1.1 linux/amd64
    prof data found *100/100* times

    Cheers,
       Peter

    On Fri, Aug 2, 2013 at 6:13 PM, Graham Anderson wrote:
    On Friday 02 Aug 2013 15:44:57 you wrote:
    With the background video:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    prof data found 100/100 times

    With an idle CPU:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    no prof data on iteration
    [...]
    no prof data on iteration
    prof data found 68/100 times
    That's really quite strange :)
    My bet currently is that - since I'm on a laptop - Suse's power
    management
    somehow screws up something. But I've no idea what or where. (Also it might
    be not just Suse but Linux in general, but this is the only distro I have
    on my laptop so I cannot test it on anything else).
    That's possible I guess... I'm also wondering if the issue manifests itself
    using the kernel-default kernel as well. kernel-desktop is built with more
    aggressive timers and different preemption options for latency, but this is
    purely speculation on my part in trying to narrow the problem down
    somewhat.

    # zcat /proc/config.gz |grep -e CONFIG_HZ -e PREEMPT

    kernel-default:

    # CONFIG_HZ_PERIODIC is not set
    # CONFIG_PREEMPT_RCU is not set
    CONFIG_PREEMPT_NOTIFIERS=y
    CONFIG_PREEMPT_NONE=y
    # CONFIG_PREEMPT_VOLUNTARY is not set
    # CONFIG_PREEMPT is not set
    # CONFIG_HZ_100 is not set
    CONFIG_HZ_250=y
    # CONFIG_HZ_300 is not set
    # CONFIG_HZ_1000 is not set
    CONFIG_HZ=250

    kernel-desktop:

    # CONFIG_HZ_PERIODIC is not set
    CONFIG_TREE_PREEMPT_RCU=y
    CONFIG_PREEMPT_RCU=y
    CONFIG_PREEMPT_NOTIFIERS=y
    # CONFIG_PREEMPT_NONE is not set
    # CONFIG_PREEMPT_VOLUNTARY is not set
    CONFIG_PREEMPT=y
    CONFIG_PREEMPT_COUNT=y
    # CONFIG_HZ_100 is not set
    # CONFIG_HZ_250 is not set
    # CONFIG_HZ_300 is not set
    CONFIG_HZ_1000=y
    CONFIG_HZ=1000
    # CONFIG_DEBUG_PREEMPT is not set
    # CONFIG_PREEMPT_TRACER is not set

    If you want to test the kernel-default you can keep multi-version kernels
    installed (and kmp modules packages). It's probably best to quickly check
    it's
    enabled in the software update stack.

    The config options in /etc/zypp/zypp.conf for this are:

    multiversion = provides:multiversion(kernel)
    multiversion.kernels = latest,latest-1,running

    If for any reason you have issues with kernel-default, the previous kernel-
    desktop will be one of the options in the secondary menu selection after
    choosing "advanced" on the grub2 menu/splash screen.


    Cheers the noo,
    Graham
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dmitry Vyukov at Aug 11, 2013 at 3:26 pm
    I've added end-to-end test for block profiler, so we will see if it happens
    on any builders.
    I can not reproduce the issue on your code.
    Try to increase sleeping time and wait for all the goroutines to finish.


    On Mon, Aug 5, 2013 at 5:38 PM, Péter Szilágyi wrote:

    Sorry, no luck

    Idle system:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-default #1 SMP Fri May 31 20:21:23 UTC 2013 (97c14ba) x86_64
    go version go1.1.1 linux/amd64
    prof data found *8/100* times

    Youtube in the background:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-default #1 SMP Fri May 31 20:21:23 UTC 2013 (97c14ba) x86_64
    go version go1.1.1 linux/amd64
    prof data found *100/100* times

    Cheers,
    Peter

    On Fri, Aug 2, 2013 at 6:13 PM, Graham Anderson wrote:
    On Friday 02 Aug 2013 15:44:57 you wrote:
    With the background video:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    prof data found 100/100 times

    With an idle CPU:
    ./run.sh
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
    3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
    x86_64
    go version go1.1.1 linux/amd64
    no prof data on iteration
    [...]
    no prof data on iteration
    prof data found 68/100 times
    That's really quite strange :)
    My bet currently is that - since I'm on a laptop - Suse's power
    management
    somehow screws up something. But I've no idea what or where. (Also it might
    be not just Suse but Linux in general, but this is the only distro I have
    on my laptop so I cannot test it on anything else).
    That's possible I guess... I'm also wondering if the issue manifests
    itself
    using the kernel-default kernel as well. kernel-desktop is built with more
    aggressive timers and different preemption options for latency, but this
    is
    purely speculation on my part in trying to narrow the problem down
    somewhat.

    # zcat /proc/config.gz |grep -e CONFIG_HZ -e PREEMPT

    kernel-default:

    # CONFIG_HZ_PERIODIC is not set
    # CONFIG_PREEMPT_RCU is not set
    CONFIG_PREEMPT_NOTIFIERS=y
    CONFIG_PREEMPT_NONE=y
    # CONFIG_PREEMPT_VOLUNTARY is not set
    # CONFIG_PREEMPT is not set
    # CONFIG_HZ_100 is not set
    CONFIG_HZ_250=y
    # CONFIG_HZ_300 is not set
    # CONFIG_HZ_1000 is not set
    CONFIG_HZ=250

    kernel-desktop:

    # CONFIG_HZ_PERIODIC is not set
    CONFIG_TREE_PREEMPT_RCU=y
    CONFIG_PREEMPT_RCU=y
    CONFIG_PREEMPT_NOTIFIERS=y
    # CONFIG_PREEMPT_NONE is not set
    # CONFIG_PREEMPT_VOLUNTARY is not set
    CONFIG_PREEMPT=y
    CONFIG_PREEMPT_COUNT=y
    # CONFIG_HZ_100 is not set
    # CONFIG_HZ_250 is not set
    # CONFIG_HZ_300 is not set
    CONFIG_HZ_1000=y
    CONFIG_HZ=1000
    # CONFIG_DEBUG_PREEMPT is not set
    # CONFIG_PREEMPT_TRACER is not set

    If you want to test the kernel-default you can keep multi-version kernels
    installed (and kmp modules packages). It's probably best to quickly check
    it's
    enabled in the software update stack.

    The config options in /etc/zypp/zypp.conf for this are:

    multiversion = provides:multiversion(kernel)
    multiversion.kernels = latest,latest-1,running

    If for any reason you have issues with kernel-default, the previous
    kernel-
    desktop will be one of the options in the secondary menu selection after
    choosing "advanced" on the grub2 menu/splash screen.


    Cheers the noo,
    Graham
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 1, '13 at 2:58p
activeAug 11, '13 at 3:26p
posts17
users6
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase