Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nodejs is single process, single thread and single core. Chrome used to run different tabs as threads of a process but that ended since Spectre and Meltdown. Back to single process since then.

  async IO creates a thread servicing that IO request
Nope. The event is a single FIFO queue implemented with libuv. It differentiates between sync and async function and basically goes around the queue running synchronous functions to completion every time it find one and async ones for a set time before switching to next one.


> Nodejs is single process, single thread and single core.

ps -eLf disagrees:

  $ ps -eLf|grep node
  deploynode     16438 16173 16438  0   11 00:21 pts/6  00:00:01 /opt/bin/node node-le-manager-api 3550
  deploynode     16438 16173 16439  0   11 00:21 pts/6    00:00:00 /opt/bin/node node-le-manager-api 3550
  deploynode     16438 16173 16440  0   11 00:21 pts/6    00:00:00 /opt/bin/node node-le-manager-api 3550
  deploynode     16438 16173 16441  0   11 00:21 pts/6    00:00:00 /opt/bin/node node-le-manager-api 3550
  deploynode     16438 16173 16442  0   11 00:21 pts/6    00:00:00 /opt/bin/node node-le-manager-api 3550
  deploynode     16438 16173 16443  0   11 00:21 pts/6    00:00:00 /opt/bin/node node-le-manager-api 3550
  deploynode     16438 16173 16444  0   11 00:21 pts/6    00:00:00 /opt/bin/node node-le-manager-api 3550
  deploynode     16438 16173 16445  0   11 00:21 pts/6    00:00:00 /opt/bin/node node-le-manager-api 3550
  deploynode     16438 16173 16446  0   11 00:21 pts/6    00:00:00 /opt/bin/node node-le-manager-api 3550
  deploynode     16438 16173 16447  0   11 00:21 pts/6    00:00:00 /opt/bin/node node-le-manager-api 3550
  deploynode     16438 16173 16448  0   11 00:21 pts/6    00:00:00 /opt/bin/node node-le-manager-api 3550
  deploynode     16579  8353 16579  0    1 00:27 pts/4    00:00:00 grep node


> Chrome used to run different tabs as threads of a process but that ended since Spectre and Meltdown. Back to single process since then.

Chrome supports several different process models, apparently, but as Spectre/Meltdown (as well as future renderer and UXSS bugs) mitigation it now by default runs a minimum of one process per site/origin (site isolation). See https://www.chromium.org/developers/design-documents/process... and https://www.chromium.org/Home/chromium-security/site-isolati...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: