<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="32662" data-post-id="32662">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cmkarlsson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cmkarlsson/120/23000_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cmkarlsson
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>It looks OK (as expected) to me <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>From my point of view there are so many things that are off with the way they do these tests and they even say themselves that results are not comparable unless you are an “expert”.</p>
<p>From a quick glance:</p>
<ol>
<li>They use wrk which has the coordinated omission problem. So basically their test result can only be interpreted for closed system (i.e not something where there is no back-pressure from clients like the internet)</li>
<li>They report the <em>best case</em> result for each framework. I think worst case is more interesting if I am running something in production</li>
<li>For latency they use average latency for ranking. It is well known that averages are bad to use in this case. They could have used proper percentiles or if they don’t do any coordinated omission adjustment (which they don’t) they should use the max latency.</li>
<li>Tests run for way too short. 15 seconds. Max concurrency 256 for anything but plaintext. They say themselves that they didn’t see any difference running test for 60 seconds or 15 seconds. Well I am not surprised:) 60 seconds is way too short as well! Once memory buffers run full, garbage collection kicks in, database connections get stuck you will see other problems. I’ve had servers that looked like they were running OK which ground to a halt and complete stop after 30 minutes. I understand it is hard to run the tests for all these frameworks for such a long time but still.</li>
</ol>
<p>Are their tests useless? If you are contemplating setting up an http server in a closed system then perhaps no. They might be valid if you interpret the data correctly. If you have the http servers on an open system such as the internet? No then they are not valid.</p>
<p>And they say (<a href="http://tiamat.tsotech.com/unfair-comparisons" class="inline-onebox" rel="noopener nofollow ugc">Unfair comparisons / Tiamat</a>):<br>
“The tests set what can be considered high-water marks for performance.” That is, any framework is unlikely to perform better than these tests. So at least that is one thing you <em>can</em> takeaway from the results.</p>
<p>If you look through the data tables and latency graphs phoenix actually does pretty well. For latency it has low “max” and standard deviation which is not completely off the walls.</p>
<p>If you look how it performs under the various concurrency settings it performs as expected with little variation. Some of the faster frameworks fluctuated over 100% between the various concurrency settings. That is not what I call “stable”</p>
<p>Finally for these tests erlang VM has a bottleneck which hopefully will be addressed in OTP20 with multi poll-set. Not that it will be the best but I have a feeling it will do much better.</p>
<p>There is a danger with these tests that something like phoenix comes out in a bad light. There are python/php/javascript frameworks that come out on top in the way the present the data. I know from experience that in real life they stand no chance if you need performance out of the box.</p>
<p>I hope people don’t look at this and outright discards any framework because of it, but I think that is the case.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="32662" data-batch-url="/posts/batch_likers">
                        7
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/techempower-benchmarks/171/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-32662" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="32662"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="32693" data-post-id="32693">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="brightball" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/brightball/120/17192_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  brightball
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Part of the trap that we fall into is that people tend to assume “benchmarks + developer time = all factors”. We’re as guilty of it as anybody by showing the comparisons for the Ruby crowd but there’s always somebody faster. We need to do a better job clearly communicating the non-benchmark related perks of Elixir/Phoenix to clearly differentiate it for the casual observer.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="32693" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/techempower-benchmarks/171/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-32693" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="32693"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="34691" data-post-id="34691">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shortlyportly" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/shortlyportly/120/12742_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shortlyportly
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi All.</p>
<p>Comparing round 13 vs 14 it seems that Phoenix has gone backwards - does anyone have any idea why? I appreciate that these aren’t real world figures but I’d expect them to be consistent between the two rounds.</p>
<p>cheers</p>
<p>Dave</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="34691" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/techempower-benchmarks/171/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-34691" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="34691"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="34703" data-post-id="34703">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kseg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kseg/120/6178_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kseg
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>You can look at this and say “we have room for improvement” or you can look at this and say “they don’t know how to benchmark.” One will lead to a better product, the other won’t.</p>
<p>When it comes to performance, Elixir/Phoenix/Ecto <em>is</em> a middle-of-the-pack player. For a dynamic language, it’s doing pretty well. But things could be improved. And, maybe some things can’t be improved because of the nature of Erlang.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="34703" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/techempower-benchmarks/171/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-34703" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="34703"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="34766" data-post-id="34766">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shortlyportly" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/shortlyportly/120/12742_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shortlyportly
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks <a class="mention" href="/u/kseg" rel="nofollow">@kseg</a>. I’m can’t disagree with you on your points. I was just curious as to why Phoenix seems to have slipped down the chart compared to previous versions (not against other frameworks). So, for example, The Data Updates test;</p>
<ul>
<li>Round 12 - 1,100 (27.8%)</li>
<li>Round 13 - 1,915 (65.0%)</li>
<li>Round 14 - 750 (17.1%) - quite a significant drop.</li>
</ul>
<p>cheers</p>
<p>Dave</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="34766" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/techempower-benchmarks/171/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-34766" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="34766"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="34777" data-post-id="34777">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kseg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kseg/120/6178_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kseg
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Not sure. Another reason I like these types of benchmark…even with all their “flaws”, if the “flaws” are consistent, they can catch regressions.</p>
<p>This commit changed the data update test:<br>
<a href="https://github.com/TechEmpower/FrameworkBenchmarks/commit/96deafcf351ae0b7ae44ae51b292cfa829eab382#diff-92a2750f03cbfd63d2c3b27eeeef442a" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/TechEmpower/FrameworkBenchmarks/commit/96deafcf351ae0b7ae44ae51b292cfa829eab382#diff-92a2750f03cbfd63d2c3b27eeeef442a</a></p>
<p>You can see it no longer serializes through Poison’s <code>@derive</code> attribute which, according to the Poison docs, should be used for “maximum performance”.</p>
<p>There was also a more recent commit that changed many (faster) <code>encode_to_dataio!</code> to <code>encode!</code> which isn’t going to help anything.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="34777" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/techempower-benchmarks/171/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-34777" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="34777"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="34781" data-post-id="34781">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sasajuric" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sasajuric/120/991_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sasajuric
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Elixir In Action</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-post-not-found" data-username="kseg" data-post="7" data-topic="5036">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kseg/48/6178_2.png" class="avatar"><a href="https://forum.elixirforum.com/t/techempower-benchmarks-round-14/5036/7" rel="nofollow">TechEmpower Benchmarks Round 14</a></div>
<blockquote>
<p>You can look at this and say “we have room for improvement” or you can look at this and say “they don’t know how to benchmark.” One will lead to a better product, the other won’t.</p>
</blockquote>
</aside>
<p>While I agree that these perf tests can be useful to discover possible issues, I also agree with <a class="mention" href="/u/cmkarlsson" rel="nofollow">@cmkarlsson</a> that these tests are a terrible way to compare frameworks, which is <a href="https://www.techempower.com/benchmarks/#section=intro&amp;hw=ph&amp;test=fortune" rel="noopener nofollow ugc">according to the site</a> their main purpose (<em>This is a performance comparison of many web application frameworks</em>).</p>
<p>IMO with TE benches, you can’t really conclude whether one framework is faster than another for your particular problem. Moreover speed is not the only factor (nor the most important one) for choosing a web framework. Therefore, I think that these benches are very shallow and misleading, and that they fail in their main purpose.</p>
<p>On the other hand, having a common suite for benching frameworks would be great. If we could have an easy way of installing TE suite locally and running, we could have an automated way of benching our frameworks, finding out possible bottlenecks, and even detecting regression performance. Not sure to what extent can TE code currently be used for that, but I agree that this can be useful.</p>
<p>It’s worth noting that the goal of optimizing should be to get good and consistent performance numbers (latency and throughput), and not to move the framework up this shallow top list. Because, if the latter is the goal, we might end up doing all sort of trickery just to create the illusion that Phoenix is faster, introducing non-obvious trade-offs which will bite us in more complex real-life scenarios.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="34781" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/techempower-benchmarks/171/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-34781" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="34781"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="34787" data-post-id="34787">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kseg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kseg/120/6178_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kseg
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>It might be a bad way to compare frameworks, but it’s a pretty good way to compare the performance of HTTP servers and database drivers.</p>
<p>Personally, I think it’s safe to say that both <code>net/http</code> and Cowboy satisfy the HTTP specification, provide a usable interface to build frameworks on top of, are capable of scaling beyond a single core and have proven to be fairly robust. At that point, performance (latency, throughput, memory usage, …) <strong>is</strong> the only factor. At least, it’s the only factor from the point of view of people working on these components.</p>
<p>I agree that to a consumer, maybe speed isn’t the only factor. They are very different in another respect: one lets you run Go code, the other lets you run Erlang/Elixir code. Maybe that ought to weigh more on your decision than an X% difference in performance.</p>
<p>Or maybe not.  I don’t know what your needs are, and I’m not going to assume that performance isn’t really important to you.</p>
<p>People will take whatever value from these benchmarks as they want. Yes, a lot of that will be misguided. And yes, it’s useful to regurgitate the typical “these benchmarks are flawed” and  “it doesn’t represent the real world” (which is a pretty condescending thing to say to strangers, really, what people mean is it doesn’t represent THEIR real world).</p>
<p>I know that we’re largely saying the same thing, I just wanted to get the last word in <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="34787" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/techempower-benchmarks/171/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-34787" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="34787"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="34794" data-post-id="34794">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sasajuric" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sasajuric/120/991_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sasajuric
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Elixir In Action</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-post-not-found" data-username="kseg" data-post="11" data-topic="5036">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kseg/48/6178_2.png" class="avatar"><a href="https://forum.elixirforum.com/t/techempower-benchmarks-round-14/5036/11" rel="nofollow">TechEmpower Benchmarks Round 14</a></div>
<blockquote>
<p>It might be a bad way to compare frameworks, but it’s a pretty good way to compare the performance of HTTP servers and database drivers.</p>
</blockquote>
</aside>
<p>That’s debatable. Last time I checked, these tests took only 10 sec, so they didn’t really measure the cost of garbage collection (which might significantly affect the results for stop-the-world-gc runtimes). They also didn’t observe how CPU bound tasks interfere with I/O ones (which under some conditions can cause tremendous latency increase). For other issues, see comments made by <a class="mention" href="/u/cmkarlsson" rel="nofollow">@cmkarlsson</a> in this thread.</p>
<aside class="quote no-group quote-post-not-found" data-username="kseg" data-post="11" data-topic="5036">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kseg/48/6178_2.png" class="avatar"><a href="https://forum.elixirforum.com/t/techempower-benchmarks-round-14/5036/11" rel="nofollow">TechEmpower Benchmarks Round 14</a></div>
<blockquote>
<p>I agree that to a consumer, maybe speed isn’t the only factor. They are very different in another respect: one lets you run Go code, the other lets you run Erlang/Elixir code. Maybe that ought to weigh more on your decision than an X% difference in performance.</p>
</blockquote>
</aside>
<p>It’s not just about language. There are properties, such as fault-tolerance, the ability to troubleshoot production, ecosystem, and whatnot. Those things matter, and IMO matter much more than the speed. Not that speed is irrelevant, but past some point of “acceptable”, it matters much less, and sometimes it can be counterproductive.</p>
<aside class="quote no-group quote-post-not-found" data-username="kseg" data-post="11" data-topic="5036">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kseg/48/6178_2.png" class="avatar"><a href="https://forum.elixirforum.com/t/techempower-benchmarks-round-14/5036/11" rel="nofollow">TechEmpower Benchmarks Round 14</a></div>
<blockquote>
<p>Or maybe not.  I don’t know what your needs are, and I’m not going to assume that performance isn’t really important to you.</p>
</blockquote>
</aside>
<p>There is a difference between performance matters and “I want to use every nanosecond of CPU time as best as possible”. Of course that all of us want to have some reasonable performance. On the other hand, aiming for the fastest possible framework (there’s no such thing, but let’s pretend it exists) is IMO usually wrong, b/c that speed gain is likely obtained by some trade-off, which might not be immediately obvious.</p>
<p>My usual advice is to measure whether the candidate framework is good enough for the desired case. That’s what I did when I first evaluated Erlang, by running a 12 hours load test on a simulation of the system, with 10x of the estimated load. Once I was convinced that Erlang easily handles that (and that it can easily scale), I didn’t really care about the speed anymore. I knew that if in some special cases I need to squeeze out the best performance, I can easily step outside of Erlang for that.</p>
<aside class="quote no-group quote-post-not-found" data-username="kseg" data-post="11" data-topic="5036">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kseg/48/6178_2.png" class="avatar"><a href="https://forum.elixirforum.com/t/techempower-benchmarks-round-14/5036/11" rel="nofollow">TechEmpower Benchmarks Round 14</a></div>
<blockquote>
<p>“it doesn’t represent the real world” (which is a pretty condescending thing to say to strangers, really, what people mean is it doesn’t represent THEIR real world).</p>
</blockquote>
</aside>
<p>When I mention “real world” I talk about systems running in production (and those which are being developed to run in production in the future). If it’s running in production, it’s real. Otherwise it’s not. Consequently, TE benches are not real-world, but rather some (IMO very poor) attempt to simulate the production. If that makes me condescending, so be it <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>The problem is that your production is not the same as mine, and definitely not the same as the thing being benched in TE. Hence, even though framework <code>foo</code> might be 100x faster than <code>bar</code> in the TE bench, it might well happen that <code>bar</code> actually produces better number for your case (or mine). Therefore, even if TE benches were done properly (and I don’t think they are), they still wouldn’t tell you a lot about your system, and might even lead you to a bad conclusion.</p>
<p>Which is why I believe there’s no such thing as the proper general bench comparison of frameworks. You can design one for your own system, simply to discard any framework which makes it very hard to deal with the desired load. Past that point, the decision on which framework to use should IMO mostly revolve around other properties.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="34794" data-batch-url="/posts/batch_likers">
                        5
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/techempower-benchmarks/171/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-34794" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="34794"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
    <div class="postbit" id="34987" data-post-id="34987">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="anthonyb" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  anthonyb
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-post-not-found" data-username="sasajuric" data-post="10" data-topic="5036">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sasajuric/48/991_2.png" class="avatar"><a href="https://forum.elixirforum.com/t/techempower-benchmarks-round-14/5036/10" rel="nofollow">TechEmpower Benchmarks Round 14</a></div>
<blockquote>
<p>If we could have an easy way of installing TE suite locally and running, we could have an automated way of benching our frameworks, finding out possible bottlenecks, and even detecting regression performance. Not sure to what extent can TE code currently be used for that, but I agree that this can be useful.</p>
</blockquote>
</aside>
<p>Yes, you can install and run the TechEmpower benchmarks suite locally via the Vagrant setup they provide. The basics are in the <a href="https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/README.md" rel="noopener nofollow ugc">readme</a>, with further details in the <a href="http://frameworkbenchmarks.readthedocs.io/en/latest/Development/" rel="noopener nofollow ugc">documentation</a>.</p>
<p>Among fullstack frameworks using a full ORM (as opposed to raw SQL) with an RDBMS (i.e., MySQL or Postgres), on most of the tests, the performance of Phoenix is respectable, though not exceptional. However, performance on the “Data updates” and “Multiple queries” tests is especially low (with a significant regression on “Data updates” from Round 13 to Round 14) – on the lower end of the fullstack Python and even PHP frameworks. It might be worth investigating what’s going on with those two tests in particular. Is it something with Ecto?</p>
<p>More generally, it might not be a bad idea for the core team members to take a look at the Phoenix code submitted for these benchmarks and ensure Phoenix is putting its best foot forward. The Phoenix website describes Phoenix as “Productive. Reliable. Fast.”. Whatever flaws these benchmarks may have, people will likely look at them and conclude Phoenix isn’t living up to that third adjective.</p>
<p>Note, it isn’t difficult to push changes to the TechEmpower code. Just use their Vagrant setup to make changes on a local machine and send a pull request to the Github repo.</p>
<p>It might also be interesting to add another entry using just Cowboy, Plug, and raw SQL – this could help show the overhead added by Phoenix and Ecto.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="34987" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/techempower-benchmarks/171/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-34987" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="34987"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/171/load_more?page=3">Load more posts (109 remaining)</a>
</div></template></turbo-stream>