Giter Site home page Giter Site logo

Comments (4)

auscaster avatar auscaster commented on September 22, 2024

Yes that should be all you need to compile correctly, although it does seem slow. Can you please add VERBOSE=1 to the CMake commands and send the the full build command? Also what architecture are you running? What results do you get from a basic nodejs echo server?

I just tried it myself on an ubuntu 16.10 virtualbox installation with 4 cores and got the following, and the result was pretty damn fast:

wrk -d10s --timeout 2s http://localhost:1337
Running 10s test @ http://localhost:1337
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   430.91us  521.60us  13.94ms   98.29%
    Req/Sec    12.95k     1.55k   15.63k    70.00%
  257774 requests in 10.01s, 24.34MB read
Requests/sec:  25762.27
Transfer/sec:      2.43MB

from libsourcey.

diorahman avatar diorahman commented on September 22, 2024

This is the log: log.txt

Also what architecture are you running?

$ dpkg --print-architecture
amd64
$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 78
Model name:            Intel(R) Core(TM) i7-6560U CPU @ 2.20GHz
Stepping:              3
CPU MHz:               499.914
CPU max MHz:           3200.0000
CPU min MHz:           400.0000
BogoMIPS:              4415.86
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              4096K
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp

What results do you get from a basic nodejs echo server?

With following code:

var http = require('http');
var server = http.createServer(function (request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.end("Hello World\n");
});
server.listen(8000);
$ ./wrk -d10s --timeout 2s http://localhost:8000
Running 10s test @ http://localhost:8000
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   376.71us  454.50us  16.41ms   99.05%
    Req/Sec    14.37k     1.25k   14.97k    96.53%
  288938 requests in 10.10s, 42.99MB read
Requests/sec:  28608.71
Transfer/sec:      4.26MB

from libsourcey.

auscaster avatar auscaster commented on September 22, 2024

Thanks for your response. The build certainly seems to be in order, and there is no apparent reason for the slowness on your architecture. Sorry I can't be of more help right this moment, but I will certainly be running some more tests on other boxes and profiling when I have a spare few hours.

from libsourcey.

auscaster avatar auscaster commented on September 22, 2024

Hello there, since your bug request I've been looking deep into the cause of your performance issues and it looks like I have found the root. The garbage collection interval was slightly too large which was choking the event loop under a huge connection load when too much memory was being freed at once.

I've made a number of other performance updates to both the net and http modules and the result is the echo server is consistently performing almost twice as fast as nodejs.

$ wrk -d10s --timeout 2s http://localhost:1337
Running 10s test @ http://localhost:1337
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   265.76us  472.62us  12.42ms   97.51%
    Req/Sec    18.84k     1.26k   21.57k    74.50%
  375060 requests in 10.01s, 20.39MB read
Requests/sec:  37461.50
Transfer/sec:      2.04MB

I would be very interested to hear your thoughts and findings. Thanks again :)

from libsourcey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.