dayuloli
dayuloli

Reputation: 17031

What does each Meteor processes do?

New to Meteor and not very good with Linux here. On Meteor v1.0.1, development mode. When I run top on my server running only my Meteor app, I see three main processes associated with the app.

  PID USER   PR   NI   VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                                         
15445 root   20   0 1367736 443624   2792 S 10.3 43.8   6:09.26 [dir]/.meteor/packages/meteor-tool/.1.0.36.1rumazb++os.linux.+
15517 root   20   0  830796 107040   3172 R  3.0 10.6   1:07.75 [dir]/.meteor/packages/meteor-tool/.1.0.36.1rumazb++os.linux.+
15468 root   20   0  813608  36348   1824 S  0.3  3.6   0:04.82 [dir]/.meteor/packages/meteor-tool/.1.0.36.1rumazb++os.linux.+

I want to know what these three processes do. Is one allocated for accessing MongoDB? And what's the one that's taking up so much memory (444MB)? The reason I am asking is because I ran out of memory on my server, and I want to get to the root of it.

Upvotes: 0

Views: 156

Answers (1)

imslavko
imslavko

Reputation: 6676

The Meteor process that is consuming 10% CPU and a lot of memory is the one that is here only for the development mode. This process is acting as a continuous support process for the development cycles:

  • watches the file system and triggers recompilation on a change by the developer
  • resolves packages conflicts and dependencies by running a constraint solver
  • proxies all the requests to localhost:[port] to the app process, doesn't hang up connections in case the app process is restarting (after a recompilation)
  • starts up and configures MongoDB with a replicaset set up (for oplog tailing that app process will perform) and monitors its state

Upvotes: 1

Related Questions