FAQ
I have a web API written in Golang.
The API fetch data from redis(http://redis.io/) using Go-redis(https://github.com/alphazero/Go-Redis),do some iter computation and return.

When I run benchmark with http_load,the result is not that good.
The result is as follows:

[yugaohe@localhost test]$ http_load -p 100 -s 60 t.txt
459810 fetches, 100 max parallel, 7.44892e+07 bytes, in 60.0004 seconds
162 mean bytes/connection
7663.45 fetches/sec, 1.24148e+06 bytes/sec
msecs/connect: 0.523986 mean, 3000.81 max, 0.069 min
msecs/first-response: 12.3115 mean, 1041.64 max, 0.51 min
HTTP response codes:
code 200 -- 459810

I do some profile work following this blog(http://blog.golang.org/2011/06/profiling-go-programs.html)
And find it is SCANBLOCK that stucks!

I make several images about this:
http://yugaohe.sinaapp.com/rtdeAnalysis.htmlhttp://yugaohe.sinaapp.com/rtdeAnalysis2.html


see more @http://code.google.com/p/go/issues/detail?id=4507

--

Search Discussions

  • Minux at Dec 14, 2012 at 10:28 am

    On Fri, Dec 14, 2012 at 10:00 AM, 于高禾 wrote:

    I have a web API written in Golang.
    The API fetch data from redis(http://redis.io/) using Go-redis(https://github.com/alphazero/Go-Redis),do some iter computation and return.

    When I run benchmark with http_load,the result is not that good.
    The result is as follows:

    [yugaohe@localhost test]$ http_load -p 100 -s 60 t.txt
    459810 fetches, 100 max parallel, 7.44892e+07 bytes, in 60.0004 seconds
    162 mean bytes/connection
    7663.45 fetches/sec, 1.24148e+06 bytes/sec
    msecs/connect: 0.523986 mean, 3000.81 max, 0.069 min
    msecs/first-response: 12.3115 mean, 1041.64 max, 0.51 min
    HTTP response codes:
    code 200 -- 459810

    I do some profile work following this blog(http://blog.golang.org/2011/06/profiling-go-programs.html)
    And find it is SCANBLOCK that stucks!

    I make several images about this:
    http://yugaohe.sinaapp.com/rtdeAnalysis.htmlhttp://yugaohe.sinaapp.com/rtdeAnalysis2.html


    see more @http://code.google.com/p/go/issues/detail?id=4507

    Have you tried to follow Russ's advice to reduce garbage generation in the
    issue tracker?

    --
  • ⚛ at Dec 14, 2012 at 11:43 am
    I would suggest to run your application as

    GOGCTRACE=1 application

    and submit the typical lines related to garbage collection to golang-nuts.
    On Friday, December 14, 2012 3:00:08 AM UTC+1, Codefor wrote:

    I have a web API written in Golang.
    The API fetch data from redis(http://redis.io/) using Go-redis(https://github.com/alphazero/Go-Redis),do some iter computation and return.

    When I run benchmark with http_load,the result is not that good.
    The result is as follows:

    [yugaohe@localhost test]$ http_load -p 100 -s 60 t.txt
    459810 fetches, 100 max parallel, 7.44892e+07 bytes, in 60.0004 seconds
    162 mean bytes/connection
    7663.45 fetches/sec, 1.24148e+06 bytes/sec
    msecs/connect: 0.523986 mean, 3000.81 max, 0.069 min
    msecs/first-response: 12.3115 mean, 1041.64 max, 0.51 min
    HTTP response codes:
    code 200 -- 459810

    I do some profile work following this blog(http://blog.golang.org/2011/06/profiling-go-programs.html)
    And find it is SCANBLOCK that stucks!

    I make several images about this:
    http://yugaohe.sinaapp.com/rtdeAnalysis.htmlhttp://yugaohe.sinaapp.com/rtdeAnalysis2.html


    see more @http://code.google.com/p/go/issues/detail?id=4507
    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedDec 14, '12 at 5:26a
activeDec 14, '12 at 11:43a
posts3
users3
websitegolang.org

3 users in discussion

于高禾: 1 post ⚛: 1 post Minux: 1 post

People

Translate

site design / logo © 2022 Grokbase