#13 see if we can get rid of the message Arc in client

Fermé
Créé il y a 1 an par j3tracey · 1 commentaires

In the name of code reuse with peer mode, we put the messages in the channel between the state machine and the writer thread in an Arc. There's nothing wrong with this for correctness, but since a message only ever gets sent over one connection from the client, it's strictly overhead, and as a synchronization primitive, it forces cache coherence across NUMA nodes, which can be a major hit for performance (not that we won't be using tons of synchronization primitives anyway). We should see if there's an easy way to preserve code reuse while getting rid of this, likely through generics.

In the name of code reuse with peer mode, we put the messages in [the channel between the state machine and the writer thread](https://git-crysp.uwaterloo.ca/j3tracey/MGen/src/a77581b348197a48442afb1e2919749aa56060f3/src/bin/client.rs#L27) in an [Arc](https://doc.rust-lang.org/std/sync/struct.Arc.html). There's nothing wrong with this for correctness, but since a message only ever gets sent over one connection from the client, it's strictly overhead, and as a synchronization primitive, it forces cache coherence across NUMA nodes, which can be a major hit for performance (not that we won't be using tons of synchronization primitives anyway). We should see if there's an easy way to preserve code reuse while getting rid of this, likely through generics.
Justin Tracey a commenté il y a 1 an
Propriétaire

Fixed via 1d900f96b3

Fixed via 1d900f96b3
Connectez-vous pour rejoindre cette conversation.
Pas d'étiquette
Aucun jalon
Pas d'assignataire
1 Participants
Chargement…
Annuler
Enregistrer
Il n'existe pas encore de contenu.