lukego / blog

Luke Gorrie's blog
565 stars 11 forks source link

Distributed systems in an alternative universe #15

Open lukego opened 8 years ago

lukego commented 8 years ago

Consider distributed system programming in this universe:

Do you recognize that universe? If you are into mechanical sympathy then you might because this is a description of a normal x86 server when viewed through the lens of 90s computing:

I find this a useful mental model for thinking about software performance. The way we would optimize distributed systems software for a network like this is also the way we should optimize application software running on x86 servers.

For example, considering Are packet copies cheap or expensive? is like comparing the performance of mv, cat, and cp over NFS. We might expect mv to be fast because the data never has to pass over the wire. How about cat and cp though? This is complicated: you have to consider the relative cost of the latency to request data, the cost of the bandwidth (remembering that the network is full-duplex), the wider implications of taking a read vs write lock on the data, and what else you are planning to do with the data (cp may actually speed up the application if it copies the file onto local storage for further operations).

Next thought: I would never try to troubleshoot network performance problems without access to basic tools like Wireshark. That is where you can see problems due to Nagle's algorithm, delayed acks, small congestion windows, zero windows, and so on. So what is the Wireshark for MESIF?

javajosh commented 8 years ago

Hey! This is thought-provoking but I wonder how you can justify the analogy between asymmetric execution ports and (symmetric) CPU cores. E.g. Ports 6 and 7 were introduced with Haswell and are specialized to do math/branching, and address store, respectively. So how do you justify treating each execution port as a "core"? Thanks.

halayli commented 8 years ago

I think Intel PCM & CMT are a good start.

https://software.intel.com/en-us/articles/intel-performance-counter-monitor

chrismatthieu commented 8 years ago

Interesting thought process ;)

Have you seen http://computes.io? I've been building an HPC supercomputer that can distribute javascript functions/operations to any/all cores on a globally distributed network. These cores can share memory via firebase and storage via IPFS and message each other in realtime as well...