Skip to content
This repository was archived by the owner on Oct 10, 2018. It is now read-only.
This repository was archived by the owner on Oct 10, 2018. It is now read-only.

I tested socket.io with websocket-bench both on Windows and Ubuntu, why did it got difference performance? #48

@xiqincai

Description

@xiqincai

On Windows:
I installed websocket-bench 0.0.3, I tried to test total 6000 connections and concurrent connection per second is 100, in the total report, the duration is 60 seconds.

total report

┌────────┬─────────────┬────────┬──────────
│ Number │ Connections │ Errors │ Message Send │ Message Fail │ Duration(ms) │
├────────┼─────────────┼────────┼──────────
│ 6000 │ 6000 │ 0 │ 0 │ 0 │ 60086 │
└────────┴─────────────┴────────┴──────────

On Ubuntu: (4-core, 4G)
I installed websocket-bench 0.0.3 too. At the first time, I tried to test total 6000 connections and concurrent connection per second is 100, there are only around 4000 connection are successful, rest connections failed because connection timed out (over than 20 seconds).
I just changed the property 'timeout' for the connection from 20s to 50s in manage.js, so all connections are successful. The manage.js is in my path: /usr/local/lib/node_modules/websocket-bench/node_modules/socket.io-client/lib/manage.js
In the total report, the duration is around 94 seconds.

total report

┌────────┬─────────────┬────────┬──────────────┬──────────────┬──────────────┐
│ Number │ Connections │ Errors │ Message Send │ Message Fail │ Duration(ms) │
├────────┼─────────────┼────────┼──────────────┼──────────────┼──────────────┤
│ 6000 │ 6000 │ 0 │ 0 │ 0 │ 94444 │
└────────┴─────────────┴────────┴──────────────┴──────────────┴──────────────┘
The cpu of nodejs was not high, it kept around 40% - 50% during connecting.

Why was it so slow on Ubuntu when cpu was not high?
Could you please help me?
Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions