https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2019-10-30T12:14:40Z
Ruby Issue Tracking System
Ruby master - Bug #16284: Net/HTTP consuming multiple times more memory compared to other libraries
https://bugs.ruby-lang.org/issues/16284?journal_id=82376
2019-10-30T12:14:40Z
zogash (Milovan Zogovic)
milovan.zogovic@gmail.com
<ul><li><strong>Subject</strong> changed from <i>Net/HTTP consuming multiple times more memories compared to other libraries</i> to <i>Net/HTTP consuming multiple times more memory compared to other libraries</i></li></ul>
Ruby master - Bug #16284: Net/HTTP consuming multiple times more memory compared to other libraries
https://bugs.ruby-lang.org/issues/16284?journal_id=82377
2019-10-30T14:10:52Z
mame (Yusuke Endoh)
mame@ruby-lang.org
<ul></ul><p>Thank you for the report. Unfortunately, I cannot reproduce the issue. The result on my Linux machine is completely opposite against yours.</p>
<pre><code>$ ruby -v
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
$ ruby t.rb EXCON
Memory: 60 MB
Memory: 81 MB
Memory: 104 MB
Memory: 83 MB
Memory: 107 MB
Memory: 124 MB
Memory: 92 MB
Memory: 109 MB
Memory: 126 MB
Memory: 148 MB
Memory: 150 MB
Memory: 154 MB
Memory: 136 MB
Memory: 136 MB
Memory: 153 MB
Memory: 170 MB
Memory: 189 MB
Memory: 191 MB
Memory: 192 MB
Memory: 192 MB
Memory: 159 MB
Memory: 159 MB
Memory: 159 MB
Memory: 175 MB
Memory: 193 MB
$ ruby t.rb NET
Memory: 49 MB
Memory: 61 MB
Memory: 62 MB
Memory: 79 MB
Memory: 96 MB
Memory: 97 MB
Memory: 99 MB
Memory: 104 MB
Memory: 80 MB
Memory: 97 MB
Memory: 97 MB
Memory: 104 MB
Memory: 63 MB
Memory: 85 MB
Memory: 85 MB
Memory: 85 MB
Memory: 85 MB
Memory: 85 MB
Memory: 85 MB
Memory: 85 MB
Memory: 85 MB
Memory: 85 MB
Memory: 85 MB
Memory: 85 MB
Memory: 85 MB
</code></pre>
Ruby master - Bug #16284: Net/HTTP consuming multiple times more memory compared to other libraries
https://bugs.ruby-lang.org/issues/16284?journal_id=82394
2019-10-31T09:33:47Z
zogash (Milovan Zogovic)
milovan.zogovic@gmail.com
<ul></ul><p>Hey Yusuke, thanks for checking this out. I have tried this out on my friends machines and one of them has exactly the same results as I, but other has the results that are matching yours. All three of us are using MacBooks (although different models). However, running it in Docker (<code>FROM ruby:2.6.5</code>) it gave us consistent results where Excon is actually consuming more memory. Furthermore, I have also tried running this on Heroku dyno and here are the results:</p>
<blockquote>
<p>Net/HTTP<br>
Memory: 106 MB<br>
Memory: 136 MB<br>
Memory: 124 MB<br>
Memory: 124 MB<br>
Memory: 141 MB<br>
Memory: 175 MB<br>
Memory: 120 MB<br>
Memory: 149 MB<br>
Memory: 166 MB<br>
Memory: 183 MB<br>
Memory: 149 MB<br>
Memory: 149 MB<br>
Memory: 149 MB<br>
Memory: 162 MB<br>
Memory: 162 MB<br>
Memory: 162 MB<br>
Memory: 162 MB<br>
Memory: 162 MB<br>
Memory: 162 MB<br>
Memory: 162 MB<br>
Memory: 162 MB<br>
Memory: 162 MB<br>
Memory: 162 MB<br>
Memory: 162 MB<br>
Memory: 162 MB</p>
</blockquote>
<blockquote>
<p>EXCON<br>
Memory: 117 MB<br>
Memory: 125 MB<br>
Memory: 152 MB<br>
Memory: 139 MB<br>
Memory: 166 MB<br>
Memory: 182 MB<br>
Memory: 200 MB<br>
Memory: 147 MB<br>
Memory: 164 MB<br>
Memory: 181 MB<br>
Memory: 148 MB<br>
Memory: 164 MB<br>
Memory: 181 MB<br>
Memory: 201 MB<br>
Memory: 201 MB<br>
Memory: 207 MB<br>
Memory: 223 MB<br>
Memory: 239 MB<br>
Memory: 240 MB<br>
Memory: 240 MB<br>
Memory: 240 MB<br>
Memory: 240 MB<br>
Memory: 240 MB<br>
Memory: 240 MB<br>
Memory: 240 MB</p>
</blockquote>
Ruby master - Bug #16284: Net/HTTP consuming multiple times more memory compared to other libraries
https://bugs.ruby-lang.org/issues/16284?journal_id=83152
2019-12-16T07:31:07Z
mame (Yusuke Endoh)
mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Thanks. I think this is not a bug. Closing this issue.</p>
<p>I guess there may be room for improvement in Net::HTTP (and Excon?), though. Investigation and a patch are welcome.</p>