FAQ
Hi,

I wrote a REST service using golang and go-json-rest.

The http version of the service handled 100k requests in about 20 seconds.
I just replaced one line and added http.ListenAndServeTLS and for the same
100k requests (with the same background database machine, identical number
of records etc.) it took about 18 minutes.

I ran the program under pprof and profiling following the instructions
in http://blog.golang.org/profiling-go-programs

The top10 reasons for slowness are all related to crypto/math packages. The
list is:

(pprof) top10
Total: 106140 samples
    17224 16.2% 16.2% 17696 16.7% crypto/elliptic.p256ReduceDegree
    12374 11.7% 27.9% 12374 11.7% math/big.divWW
    11872 11.2% 39.1% 11872 11.2% math/big.addMulVVW
    10901 10.3% 49.3% 50407 47.5% math/big.nat.divLarge
     9482 8.9% 58.3% 9482 8.9% math/big.mulAddVWW
     6202 5.8% 64.1% 6202 5.8% math/big.subVV
     3567 3.4% 67.5% 16187 15.3% math/big.basicMul
     1904 1.8% 69.3% 2092 2.0% runtime.MSpan_Sweep
     1658 1.6% 70.8% 1658 1.6% math/big.nat.clear
     1612 1.5% 72.4% 1612 1.5% scanblock

Is there any plan for improving the performance of the https of golang in
the near future ?

Do I need to tweak/tune something to improve these numbers (changing the
algorithms etc.) ?

Any pointers or help ?

I am running go 1.3 on a thinkpad t430 on linux.

Sankar
http://psankar.blogspot.in

--
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/d/optout.

Search Discussions

  • Naoki INADA at Sep 19, 2014 at 11:07 am
    Do you use keep-alive?
    TLS handshake is very havy.
    On Friday, September 19, 2014 5:46:58 PM UTC+9, Sankar wrote:

    Hi,

    I wrote a REST service using golang and go-json-rest.

    The http version of the service handled 100k requests in about 20 seconds.
    I just replaced one line and added http.ListenAndServeTLS and for the same
    100k requests (with the same background database machine, identical number
    of records etc.) it took about 18 minutes.

    I ran the program under pprof and profiling following the instructions in
    http://blog.golang.org/profiling-go-programs

    The top10 reasons for slowness are all related to crypto/math packages.
    The list is:

    (pprof) top10
    Total: 106140 samples
    17224 16.2% 16.2% 17696 16.7% crypto/elliptic.p256ReduceDegree
    12374 11.7% 27.9% 12374 11.7% math/big.divWW
    11872 11.2% 39.1% 11872 11.2% math/big.addMulVVW
    10901 10.3% 49.3% 50407 47.5% math/big.nat.divLarge
    9482 8.9% 58.3% 9482 8.9% math/big.mulAddVWW
    6202 5.8% 64.1% 6202 5.8% math/big.subVV
    3567 3.4% 67.5% 16187 15.3% math/big.basicMul
    1904 1.8% 69.3% 2092 2.0% runtime.MSpan_Sweep
    1658 1.6% 70.8% 1658 1.6% math/big.nat.clear
    1612 1.5% 72.4% 1612 1.5% scanblock

    Is there any plan for improving the performance of the https of golang in
    the near future ?

    Do I need to tweak/tune something to improve these numbers (changing the
    algorithms etc.) ?

    Any pointers or help ?

    I am running go 1.3 on a thinkpad t430 on linux.

    Sankar
    http://psankar.blogspot.in
    --
    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/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 19, '14 at 8:47a
activeSep 19, '14 at 11:07a
posts2
users2
websitegolang.org

2 users in discussion

Sankar: 1 post Naoki INADA: 1 post

People

Translate

site design / logo © 2021 Grokbase