Skip to content

runtime: performance degradation with Go 1.5 #12228

@tssajo

Description

@tssajo

Hello,

I wrote a program in Go which is a converter program. It parses quiet large HTML files (approx. 1.5MB each) and finds specific sections with the help of the goquery library. Then it saves the individual sections to separate files. Everything is parallelized as much as possible using several worker pools (go routines).
A lot of going on in the program (e.g. some fuzzy searching with the help of fuzzy) and unfortunately I cannot provide the source code because it is not a public project.

Note: The first line of func main() is:

  runtime.GOMAXPROCS(runtime.NumCPU())

so the program utilizes all CPU cores even when compiled with Go 1.4.2

When I run the above described program compiled by Go 1.4.2 then it completes a conversion task (converting several large HTML files) in about 32 seconds. Always.

When I run the exact same program absolutely unmodified but compiled with Go 1.5 it completes the exact same conversion task in about 50 seconds. Always.

I would call this a severe performance degradation. I can reproduce this every single time I run the converter program.

Platform: Windows 7 SP1 (x64)
CPU: Intel Core i7 4770k
RAM: 16GB DDR3

While I cannot provide the source code of my program (it is not public), I did some profiling:

Go 1.4.2 CPU profile:
go1.4.2_cpu_profile.png

Go 1.5 CPU profile:
go1.5_cpu_profile.png

Go 1.4.2 memory profile:
go1.4.2_mem_profile.png

Go 1.5 memory profile:
go1.5_mem_profile.png

(Sorry for providing only screenshots, but I do not know how to redirect output from go tool pprof to a file under Windows.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions