5 ms·
Benchmarking shared memory vs message passing on OS X
- omgtehlion 10y agoIt is not really benchmarking. And not really about shared memory. Sorry for being rude.
- invalid_name 10y agoIndeed I'm not merely speaking about shared memory, you can find anything anywhere about it. If you had really taken the time to read it, you would have just figured it out.
- gumby 10y agoIt is rude. You can say "I don't consider this benchmarking; benchmarking would be XXX" etc. Just to say "you failed" says more about you than this article (which does need work).
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- invalid_name 10y agoWhat kind of work would it need sorry? Anyway I can understand this may not seem to be real benchmarking, while writing it eventually became almost an excuse, the very original purpose was to kinda verify my Prof's thesis, whether was really right or not. My intention was not even about to utterly speak about benchmarking nor shared memory (which I both tried to cover though).
- gumby 10y agoFirst of all, your article was fine: you had a question, you thought about it a little and got some data, and wrote it up. More people should do this. As an article it's not particularly clear in method or presentation. It's not especially clear in what it's measuring, process, isolation of variables. But it's not attempting to be a journal article. So that's not what I meant about "needs work" (though it is hard to pull the message out of the wording). But I don't think it supports your thesis. Again, thats part of what the web is about (not every posting should be a well polished pearl) so I"m glad you posted this. If you cared though, I'd improve your process. This post might not be worth rewriting though -- that's up to you.
- invalid_name 10y agoYes, I got what you meant, and I know that some parts, especially those which cover measuring, should perhaps be investigated deeper. I'll outline the objectives better next time.
- fenollp 10y ago> I have done multiple tests and then took an average, don't know how much these results can be reliable (since to get statistics more plausible we perhaps should have allocated much more memory). Yep. Nothing to see here
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- invalid_name 10y agoWanted to just note down the numbers I got by timing, as then I said, I wanted to remark that was interesting how they are being used complementarily and had fun to implement them.
- mainframe-mess 10y agoSidebar: Apple's desktop operating system hasn't been called OS X for almost a year. There are no graphs, how is this a benchmark?
- invalid_name 10y agoI haven't even thought about graphs, I just called 'benchmark' the output of time(1).
- paulddraper 10y agoWhat is the OS?
- astrodust 10y agomacOS.
- paulddraper 10y agoReally?? I remember macOS. https://upload.wikimedia.org/wikipedia/en/thumb/b/b9/MacOS_original_logo.svg/300px-MacOS_original_logo.svg.png https://upload.wikimedia.org/wikipedia/en/thumb/b/b9/MacOS_o...
- gumby 10y agoWhy does a graph define a "benchmark"? A table of data is equivalent to a graph. He only has four datapoints anyway, and the deltas are so small that a graph would be deceptive. BTW a literal mark on a bench is just that.
- muizelaar 10y agoThis article is very difficult to follow. It seems to be timing the difference between mach_msgs and System V semaphores. It does not seem to be comparing shared memory vs message passing.
- luckydude 10y agoAs a benchmarking guy, this is pretty basic. You might take a look at lmbench, it's open source, you could use all the timing infrastructure it provides and provide much better results. Reading that code would be educational (and it's very small). Paper here: http://mcvoy.com/lm/bitmover/lmbench/lmbench-usenix.pdf http://mcvoy.com/lm/bitmover/lmbench/lmbench-usenix.pdf BTW, if someone has a better starting point, please share. lmbench is just what I happen to know.
- faragon 10y agoTitle should be: "Benchmarking OS X semaphores vs message passing". Shared memory + spinlocks should be much faster than shared memory + semaphores (much faster, if implemented properly, e.g. spinlock + timeout, on timeout queue another message, again spinlock and try to copy all the elements, etc.).
- Inufu 10y agoIt looks like what you are actually timing is the time it takes to start a process - time for either communication method should be on the order of microseconds or less. For better results, start the two processes first, then measure how long it takes to send a message from process a to b and back to a.
- xtreme 10y agoShared memory can be a lot faster than that. MPI libraries report ~0.25 us for 1 Byte and ~400us for 4MB transfers using shared memory.