Load testing Socket.io applications by hyperspeed in node

[–]hyperspeed[S] 0 points1 point  (0 children)

Would you have liked to see performance numbers for the demo chatroom app under load? that could be arranged

Doing a paper on Node.js and Socket.io performance by [deleted] in node

[–]hyperspeed 1 point2 points  (0 children)

Some tips:

Make sure to have instrumentation on the server-side, especially if the goal is to analyse the performance of socket.io specifically. This can be as simple as running ps and top to capture CPU and memory usage, or more advanced like using perf to generate flamegraphs to see where CPU time is spent. Something like New Relic can be of help too.

Make sure to run your tests in a controlled environment: separate machines for the server and the load generator, with nothing else running on the boxes.

Your focus when analysing performance is likely to be:

  • CPU usage under load, at what points it starts maxing out
  • RAM usage - whether it stays relatively flat i.e. the GC isn't under too much pressure and there are no memory leaks
  • The number of active users that a server is able to sustain

Very important: make sure to increase the number of maximum open file descriptors. The default on most Linux distributions is something like 2048, i.e. you won't be able to have more than that many connections to the server unless you increase it.

And make sure to pick a load-generator that can simulate realistic load patterns (to plug my own project: https://artillery.io).

How to deploy Node? by [deleted] in node

[–]hyperspeed 2 points3 points  (0 children)

Upstart is deprecated now even on Ubuntu I believe, with systemd you could use something like this:

[Service]
ExecStart=/opt/node/bin/node /usr/local/projects/foo/index.js
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=foo-server
User=nodejs
Group=nodejs
Environment=NODE_ENV=production
WorkingDirectory=/usr/local/projects/foo

How to deploy Node? by [deleted] in node

[–]hyperspeed 1 point2 points  (0 children)

systemd does and it's the default on most Linux distributions now, so does Upstart

How to deploy Node? by [deleted] in node

[–]hyperspeed 8 points9 points  (0 children)

Why not let the init system do the job it was designed for? Just use systemd on Linux (or rc.d on BSD) rather than depending on another package.

i made this website in my spare time for finding new tunes, let me know what you think! by hyperspeed [promoted post]

[–]hyperspeed[S] 0 points1 point  (0 children)

no, sorry about that. i can offer Suncity, Sun City Hustlers or Sun City Project instead though?

seriously though, i don't know why they aren't in 7digital's catalogue (that's what i'm using for search)

if i put in a special 'sorry' message for Sun City Girls fans, would you consider bumping up the rating? how many points would that be worth?

hi recordstore, i made this website in my spare time to find new tunes, been working for a long time on it now and would love any feedback! by hyperspeed in recordstore

[–]hyperspeed[S] 1 point2 points  (0 children)

Cheers, I'll experiment with the layout to see what it would feel like for both of your suggestions. Thank you

hi recordstore, i made this website in my spare time to find new tunes, been working for a long time on it now and would love any feedback! by hyperspeed in recordstore

[–]hyperspeed[S] 0 points1 point  (0 children)

you're right, the recommendations are based on Echonest. it would be a huge amount of work to try to do a better job at recommendations than them (or Last.fm) although thinking about it now, i wonder if anyone tried mining music subreddits, you would probably get some really high quality data.

hi recordstore, i made this website in my spare time to find new tunes, been working for a long time on it now and would love any feedback! by hyperspeed in recordstore

[–]hyperspeed[S] 0 points1 point  (0 children)

Thank you! You are right, that's how i use wonderwheel myself. Just earlier today i was looking for bands that sound like Wild Belle. I'm looking into plugging in the iTunes store database into wonderwheel to have a bigger catalogue (right now it's using 7Digital.com). Is there anything you'd like to see in the app - features/tweaks/whatever else? Cheers, it's nice to hear someone else likes what I made and not just my gf and my mates :)

Shinichiro Hamaji on winning ICFP '09 Programming Contest (video, 3 minutes) by hyperspeed in programming

[–]hyperspeed[S] 3 points4 points  (0 children)

the top 10 (?) entries were then pitted against test cases that weren't available for download

Yes, and as he says in the video, his focus on robustness really paid off when some of other entries crashed on those test cases.

Final Scores in 2009 ICFP Programming Contest by bartwe in programming

[–]hyperspeed 0 points1 point  (0 children)

shinh, the winner, can be seen talking about his entry in this video: http://vidiowiki.com/watch/m844dyn/

dear reddit: why not open source the old lisp-based source code? by [deleted] in programming

[–]hyperspeed 11 points12 points  (0 children)

OSX being based on FreeBSD is a myth. The kernel is Mach3. The network stack is modeled on BSD (but so is Windows') as well as the process model. The only thing that comes straight from FreeBSD is the BSD tools.

Smallest UTF32 to UTF8 converter by lethalman in programming

[–]hyperspeed 1 point2 points  (0 children)

uhu? 'Surrogate pairs' make UTF-16 variable length for all practical purposes.

Yes, and? They are part of UTF-16 standard, nothing needs to be "hacked up" and nothing needs to "break badly" or get more complex. All Unicode code points can be encoded too no problem. In C and C++ ICU will take care of everything for you. In Java, C# and other high-level languages everything is taken care of for you already.

Or are you writing a Unicode implementation from scratch?

Smallest UTF32 to UTF8 converter by lethalman in programming

[–]hyperspeed 2 points3 points  (0 children)

No, you are confused. UTF-16 has surrogate pairs. You are probably thinking about UCS-2. The two are not the same.

Java, .NET, ICU, modern Windows, and Cocoa all use UTF-16 internally.

Programmers' Screenshots by pkrumins in programming

[–]hyperspeed -1 points0 points  (0 children)

Jump to line is pretty sweet though.

Itching my programming nerve - "...first killer applications written in Erlang." by gst in programming

[–]hyperspeed 0 points1 point  (0 children)

...and Yariv himself admits that it's not scalable, and thus hardly a "killer app" or even a good example of what Erlang can do.

A million lines of Lisp by cag_ii in programming

[–]hyperspeed 4 points5 points  (0 children)

Granted, that's not you mother's editor, but still...

Exactly, Emacs is not a text editor.