> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html><head><title>Worse performance with high async threads and
> ugreen</title>
> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
> <meta http-equiv="Content-Style-Type" content="text/css">
> <style type="text/css"><!--
> body {
>   margin: 5px 5px 5px 5px;
>   background-color: #ffffff;
> }
> /* ========== Text Styles ========== */
> hr { color: #000000}
> body, table /* Normal text */
> {
>  font-size: 9pt;
>  font-family: 'Courier New';
>  font-style: normal;
>  font-weight: normal;
>  color: #000000;
>  text-decoration: none;
> }
> span.rvts1 /* Heading */
> {
>  font-size: 10pt;
>  font-family: 'Arial';
>  font-weight: bold;
>  color: #0000ff;
> }
> span.rvts2 /* Subheading */
> {
>  font-size: 10pt;
>  font-family: 'Arial';
>  font-weight: bold;
>  color: #000080;
> }
> span.rvts3 /* Keywords */
> {
>  font-size: 10pt;
>  font-family: 'Arial';
>  font-style: italic;
>  color: #800000;
> }
> a.rvts4, span.rvts4 /* Jump 1 */
> {
>  font-size: 10pt;
>  font-family: 'Arial';
>  color: #008000;
>  text-decoration: underline;
> }
> a.rvts5, span.rvts5 /* Jump 2 */
> {
>  font-size: 10pt;
>  font-family: 'Arial';
>  color: #008000;
>  text-decoration: underline;
> }
> span.rvts6
> {
>  font-size: 8pt;
>  font-family: 'tahoma';
> }
> span.rvts7
> {
>  font-size: 8pt;
>  font-family: 'arial';
>  font-style: italic;
>  color: #c0c0c0;
> }
> a.rvts8, span.rvts8
> {
>  font-size: 8pt;
>  font-family: 'arial';
>  color: #0000ff;
>  text-decoration: underline;
> }
> a.rvts9, span.rvts9
> {
>  color: #0000ff;
>  text-decoration: underline;
> }
> a.rvts10, span.rvts10
> {
>  font-size: 14pt;
>  font-family: 'arial';
>  font-weight: bold;
>  color: #555555;
>  background-color: #eeeeee;
>  text-decoration: none;
> }
> /* ========== Para Styles ========== */
> p,ul,ol /* Paragraph Style */
> {
>  text-align: left;
>  text-indent: 0px;
>  padding: 0px 0px 0px 0px;
>  margin: 0px 0px 0px 0px;
> }
> .rvps1 /* Centered */
> {
>  text-align: center;
> }
> --></style>
> </head>
> <body>
>
> <p><br></p>
> <p>when I use this string, to start uwsgi server:</p>
> <p><br></p>
> <p>uwsgi --socket /tmp/uwsgi.sock -L --processes 1 --async 100 --ugreen -l
> 2048 -C --master --module worker -H /srv/virtualenvs/test/ &nbsp;</p>
> <p><br></p>
> <p>and run after that this test ab -c 15 -n 10000&nbsp;<a class=rvts9
> href="http://ppc.dev/";>http://test.dev/</a></p>
> <p><br></p>
> <p>I have:</p>
> <p>Requests per second: &nbsp; &nbsp;1187.64 [#/sec] (mean)</p>
> <p>Time per request: &nbsp; &nbsp; &nbsp; 12.630 [ms] (mean)</p>
> <p><br></p>
> <p><br></p>
> <p>If I will change &nbsp;--async 100 to &nbsp;--async 1000</p>
> <p>Requests per second: &nbsp; &nbsp;627.49 [#/sec] (mean)</p>
> <p>Time per request: &nbsp; &nbsp; &nbsp; 23.905 [ms] (mean)</p>
> <p><br></p>
> <p><br></p>
> <p>If I will change &nbsp;--async 1000 to &nbsp;--async 10000</p>
> <p>Requests per second: &nbsp; &nbsp;13.90 [#/sec] (mean)</p>
> <p>Time per request: &nbsp; &nbsp; &nbsp; 1079.050 [ms] (mean)</p>
> <p><br></p>
> <p>Application is just simple psycogreen_green application who sends 3
> select requests to postgresql using psycopg2.pool, postgresql not
> overloaded at all - just idle, you remember during this test I didn't
> change ab args, only async value.</p>
> <p><br></p>
> <p><br></p>
> <p><br></p>
>
> </body></html>
>
>

Hi uGreen (and fibers for ruby) are (currently) O(n).
So the more core you add the worst performance for request you will have.
(this is because it must scan all the core to see if they are in the
middle of a function call).

This will be fixed for sure (even if i do not know how as this is a common
problem in green schedulers). Probably i will use some kernel-like
technique but for now i have to fix all the async-related opened bugs.
-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to