Mia
Mia

Reputation: 6531

Socket.io CPU and Ram usage

Recently started playing with socket.io on my Digital Ocean droplet (1 core 1gb ram). I'm currently playing with twitter streams.

Currently, there is a single twitter stream which emits tweets only. The client takes the tweets and prints them to DOM.

The CPU usage is constantly moving back and fourth between 60& and 15% (generally arund 30-40) and ram usage is around 150mb.

This seems very weird to me as without socket.io things are a lot calmer.

Do you know what might be going on here?

Upvotes: 1

Views: 1996

Answers (1)

dkran
dkran

Reputation: 284

If you're using node, 150mb ram might not be that atypical. node starts around ~100mb. Do you have any sort of console logging feature to check when your events are being emitted? there might be lots of things you aren't seeing, and marking them with console.log statements might make it very apparent

Upvotes: 1

Related Questions