title: Node.js high virtual memory usage
body: <p>We are trying to setup Node.js + Socket.io. Our last concern is memory usage. We are starting our simple server (code below) and virtual memory usage of this process is ~600 mb.</p>
  
  <pre><code>1000      6463  0.0  0.4 635816 19260 pts/1    Sl+  12:51   0:00 node /home/data/server.js
  </code></pre>
  
  <p><strong>server.js</strong>:</p>
  
  <pre><code>var express = require('express');
  var app = express.createServer(), io = require('socket.io').listen(app);
  
  app.listen(8000);
  
  io.set('flash policy port', 8001);
  io.enable('browser client minification');  // send minified client
  io.enable('browser client etag');          // apply etag caching logic based on version number
  io.set('log level', 1);
  io.set('transports', [
      'websocket'
    , 'flashsocket'
    , 'htmlfile'
    , 'xhr-polling'
    , 'jsonp-polling'
    ]);
  
  io.sockets.on('connection', function (socket) {
    socket.on('distribute', function (data) {
          if(typeof data.key == 'undefined' || (typeof data.key != 'undefined' &amp;&amp; data.key != 'randomstringforsecurityreason')){
                  return false;
          }
          delete data.key;
          socket.broadcast.to(data.channel).emit('eat', data);
    });
  
    socket.on('pukpuk', function(data) {
          if(typeof data == "string"){
                  socket.join(data);
          } else {
                  for(var i in data)
                  {
                      socket.join(data[i]);
                  }
          }
    });
  });
  </code></pre>
  
  <p>It is normal? So big virtual memory usage?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Ok, I found that it's pretty normal. <a href="http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/17482" rel="noreferrer">http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/17482</a></p>