Skip to content

Special threat for outgoing information and for ingoing information trought IPC #37062

Closed
@anor731

Description

@anor731

Sockets for receiving information will have single threat special for itself, if information arrived on socked, data will be merged to main threat, same for outgoing sockets but there data will be send along with doing another process.

On those CPU's with some cores and twice as much threats, it could highly reduce latency of interprocess communication.

Please consider this as serious thing. Like that, you have l1 core, for both threats if I'm not correct correct me, but those data get diverged and merged at L1 cache instantly, and it'll work better.

If we have one process, that has something like input of 42k objects of simple graph nodes per second, and it have to deliver it to database, it's faster if receiving runs in one threat, sorting in another and sending in another...

Like this, we can use Ryzen and Threadripper technologies of IPC that works on basis of streams, which is very efficient for stream processors, if they're split into various processes, and therefore we can achieve maximum of node's performance.

Even for tasks like getting distribution of change from processor trough websockets, it's better, because distribution runs in single threat, and another threat on processor can still react on change or whatever, or it can actually change, while the alternative threat is delivering chance in cycles of threat syncs and split...

Essentially, when you send to by socket, you read data that are arranged by set of pointers to be read from memory, now it's same threat in new node it can be another, therefore it just reads data that are not writtable, because if those data was written in there would be new pointer to their copy where write happened.

Where we're recieving, we got this one threat, that's pumping data into proccess, and on every sync, therefore something like one line of stdout to another stdin, can be being loading on one threat, while another is sorting just loaded data, therefore it's twice that fast.

Please code it, I don't orientate in this C++ mess node is. It's like function calls and stuff doesn't make sense to me and it'll take me like two weeks to code this, and I have better stuff to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions