<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Youwei Zhuo on Medium]]></title>
        <description><![CDATA[Stories by Youwei Zhuo on Medium]]></description>
        <link>https://medium.com/@youweizhuo?source=rss-4dc36b2b536c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DKAibnnBQHjdZwxr.jpg</url>
            <title>Stories by Youwei Zhuo on Medium</title>
            <link>https://medium.com/@youweizhuo?source=rss-4dc36b2b536c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:44:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@youweizhuo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Concurrent Lock Free SPSC Queue]]></title>
            <link>https://medium.com/@youweizhuo/concurrent-lock-free-queue-c9abd8bf700d?source=rss-4dc36b2b536c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9abd8bf700d</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-structures]]></category>
            <dc:creator><![CDATA[Youwei Zhuo]]></dc:creator>
            <pubDate>Tue, 10 Oct 2017 07:54:16 GMT</pubDate>
            <atom:updated>2017-11-27T02:19:20.914Z</atom:updated>
            <content:encoded><![CDATA[<p>An Overview</p><h3>Literature Review</h3><h4>TOPLAS’83: Specifying concurrent program modules</h4><p>Lamport queue. Classic</p><h4>PPoPP’08: Fastforward for efficient pipeline parallelism: a cache-optimized concurrent lock-free queue</h4><p>Fastforward queue. Use queue data instead of head/tail flag as status indicator. Avoid cache thrashing of shared head/tail.</p><h4>ICS’09: Practice of parallelizing network applications on multi-core architectures</h4><p>Batch.</p><h4>IPDSP’10: A lock-free, cache-efficient multi-core synchronization mechanism for line-rate network traffic monitoring</h4><p>MCRingBuffer. Cache and batch.</p><h4>IJPP’13: B-Queue: Efﬁcient and practical Queuing for Fast<br>Core-to-Core Communication</h4><p>B-Queue. Adaptive batch size.</p><h3>Implementation</h3><p>I have reproduced the above designs in <a href="http://www.github.com/zhuoyw/CLFQ">CLFQ</a>. (The lock free ring buffer in intel DPDK rte library is a Lamport queue with caching.)</p><p>The code should only be used to demonstrate ideas in the papers above. I would recommend writing assembly code if one really cases about performance. However, the current implementation is pretty fast. I included a simple benchemark and on my E5–2630 v3 server, throughput is &gt;300Mop/s for 8 byte messages (i.e. ~8ns or 25cycles per message).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9abd8bf700d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Ratings of Detective Stories]]></title>
            <link>https://medium.com/@youweizhuo/my-ratings-of-detective-stories-7fe5ce85b8d2?source=rss-4dc36b2b536c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fe5ce85b8d2</guid>
            <dc:creator><![CDATA[Youwei Zhuo]]></dc:creator>
            <pubDate>Mon, 02 Oct 2017 06:05:24 GMT</pubDate>
            <atom:updated>2017-10-02T06:05:24.069Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://docs.google.com/spreadsheets/d/1HSWW5E17u6VexsINulbH1dXHo3igOn6UxCACX_BNi0s/edit?usp=sharing">长篇推理小说评分</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fe5ce85b8d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[InfiniBand]]></title>
            <link>https://medium.com/@youweizhuo/infiniband-20a9f80df7ff?source=rss-4dc36b2b536c------2</link>
            <guid isPermaLink="false">https://medium.com/p/20a9f80df7ff</guid>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Youwei Zhuo]]></dc:creator>
            <pubDate>Sun, 17 Sep 2017 04:54:53 GMT</pubDate>
            <atom:updated>2017-09-20T21:11:37.744Z</atom:updated>
            <content:encoded><![CDATA[<h4>Note</h4><h3>Overview</h3><p>I am a little confused when I try to give a good title to this note. Should it be RMDA, InfiniBand, RoCE, IBoE, IPoIB, or just Mellanox :D?</p><p>InfiniBand may refer to 2 things: 1. a low-level physical protocol. 2. a high-level programming API, which implementes the idea of RDMA. RDMA is the abbreviation for Rmote Direct Memory Access. It features communication without kernel intervention.</p><p>In my opinion, RDMA/InfiniBand is a correspodence of Ethernet/socket-based programming, an alternative networking stack.</p><p>RoCE, i.e. IBoE and IPoIB are attempts to support socket-based legacy applications over InfiniBand. [<a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/ch-Configure_InfiniBand_and_RDMA_Networks.html#sec-Understanding_InfiniBand_and_RDMA_technologies">Ref</a>]</p><h3>Hardware</h3><p>Infiniband adapter.<br>Infiniband switch.<br>See lastest user manual for your model.</p><h3>Software</h3><h4>Installation</h4><p>There are 4 ways to install <a href="http://www.rdmamojo.com/2014/08/24/rdma-packages/">software packages</a>: <br>1. <a href="http://www.rdmamojo.com/2014/12/27/installation-rdma-stack-manually/">Build from source</a>. <br>2. <a href="http://www.rdmamojo.com/2014/10/11/working-rdma-redhatcentos-7/">Packages with Linux distribution</a>. [<a href="http://www.mellanox.com/page/inbox_drivers">Mellanox</a>]<br>3. <a href="http://www.rdmamojo.com/2014/11/30/working-rdma-using-ofed/">OFED (OpenFabrics Enterprise Distribution)</a>. <br>4. <a href="http://www.rdmamojo.com/2014/11/22/working-rdma-using-mellanox-ofed/">Mellanox OFED</a>. [<a href="http://www.mellanox.com/page/products_dyn?product_family=26&amp;mtag=linux_sw_drivers">Mellanox</a>]</p><p>sudo modprobe -r ib_srpt xprtrdma ib_isert</p><h4>Verification</h4><p>After installation, verify RDMA (lsmod, service, ibstat/ibv_devinfo, ibping, iblinkinfo) [<a href="http://www.rdmamojo.com/2015/01/24/verify-rdma-working/">Blog</a>][<a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Testing_Early_InfiniBand_RDMA_operation.html">RedHat</a>][<a href="https://www.ibm.com/support/knowledgecenter/en/linuxonibm/performance/howtos/infinibandintro.htm">IBM</a>]. Configure and verify IPoIB (ping, ethtool, ibdump)[<a href="http://www.rdmamojo.com/2015/04/21/working-with-ipoib/">Blog</a>][<a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Testing_an_RDMA_network_after_IPoIB_is_configured.html">RedHat</a>].</p><h4>libibverbs</h4><p>See latest user manual. [<a href="http://www.mellanox.com/related-docs/prod_software/RDMA_Aware_Programming_user_manual.pdf">Mellanox</a>]</p><h4>Performance Tuning</h4><p><a href="https://community.mellanox.com/docs/DOC-1523">mlnx_tune</a></p><p><a href="https://community.mellanox.com/docs/DOC-2489">https://community.mellanox.com/docs/DOC-2489</a></p><h4>IPoIB Architecture</h4><p>Subnet Manager. MAC address: 20 bytes. VLAN: SM. [<a href="https://tools.ietf.org/html/rfc4392">RFC</a>]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20a9f80df7ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On Going Home]]></title>
            <link>https://medium.com/@youweizhuo/norton-reader-digest-a330b2afd7a9?source=rss-4dc36b2b536c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a330b2afd7a9</guid>
            <category><![CDATA[nostalgia]]></category>
            <dc:creator><![CDATA[Youwei Zhuo]]></dc:creator>
            <pubDate>Sat, 09 Sep 2017 06:38:04 GMT</pubDate>
            <atom:updated>2017-09-09T06:40:44.296Z</atom:updated>
            <content:encoded><![CDATA[<h4>Personal Thoughs</h4><p>I love the writing style of Joan Didion.</p><p>Though I could not quite understand every sentence when reading it for the first time, I can feel empathy. The lifestyle of her remote town in US reminds me of my isolated mountain village in China. I also once opened the drawers in the old house and spent an day reflecting on the old time…</p><p>The only difference is that we, my father and I, come back to the graveyards quite frequently-at least twice a year even when I went to college. The memories are broken, but the materializations have been better preseved.</p><p>However, as Joan stated in the end of her essay, memories and its evidence will finally disappear. The question is, which part of home I would like to pass on, and what new memories of home can I create for my children…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a330b2afd7a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Impossible Crimes]]></title>
            <link>https://medium.com/@youweizhuo/footprints-and-impossible-crimes-8bf3846980a0?source=rss-4dc36b2b536c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bf3846980a0</guid>
            <category><![CDATA[review]]></category>
            <category><![CDATA[fiction]]></category>
            <dc:creator><![CDATA[Youwei Zhuo]]></dc:creator>
            <pubDate>Thu, 07 Sep 2017 07:59:33 GMT</pubDate>
            <atom:updated>2017-10-17T06:28:51.150Z</atom:updated>
            <content:encoded><![CDATA[<h4>Note</h4><h3>The man from nowhere</h3><p>B(70). One footprint from the vctim and we were watching him dying. I am not a fan becuase the trick is trivial.</p><h3>The flying death</h3><p>B+(80). Three traces. One from the victim, the other two are suspected as trail of extinct vulture. The detection is unfair but on the whole the novel is good: It makes me thrilled when 3 narrators are killed consecutively!</p><h3>The flying corpse</h3><p>B+(80). A circus trick make it hard to get a better rating. However, I love the detective Mona. She is even more attractive when investigating independently, which would be a most scornful practise of bluffing detectives.</p><h3>The laughing butcher</h3><p>A(90). Two sets of footprints. The footprint of returning murderer is missing. When the dwarf appears on stage. it is natural to believe that he will play some part in the crime. But the end is still suprises me. More importantly, I would rather blame myself because the reasoning is fair.</p><h3>The sands of thyme</h3><p>B+(78). One footprint. As unfair as “The flying death” and the trick is similar in some way: special “skill” of some profession is the key. Note that the rating is quite good for a short-short story.</p><h3>The wrong problem</h3><p>B(65). Two tricks. The first one is boring and the second one is unfair. A charming murderer and polished landscape writting cannot save a detective novel.</p><h3>The locked bathroom</h3><h3>Room number 23</h3><p>B+(76). An easily discivered truth does not mean a bad trick. On the contrary, rigrous reasoning make it entertaining to read.</p><h3>The kestar diamond case</h3><p>B(70). A locked room in the strictest sense and the disclosure is such a great drama. But overall the story is far from great for lack of realism.</p><h3>The problem of the old oak tree</h3><p>B(70). Pilot opened his parachute in the air but found strangled after landing. A fresh “lock room” and a old trivial trick (even used in one of the novels above). I am such a fool not to recognize it…again…</p><h3>The invisible weapon</h3><p>C(60). Snow, ice, heat and you know what the weapon is. A(80) if it is read for the first time.</p><h3>The confession of Rosa Vitelli</h3><p>C(61). Gas murder, not my dish. It is fun that the detective in 1920s talk about an naive explanation of theory of realitivity to intimidate the murderer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bf3846980a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Locked Room to End Locked Room]]></title>
            <link>https://medium.com/@youweizhuo/the-locked-room-to-end-locked-room-d19d4b329137?source=rss-4dc36b2b536c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d19d4b329137</guid>
            <category><![CDATA[book-review]]></category>
            <category><![CDATA[fiction]]></category>
            <dc:creator><![CDATA[Youwei Zhuo]]></dc:creator>
            <pubDate>Wed, 06 Sep 2017 04:05:02 GMT</pubDate>
            <atom:updated>2017-10-10T06:46:14.405Z</atom:updated>
            <content:encoded><![CDATA[<h4>Note</h4><h3>Story</h3><p>Victim is found killed by an axe in the bedroom of a locked house. Locked doors and windows without any secrect tunnel. And when the crime is committed, the criminal must be in the house: Ax is found in the basement. How did he get out? The detective knows it when he saw the ashes in the incinerator.</p><p>“Victim Beheaded”(F1) implies “Not suicide”(C1). If this is not enough to convince you, “Weapon moved to basement”(F2) establishes that “Murderer must be in the house”(C2). Classic “Locked house”(F3) means “no one can get out”(C3). Finally, when police broke in, “Only victim is found”(F4). All the above facts and conclusions are true. But how can that be logical-obviously C2 and C3 together contradicts F4?</p><h3>Review</h3><p>It is not the end of locked room tricks, as its title claims. But with no doubt, it is one of the best.</p><h3>Spoiler</h3><p>The murderer commits suicide by burning himself to ashes. He got out by death.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d19d4b329137" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spectral Graph Theory 2]]></title>
            <link>https://medium.com/@youweizhuo/spectral-graph-theory-2-c1a19dfa0ffe?source=rss-4dc36b2b536c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1a19dfa0ffe</guid>
            <category><![CDATA[algebra]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Youwei Zhuo]]></dc:creator>
            <pubDate>Thu, 09 Feb 2017 07:39:33 GMT</pubDate>
            <atom:updated>2017-02-09T07:47:43.964Z</atom:updated>
            <content:encoded><![CDATA[<p>A personal view</p><p>In the previous post, we have covered the quadratic form of graph matrix and its application in identifying graph partitions. Graph partition (or cut/clustering) is a static characterization of graph structure. Now, we proceed to investigate dynamics over a graph, by treating graph matrix as linear transformation.</p><p>We have seen many examples that can be modeled as graph dynamics: the spread of ideas, information, or epidemics. To be more precise, in a dynamic process (1)each node is associated with some data and (2) they change with respect to edges. (3) the process continues over time.</p><p>In SGT, (1) the node data can be organized as a vector, (2) the updates are the multiplication of graph matrix (linear transformations) and (3) apply the matrix repeatedly.</p><p>If you are familiar with linear algebra, eigens are perfect mathematical characterizations of (3).</p><p>Some well-defined dynamics: Markov random walk, heat diffusion, lazy walk, etc. Each has its corresponding matrix.</p><p>Finally, static characterization can also be translated into our dynamic perspective. Hint: The conductance of subgraph S is equal to the probability that a single random walk step leaves S.</p><p>The matrix modeling for dynamics provides an elegant solution to a large number of problems in practise. So have we reached the end of our journey in SGT? Not even close! I have too much more applications to share but no idea which to start with…</p><p>Note: Most materials in this post come from the book “Scalable Algorithms for<br>Data and Network Analysis”. The title might be confusing, but its content is very enlightening.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1a19dfa0ffe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spectral Graph Theory 1]]></title>
            <link>https://medium.com/@youweizhuo/spectral-graph-theory-7fe55ce467b9?source=rss-4dc36b2b536c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fe55ce467b9</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algebra]]></category>
            <dc:creator><![CDATA[Youwei Zhuo]]></dc:creator>
            <pubDate>Tue, 07 Feb 2017 00:18:19 GMT</pubDate>
            <atom:updated>2017-02-09T07:43:30.754Z</atom:updated>
            <content:encoded><![CDATA[<p>A personal view</p><p>Spectral Graph Theory studies the algebra abstraction (i.e. matrix) of graphs.</p><p>In basic graph theory, we are all familiar with some <strong>matrix representations</strong> of graphs, such as adjacency matrix A and edge adjacency matrix U. To store graphs in computers, we have adjacency list, compressed sparse row/column and some other advanced <strong>data structures</strong> for better locality. SGT is an extension to the former (featuring eigenvectors and eigenvalues), and not concerned with the latter (implementation and efficiency).</p><p>The center of SGT is matrix and matrix can do more than edge representation.</p><p>First, matrix is a <strong>linear transformation</strong>. Usually, we multiply it with a nby1 vector, which represents the vertex data. I will leave the application of this part in future posts.</p><p>Second, matrix can also be seen as a <strong>quadratic form</strong>.</p><p>The quadratic form (or <strong>Rayleigh quotient</strong>) of Laplacian matrix and normalized Laplacian matrix can be rewritten as isoperimetry and conductance, which are important characteristics of graph partitions.</p><p>Another important fact is that the<strong> extreme values</strong> of Rayleigh quotient happen to be eigenvalues, achieved at eigenvectors.</p><p>Based the two observations, we can link best graph partition with eigenvectors. We have successfully moved from qualitative descriptions of graph to the quantitative study of matrix.</p><p>There are some special eigens: for Laplacian matrix, 0 is the smallest eigenvalue and its corresponding eigenvector is vector of 1s. (Actually we care about the second smallest eigen.) Some claim for typical graphs: path graph, complete graph, and so on.</p><p>For general matrix and graphs, we can give an upper bound of its eigenvalue by Courant-Fische Theorem with test vectors and lower bound by Poincaré Inequality. (I have not got the time to read the proof, knowing that solutions exist suffice.)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fe55ce467b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[nfs diagnosis]]></title>
            <link>https://medium.com/@youweizhuo/nfs-diagnosis-d79a5324561f?source=rss-4dc36b2b536c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d79a5324561f</guid>
            <dc:creator><![CDATA[Youwei Zhuo]]></dc:creator>
            <pubDate>Tue, 17 Jan 2017 05:02:29 GMT</pubDate>
            <atom:updated>2017-01-17T07:34:43.784Z</atom:updated>
            <content:encoded><![CDATA[<pre>showmount -a<br>showmount -e &lt;server&gt;</pre><p>firewall/iptables</p><pre>firewall-cmd --permanent --add-service=nfs<br>firewall-cmd --permanent --add-service=mountd<br>firewall-cmd --permanent --add-service=rpc-bind<br>firewall-cmd --reload</pre><p><a href="http://www.cnblogs.com/mchina/archive/2013/01/03/2840040.html">http://www.cnblogs.com/mchina/archive/2013/01/03/2840040.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d79a5324561f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lamport on Writing]]></title>
            <link>https://medium.com/@youweizhuo/lamport-on-writing-a9ad07212239?source=rss-4dc36b2b536c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9ad07212239</guid>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Youwei Zhuo]]></dc:creator>
            <pubDate>Fri, 25 Nov 2016 05:06:43 GMT</pubDate>
            <atom:updated>2016-11-25T05:06:43.511Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="http://www.budiu.info/blog/lamport.html">An interview with Leslie Lamport</a></p><blockquote>People have come up with lots of reasons for why comments are useless. This is to be expected. Writing is difficult, and people always find excuses to avoid doing difficult tasks.</blockquote><blockquote>Writing is difficult for two reasons: (i) writing requires thought and thinking is difficult, and (ii) the physical act of putting thoughts into words is difficult. There’s not much you can do about (i), but there’s a straightforward solution to (ii) — namely, writing. The more you write, the easier the physical process becomes. I recommend that you start practicing with email. Instead of just dashing off an email, write it. Make sure that it expresses exactly what you mean to say, in a way that the reader will be sure to understand it.</blockquote><blockquote>Remember that I am not telling you to comment your code after you write it. You should comment code before you write it.</blockquote><p>Write more! Write more than code and comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9ad07212239" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>