Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leaks #194

Merged
merged 4 commits into from Sep 1, 2015
Merged

Fix memory leaks #194

merged 4 commits into from Sep 1, 2015

Conversation

buger
Copy link
Owner

@buger buger commented Aug 26, 2015

@chunacatsunflower
Copy link

wow, that was fast! I'll push it up to our server tomorrow and check it out.

@Kooper
Copy link

Kooper commented Aug 27, 2015

Hello,

I tried the provided binary from https://www.dropbox.com/s/0gd9tnf3qw7ieeo/gor_fix_memory_leaks_x64.tar.gz?dl=1 and it still leaks. On my load it's 1.7 Gb in 3 minutes:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12281 root 20 0 3173m 1.7g 3204 S 115 5.4 3:36.19 gor

Gor is started as usr/bin/gor --input-raw :8080 --output-http ...

@buger
Copy link
Owner Author

buger commented Sep 1, 2015

It took a bit longer, but results are great :)

Number of spawned goroutines dropped in order of magnitude, and it should work way more stable and faster.

/cc @chunacatsunflower @Kooper thanks for the feedback! (binaries are updated)

buger added a commit that referenced this pull request Sep 1, 2015
@buger buger merged commit 323f85b into master Sep 1, 2015
@Kooper
Copy link

Kooper commented Sep 2, 2015

@buger, the new version has awesome performance indeed! It is even much faster then 0.9.8 - truly amazing. I'm able to replicate up to 800 RPS of HTTP traffic from raw socket (approx. 2MB/s of incoming traffic) without significant CPU load. Thank you for this!

Memory leak, however is not fixed completely. With the input volume I have a 100MB/hour increase in memory consumption:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
21507 root      20   0 1349m 838m 1808 S   79  2.7 294:44.68 gor

@buger
Copy link
Owner Author

buger commented Sep 2, 2015

@Kooper this PR #201 should fix rest of memory leaks :)

@buger
Copy link
Owner Author

buger commented Sep 3, 2015

Released in v0.10.1

@slimus slimus deleted the fix-memory-leaks branch June 3, 2020 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants