Thanks for sharing these results. When posting benchmarks please
always include gist links or similar with the source code of the
benchmarks concerned.

Although I prefer Node, I have a hunch that this still wasn't really
apples to apples comparison, in terms of how PHP and Node were each
configured to open connections to MySQL or reuse them.

On Wed, Feb 25, 2015 at 5:57 PM, Anirban Bhattacharya
<anirbanbhattacharya1...@gmail.com> wrote:
> And when I ran for 1000 concurrent users for 10 minutes I can see the huge
> difference in concurrency for Node
>
> =======================================1K concurrent for 10 minutes
> ==============================
> anirbanb2004@Anisoft-Corporation:~/www/loadTest/siegeLog$ siege -c1000 -d1
> -t10M -lnode1.log http://localhost:9615
> ** SIEGE 3.0.5
> ** Preparing 1000 concurrent users for battle.
> The server is now under siege...
> Lifting the server siege...      done.
>
> Transactions:              862079 hits
> Availability:              100.00 %
> Elapsed time:              599.92 secs
> Data transferred:         2415.46 MB
> Response time:                0.20 secs
> Transaction rate:         1436.99 trans/sec
> Throughput:                4.03 MB/sec
> Concurrency:              281.62
> Successful transactions:      862079
> Failed transactions:               0
> Longest transaction:            0.55
> Shortest transaction:            0.00
>
> FILE: node1.log
>
>
> anirbanb2004@Anisoft-Corporation:~/www/loadTest/siegeLog$ siege -c1000 -d1
> -t10M -lnphp1.log http://localhost/loadTest/PHP/
> ** SIEGE 3.0.5
> ** Preparing 1000 concurrent users for battle.
> The server is now under siege...
> Lifting the server siege...      done.
>
> Transactions:             1193412 hits
> Availability:              100.00 %
> Elapsed time:              599.82 secs
> Data transferred:         3343.82 MB
> Response time:                0.00 secs
> Transaction rate:         1989.62 trans/sec
> Throughput:                5.57 MB/sec
> Concurrency:                5.58
> Successful transactions:     1193412
> Failed transactions:               0
> Longest transaction:            0.54
>
> Shortest transaction:            0.00
>
> FILE: nphp1.log
>
>
>
> On Wednesday, February 18, 2015 at 3:34:57 PM UTC-6, Anirban Bhattacharya
> wrote:
>>
>> Hi,
>> I am new to node. very new ..like infant.
>> Either I am doing something wrong or I understood everything wrong.
>> I wrote a node js simple JSON emitter which uses mysql module and query
>> (select *) from a single table haviing 100 records and outputs on page as
>> JSON (JSON.stringify..
>>
>> I wrote a PHP page which also does the same thing from same table(Apache).
>>
>> I used Siege for load test and surprisingly it shows better values for the
>> PHP than that of node .. see below the output of siege
>> ==================NODE=================
>> anirbanb2004@Anisoft-Corporation:~$ siege -c100 -d1 -t10M -lnode.log
>> http://localhost:9615/
>> ** SIEGE 3.0.5
>> ** Preparing 100 concurrent users for battle.
>> The server is now under siege...
>> Lifting the server siege...      done.
>>
>> Transactions:              119236 hits
>> Availability:              100.00 %
>> Elapsed time:              599.74 secs
>> Data transferred:          403.00 MB
>> Response time:                0.00 secs
>> Transaction rate:          198.81 trans/sec
>> Throughput:                0.67 MB/sec
>> Concurrency:                0.61
>> Successful transactions:      119236
>> Failed transactions:               0
>> Longest transaction:            0.05
>> Shortest transaction:            0.00
>>
>> FILE: node.log
>> =================PHP==================
>> anirbanb2004@Anisoft-Corporation:~$ siege -c100 -d1 -t10M -lphp.log
>> http://localhost/loadTest
>> ** SIEGE 3.0.5
>> ** Preparing 100 concurrent users for battle.
>> The server is now under siege...
>> Lifting the server siege...      done.
>>
>> Transactions:              119632 hits
>> Availability:              100.00 %
>> Elapsed time:              599.47 secs
>> Data transferred:           34.58 MB
>> Response time:                0.00 secs
>> Transaction rate:          199.56 trans/sec
>> Throughput:                0.06 MB/sec
>> Concurrency:                0.12
>> Successful transactions:       59858
>> Failed transactions:               0
>> Longest transaction:            0.03
>> Shortest transaction:            0.00
>>
>> FILE: php.log
>>
>> can anyone please help me understand what is wrong here? I understand some
>> scenario will be there where PHP will perform better. What scenario should I
>> create to test Node is better?
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "nodejs" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nodejs/mf0Qhj1WVl8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/cf93b58d-37d5-4eb1-8354-44b5589f8198%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 


THOMAS BOUTELL, DEV & OPS
P'UNK AVENUE | (215) 755-1330  |  punkave.com

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAORXhG%2BO2kzjVRrHXUEvexS8qO8iu6YcbETbNUnBorJTbEQVRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to