<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Bad Fd</title>
    <link>/</link>
    <description>Recent content on Bad Fd</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-cn</language>
    <lastBuildDate>Mon, 29 Mar 2021 00:00:00 +0000</lastBuildDate><atom:link href="/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>类redis-list的持久化编码和复杂度分析</title>
      <link>/posts/db_%E7%B1%BBredis-list%E7%9A%84%E6%8C%81%E4%B9%85%E5%8C%96%E7%BC%96%E7%A0%81%E5%92%8C%E5%A4%8D%E6%9D%82%E5%BA%A6%E5%88%86%E6%9E%90/</link>
      <pubDate>Mon, 29 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/db_%E7%B1%BBredis-list%E7%9A%84%E6%8C%81%E4%B9%85%E5%8C%96%E7%BC%96%E7%A0%81%E5%92%8C%E5%A4%8D%E6%9D%82%E5%BA%A6%E5%88%86%E6%9E%90/</guid>
      <description></description>
    </item>
    
    <item>
      <title>rocksdb的blockcache的一些优化点</title>
      <link>/posts/db_rocksdb%E7%9A%84blockcache%E7%9A%84%E4%B8%80%E4%BA%9B%E4%BC%98%E5%8C%96%E7%82%B9/</link>
      <pubDate>Fri, 26 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/db_rocksdb%E7%9A%84blockcache%E7%9A%84%E4%B8%80%E4%BA%9B%E4%BC%98%E5%8C%96%E7%82%B9/</guid>
      <description>&lt;h1 id=&#34;引子&#34;&gt;引子&lt;/h1&gt;
&lt;p&gt;记一些突然间的想法，防止后续忘了，以下是正文。&lt;/p&gt;
&lt;h1 id=&#34;blockcahe的问题&#34;&gt;blockcahe的问题&lt;/h1&gt;
&lt;p&gt;rocksdb的blockcache目前遇到的，主要有：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;官方实现中没有回收机制.&lt;/li&gt;
&lt;/ol&gt;</description>
    </item>
    
    <item>
      <title>enable_shared_from_this的实现和CRTP Idiom</title>
      <link>/posts/c&#43;&#43;_enable_shared_from_this%E7%9A%84%E5%AE%9E%E7%8E%B0%E5%92%8Ccrtp-idiom/</link>
      <pubDate>Wed, 24 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/c&#43;&#43;_enable_shared_from_this%E7%9A%84%E5%AE%9E%E7%8E%B0%E5%92%8Ccrtp-idiom/</guid>
      <description></description>
    </item>
    
    <item>
      <title>parameter pack和递归模板展开</title>
      <link>/posts/c&#43;&#43;_template_parameter_pack/</link>
      <pubDate>Wed, 24 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/c&#43;&#43;_template_parameter_pack/</guid>
      <description>&lt;h2 id=&#34;需求&#34;&gt;需求&lt;/h2&gt;
&lt;p&gt;做一个libevent的wrapper，有个需求，用户对某个fd的可读事件感兴趣，要求在产生这个事件时，调用他传入的某个可调用对象及其参数。
libevent的回调类似：&lt;code&gt;void LibeventCallback(int fd, short flag, void* arg);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;要求：
1、用户传入的可调用对象fn，拿的参数是可变的，第一个参数为某个特定类型，用于感知fd和flag，后续其他为用户自定义参数&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>lsm读写放大分析（r1）</title>
      <link>/posts/db_lsm%E8%AF%BB%E5%86%99%E6%94%BE%E5%A4%A7%E5%88%86%E6%9E%90r1/</link>
      <pubDate>Tue, 23 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/db_lsm%E8%AF%BB%E5%86%99%E6%94%BE%E5%A4%A7%E5%88%86%E6%9E%90r1/</guid>
      <description></description>
    </item>
    
    <item>
      <title>lsm读写放大分析（r2）</title>
      <link>/posts/db_lsm%E8%AF%BB%E5%86%99%E6%94%BE%E5%A4%A7%E5%88%86%E6%9E%90r2/</link>
      <pubDate>Tue, 23 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/db_lsm%E8%AF%BB%E5%86%99%E6%94%BE%E5%A4%A7%E5%88%86%E6%9E%90r2/</guid>
      <description></description>
    </item>
    
    <item>
      <title>recall of memory order model</title>
      <link>/posts/c&#43;&#43;_recall-of-memory-order-model/</link>
      <pubDate>Tue, 09 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/c&#43;&#43;_recall-of-memory-order-model/</guid>
      <description>&lt;h2 id=&#34;c内存序&#34;&gt;c++内存序&lt;/h2&gt;
&lt;h2 id=&#34;题外话&#34;&gt;题外话&lt;/h2&gt;
&lt;h4 id=&#34;cache-coherency-vs-memory-consistency&#34;&gt;Cache Coherency vs. Memory Consistency&lt;/h4&gt;
&lt;p&gt;这两个概念容易混淆，重新捋一下。&lt;/p&gt;
&lt;p&gt;关于Cache Coherency：&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>wal recovery would cleanup at least the first WAL</title>
      <link>/posts/db_wal-recovery-would-cleanup-at-least-the-first-wal/</link>
      <pubDate>Tue, 09 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/db_wal-recovery-would-cleanup-at-least-the-first-wal/</guid>
      <description>&lt;p&gt;这段时间跟同事尝试修复长期以来项目中遗留的Rocksdb的Case，遇到些有意思的Case，这里记录一下。&lt;/p&gt;
&lt;h2 id=&#34;heading&#34;&gt;&lt;/h2&gt;
&lt;h2 id=&#34;some-tips-for-rocksdb-case-fixing&#34;&gt;some tips for rocksdb case fixing&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;对于不支持&lt;code&gt;-march=native&lt;/code&gt;环境的，可以编译时&lt;code&gt;export USE_SSE=1&lt;/code&gt;.避免类似&lt;code&gt;no such instruction: &lt;/code&gt;shlx %r13,%rax,%rax&#39;`的问题。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;对于rocksdb的测试case，想保留测试db的，可以搞个&lt;code&gt;KEEP_DB&lt;/code&gt;环境变量。测试类会根据这个环境变量决定是否清理测试DB。&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</description>
    </item>
    
    <item>
      <title>some details about rocksdb::LRUCache</title>
      <link>/posts/db_some-details-about-rocksdblrucache/</link>
      <pubDate>Mon, 08 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/db_some-details-about-rocksdblrucache/</guid>
      <description>&lt;p&gt;最近有同事找我讨论问题，觉得挺有趣的记录一下。&lt;/p&gt;
&lt;h3 id=&#34;rocksdblruhandlekey的历史&#34;&gt;&lt;code&gt;rocksdb::LRUHandle::key()&lt;/code&gt;的历史&lt;/h3&gt;
&lt;p&gt;第一个问题是&lt;code&gt;rocksdb::LRUHandle::key()&lt;/code&gt;, 这个函数返回该handle内部存储的key，但为啥某些情况下却返回value呢？&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>digest of 3.4</title>
      <link>/posts/db_dailywork_digest_ver3.4/</link>
      <pubDate>Thu, 04 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/db_dailywork_digest_ver3.4/</guid>
      <description>&lt;ol start=&#34;0&#34;&gt;
&lt;li&gt;rvalue references summary (50%)
impl of std::forward, std::move
0.1.1 acquire &amp;amp; release semantics
&lt;a href=&#34;https://en.cppreference.com/w/cpp/atomic/memory_order&#34;&gt;https://en.cppreference.com/w/cpp/atomic/memory_order&lt;/a&gt;
&lt;a href=&#34;https://www.modernescpp.com/index.php/acquire-release-semantic&#34;&gt;https://www.modernescpp.com/index.php/acquire-release-semantic&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description>
    </item>
    
    <item>
      <title>db笔记 - 事务1:隔离级别</title>
      <link>/posts/db_txn_lec1/</link>
      <pubDate>Sun, 14 Feb 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/db_txn_lec1/</guid>
      <description>&lt;h2 id=&#34;锁&#34;&gt;锁&lt;/h2&gt;
&lt;p&gt;read lock
write lock
long duration lock
short duration lock&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>c&#43;&#43; notes：recall of move-semantics and rvalue-reference (2)</title>
      <link>/posts/cppnotes-move-semantics-n-rvalue-reference-2/</link>
      <pubDate>Wed, 03 Feb 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/cppnotes-move-semantics-n-rvalue-reference-2/</guid>
      <description>&lt;p&gt;回顾：&lt;/p&gt;
&lt;p&gt;G1-G4:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;G1&lt;/code&gt;.
If a variable or parameter is declared to have type T&amp;amp;&amp;amp; for some deduced type T, that variable or parameter is a universal reference.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;G2&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;</description>
    </item>
    
    <item>
      <title>c&#43;&#43; notes：recall of move-semantics and rvalue-reference (1)</title>
      <link>/posts/cppnotes-move-semantics-n-rvalue-reference-1/</link>
      <pubDate>Tue, 02 Feb 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/cppnotes-move-semantics-n-rvalue-reference-1/</guid>
      <description>&lt;p&gt;几年前，整理了一份rvalue相关笔记：&lt;a href=&#34;https://zhuanlan.zhihu.com/p/111826434&#34;&gt;以前的一份笔记&lt;/a&gt;，梳理近况时，发现某些问题还是没有弄清楚。&lt;/p&gt;
&lt;h2 id=&#34;universal-reference&#34;&gt;&lt;code&gt;Universal Reference&lt;/code&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Q: 什么场景下需要考虑这个问题？
A：模板元编程时，需要考虑兼容各种传入参数类型时（尤其是『左值/右值』）。基本上我感觉就是为了处理完美转发问题。比如写一个工厂函数模板，需要同时兼容传入的参数是左值和右值的情况，核心点是一个右值无法用于初始化一个左值引用，c++11之前要解决这个问题，要么写很多重复偏特化模板，要么付出拷贝参数的代价。&lt;/p&gt;
&lt;p&gt;c++11引入右值引用之后，上述问题可以通过&lt;code&gt;universal reference&lt;/code&gt;来解决，即传入参数是左值时，形参的类型推导为左值引用，是右值时，推导为右值引用，同时只需要提供一套模板即可。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Q: 什么是&lt;code&gt;Universal Reference&lt;/code&gt;?
A: 形如&lt;code&gt;T&amp;amp;&amp;amp;&lt;/code&gt;, &lt;code&gt;T&lt;/code&gt;不含有任何的cv限定符, 且&lt;code&gt;T&lt;/code&gt;需要被推导&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;G1&lt;/code&gt;.
If a variable or parameter is declared to have type T&amp;amp;&amp;amp; for some deduced type T, that variable or parameter is a universal reference.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>db笔记 - sse</title>
      <link>/posts/db_talk_about_sse/</link>
      <pubDate>Mon, 01 Feb 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/db_talk_about_sse/</guid>
      <description>&lt;h2 id=&#34;background&#34;&gt;background&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;we would set env var &lt;code&gt;USE_SSE=1&lt;/code&gt; when compiling Rocksdb, OTHERWISE it would always failed
at linking stage where encountering errors of lack of some instructions such as:
&lt;code&gt;no such instruction: &lt;/code&gt;shlx %rdx,%rax,%rax&#39;`.
but what the fuck is USE_SSE ?&lt;/p&gt;
&lt;/blockquote&gt;</description>
    </item>
    
    <item>
      <title>翻车笔记</title>
      <link>/posts/algmnotes_%E7%BF%BB%E8%BD%A6%E7%AC%94%E8%AE%B0/</link>
      <pubDate>Fri, 22 Jan 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/algmnotes_%E7%BF%BB%E8%BD%A6%E7%AC%94%E8%AE%B0/</guid>
      <description>&lt;h2 id=&#34;引子&#34;&gt;引子&lt;/h2&gt;
&lt;p&gt;很煞笔的一天，最近两次面试的试水都挂了（但之前面的两个小公司都拿到offer，小公司没有现场编程题），根因都是现场编程题不太理想。这个也不能怪别人，自己长期以来排斥刷题，觉得刷题纯度太低了，加上到目前为止就没有一次现场编程挂过。&lt;/p&gt;
&lt;p&gt;这波有种熟悉的感觉回来了：大二参加acm预选被血虐留下的心理阴影，在那之后再也没碰过OJ。&lt;/p&gt;
&lt;p&gt;另外，问到的一个关于LSM读写放大的优化也答得不是特别理想，因为工作上对这块的优化确实没有做，我看了下都是使用了默认的参数，更别说对compact等进行深度定制（引擎这块上不太深入，这也与工作中至今为止主要负责的模块不是这块有关）。&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>算法笔记：跳表（r1）</title>
      <link>/posts/algmnotes-skiplist/</link>
      <pubDate>Sun, 01 Mar 2020 00:00:00 +0000</pubDate>
      
      <guid>/posts/algmnotes-skiplist/</guid>
      <description>&lt;p&gt;这是读书时一篇旧文搬运.几年后再次回顾下算法.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;跳表是一种著名数据结构。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;原理应该不用介绍了，rocksdb/redis内部都有使用skiplist。&lt;/p&gt;
&lt;p&gt;相对于红黑树，它的优势我认为是实现简单，并且容易无锁化。&lt;/p&gt;
&lt;p&gt;本文主要讨论：&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>算法笔记：跳表（r2）</title>
      <link>/posts/algmnotes-skiplist-impl/</link>
      <pubDate>Sun, 01 Mar 2020 00:00:00 +0000</pubDate>
      
      <guid>/posts/algmnotes-skiplist-impl/</guid>
      <description>&lt;h2 id=&#34;实现一个简单skiplist&#34;&gt;实现一个简单skiplist&lt;/h2&gt;
&lt;p&gt;上一篇笔记里回顾了跳表的性质和思想，并且看了一眼rocksdb里的skiplist实现。&lt;/p&gt;
&lt;p&gt;然后由于好奇，我自己写了一个skiplist，这里记录下。&lt;/p&gt;
&lt;p&gt;该skiplist的特性：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;不支持concurrent&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>rocksdb探究 - 一些问题</title>
      <link>/posts/db_some_questions_about_rocksdb/</link>
      <pubDate>Tue, 07 Jan 2020 21:26:49 +0800</pubDate>
      
      <guid>/posts/db_some_questions_about_rocksdb/</guid>
      <description>&lt;ol&gt;
&lt;li&gt;写请求batch内的多个操作是否会被拆开，为什么？&lt;/li&gt;
&lt;li&gt;block-cache里的缓存项是否会因为某个sst被compact而失效？&lt;/li&gt;
&lt;li&gt;event-listener的实现&lt;/li&gt;
&lt;li&gt;perf-context的实现&lt;/li&gt;
&lt;li&gt;ThreadLocalPtr的实现以及为什么&lt;/li&gt;
&lt;/ol&gt;</description>
    </item>
    
    <item>
      <title>c&#43;&#43;服务端rpc笔记：读muduo有感</title>
      <link>/posts/cppnote-server_rpc_notes/</link>
      <pubDate>Sat, 01 Dec 2018 21:26:49 +0800</pubDate>
      
      <guid>/posts/cppnote-server_rpc_notes/</guid>
      <description>&lt;p&gt;最近比较详细地缕了一遍公司内部另一个团队的存储产品（基于apache thrift），后简称为A。到目前为止，本团队存储产品自研的rpc框架，加上自己写过一个简单rpc框架用于rdb实例分裂，已经接触了3个rpc框架。准备在这篇文章总结下一些个人感想。&lt;/p&gt;
&lt;h3 id=&#34;连接处理模型&#34;&gt;连接处理模型&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A的服务端：使用thrift-rpc的nonblock-server，连接处理模型是同步的：
a. io线程在收到一个包后，会先把自己设为idle（具体点就是摘掉本线程上的可读写事件），扔给worker线程处理完成后再加回来。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A的cli端的处理是同步的：&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>c&#43;&#43;服务端rpc笔记：读muduo有感</title>
      <link>/posts/cppnotes-server_rpc_notes/</link>
      <pubDate>Sat, 01 Dec 2018 21:26:49 +0800</pubDate>
      
      <guid>/posts/cppnotes-server_rpc_notes/</guid>
      <description>&lt;p&gt;最近比较详细地缕了一遍公司内部另一个团队的存储产品（基于apache thrift），后简称为A。到目前为止，本团队存储产品自研的rpc框架，加上自己写过一个简单rpc框架用于rdb实例分裂，已经接触了3个rpc框架。准备在这篇文章总结下一些个人感想。&lt;/p&gt;
&lt;h3 id=&#34;连接处理模型&#34;&gt;连接处理模型&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A的服务端：使用thrift-rpc的nonblock-server，连接处理模型是同步的：
a. io线程在收到一个包后，会先把自己设为idle（具体点就是摘掉本线程上的可读写事件），扔给worker线程处理完成后再加回来。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A的cli端的处理是同步的：&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>智能指针1: shared_ptr使用梳理</title>
      <link>/posts/cppnotes-shared_ptr/</link>
      <pubDate>Sat, 01 Dec 2018 21:26:49 +0800</pubDate>
      
      <guid>/posts/cppnotes-shared_ptr/</guid>
      <description>&lt;p&gt;本文提及并讨论了：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;shared_ptr&lt;/code&gt;引入背景&lt;/li&gt;
&lt;li&gt;删除器&lt;/li&gt;
&lt;li&gt;线程安全性&lt;/li&gt;
&lt;li&gt;&lt;code&gt;std::ref&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>算法笔记： 最长回文子串</title>
      <link>/posts/algmnotes-longestpalindrome/</link>
      <pubDate>Sat, 01 Dec 2018 21:26:49 +0800</pubDate>
      
      <guid>/posts/algmnotes-longestpalindrome/</guid>
      <description>&lt;p&gt;这是读书时一篇旧文搬运.几年后再次回顾下算法.&lt;/p&gt;
&lt;h3 id=&#34;描述&#34;&gt;描述&lt;/h3&gt;
&lt;p&gt;给定一个串，求它的最长回文子串。&lt;/p&gt;
&lt;h3 id=&#34;dp思路&#34;&gt;DP思路&lt;/h3&gt;
&lt;p&gt;DP的关键是梳理出问题与子问题的关系。&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>算法笔记：计算1到n中2出现的个数</title>
      <link>/posts/algmnotes-count_2_of_a_number/</link>
      <pubDate>Fri, 01 Jun 2018 20:26:39 +0800</pubDate>
      
      <guid>/posts/algmnotes-count_2_of_a_number/</guid>
      <description>&lt;p&gt;这是读书时一篇旧文搬运.几年后再次回顾下算法.&lt;/p&gt;
&lt;h2 id=&#34;问题&#34;&gt;问题&lt;/h2&gt;
&lt;p&gt;给定一个数字n，求1到n序列中2出现的总次数。n最大值可能是10^9。&lt;/p&gt;
&lt;h2 id=&#34;思路&#34;&gt;思路&lt;/h2&gt;
&lt;h3 id=&#34;暴力&#34;&gt;暴力&lt;/h3&gt;</description>
    </item>
    
    <item>
      <title>分布式笔记 - Raft（1）</title>
      <link>/posts/storage_deep_dive_for_raft/lec1/</link>
      <pubDate>Thu, 19 Apr 2018 21:20:49 +0000</pubDate>
      
      <guid>/posts/storage_deep_dive_for_raft/lec1/</guid>
      <description>&lt;h3 id=&#34;qa&#34;&gt;Q&amp;amp;A&lt;/h3&gt;
&lt;h5 id=&#34;线性一致性&#34;&gt;线性一致性？&lt;/h5&gt;
&lt;p&gt;个人认为，分布式系统的一致性与多核内存模型中涉及的一致性异曲同工，所以分布式系统的线性一致性我认为可以参考类似多核系统的线性一致性定义来理解。&lt;/p&gt;
&lt;h5 id=&#34;fsm-finite-state-machine&#34;&gt;&lt;code&gt;fsm: finite-state-machine&lt;/code&gt;&lt;/h5&gt;
&lt;p&gt;个人理解为有状态分布式服务的每个独立实例（进程+数据），本质上都可以是个有限状态机（fsm）&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Todo list</title>
      <link>/posts/other_todolist/</link>
      <pubDate>Tue, 07 Nov 2017 02:26:41 +0800</pubDate>
      
      <guid>/posts/other_todolist/</guid>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; pb使用总结:动态类型反射/non-copy&lt;/li&gt;
&lt;li&gt;&lt;input disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 运维总结:huge page&lt;/li&gt;
&lt;li&gt;&lt;input disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 运维总结:tcpdump抓包&lt;/li&gt;
&lt;li&gt;&lt;input disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 运维总结:tsar/sar/iotop/iostat/top/perf top&lt;/li&gt;
&lt;li&gt;&lt;input disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; db笔记：lsm和btree的读/写放大分析&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>cheatsheet for FUW</title>
      <link>/posts/other_frequently-used-words/</link>
      <pubDate>Mon, 07 Nov 2016 21:20:49 +0000</pubDate>
      
      <guid>/posts/other_frequently-used-words/</guid>
      <description>&lt;h1 id=&#34;some-words-used-in-coding&#34;&gt;some words used in coding&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;toggle&lt;/li&gt;
&lt;li&gt;quote&lt;/li&gt;
&lt;li&gt;snippet&lt;/li&gt;
&lt;li&gt;typo&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>About</title>
      <link>/menus/about/</link>
      <pubDate>Fri, 07 Oct 2016 21:26:49 +0800</pubDate>
      
      <guid>/menus/about/</guid>
      <description>about this is a place to meet myself.</description>
    </item>
    
    <item>
      <title>Life</title>
      <link>/menus/life-notes/</link>
      <pubDate>Fri, 07 Oct 2016 21:26:49 +0800</pubDate>
      
      <guid>/menus/life-notes/</guid>
      <description>Life Topics  to be continue&amp;hellip;  </description>
    </item>
    
    <item>
      <title>Links</title>
      <link>/menus/work-notes/</link>
      <pubDate>Fri, 07 Oct 2016 21:26:49 +0800</pubDate>
      
      <guid>/menus/work-notes/</guid>
      <description>&lt;h3 id=&#34;work-topics&#34;&gt;work topics&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;c++&lt;/li&gt;
&lt;li&gt;debuging&lt;/li&gt;
&lt;li&gt;database system&lt;/li&gt;
&lt;li&gt;distribution system&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>随想2</title>
      <link>/posts/other_thinkings/</link>
      <pubDate>Mon, 19 Jan 2015 00:00:00 +0000</pubDate>
      
      <guid>/posts/other_thinkings/</guid>
      <description>  下面是一个hugo图像处理的示意 代码为    .Resize &#34;300x&#34;       .Resize &#34;300x&#34;      随想1
  </description>
    </item>
    
    <item>
      <title>随想</title>
      <link>/posts/other_thoughts_about_life/</link>
      <pubDate>Tue, 20 Dec 2011 07:26:49 +0800</pubDate>
      
      <guid>/posts/other_thoughts_about_life/</guid>
      <description>&lt;h3 id=&#34;杂-1&#34;&gt;杂 1&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://www.zhihu.com/question/288017836&#34;&gt;既然所有的生命都要死亡，那么生命的意义是什么？&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;在 bug 中寻找圆满&lt;/li&gt;
&lt;li&gt;冯伦被误诊为癌症，那是他第一次开始思考死亡，以前很重视的事情都变得轻了，最沉重的，还是生命。&lt;/li&gt;
&lt;li&gt;死亡带来意义，而非消解意义&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>启用一个新blog（Hugo试用）</title>
      <link>/posts/other_try-hugo/</link>
      <pubDate>Mon, 07 Nov 2011 21:26:49 +0800</pubDate>
      
      <guid>/posts/other_try-hugo/</guid>
      <description>&lt;h2 id=&#34;hugo-试用&#34;&gt;Hugo 试用&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;基本流程走通：post &amp;ndash; publish&lt;/li&gt;
&lt;li&gt;basic configs&lt;/li&gt;
&lt;li&gt;basic markdown&lt;/li&gt;
&lt;li&gt;config the markup(code pieces)&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>c&#43;&#43;笔记：STL容器迭代器失效场景</title>
      <link>/posts/cppnotes-iterator-invalidation/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/posts/cppnotes-iterator-invalidation/</guid>
      <description>&lt;h2 id=&#34;cheatsheet&#34;&gt;CheatSheet&lt;/h2&gt;
&lt;p&gt;(完整版见下面 Ref1 or cppref)
note:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;顺序型容器&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;deque插入or删除操作会导致迭代器失效.&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>c&#43;&#43;笔记：STL相关</title>
      <link>/posts/cppnotes-stl-misc/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/posts/cppnotes-stl-misc/</guid>
      <description>this is a post of misc items of stl.
  behavior of operator[] of vector and map:
  auto in for-statement:
   </description>
    </item>
    
    <item>
      <title>systemtap笔记</title>
      <link>/posts/debugging_systemtap_cheatsheet/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/posts/debugging_systemtap_cheatsheet/</guid>
      <description></description>
    </item>
    
    <item>
      <title>笔记：systemtap相关</title>
      <link>/posts/debugging_use-systemtap-to-debug/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/posts/debugging_use-systemtap-to-debug/</guid>
      <description>&lt;p&gt;本文会提及systemtap的以下几点：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;如何列出某个可执行文件的所有probe位点&lt;/li&gt;
&lt;li&gt;如何取变量的值&lt;/li&gt;
&lt;li&gt;如何通过某个地址的解引用取得对应值&lt;/li&gt;
&lt;li&gt;如何在.return中拿到变量的最新值&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>笔记：一些日常cheatsheet</title>
      <link>/posts/db_dailywork_cheatsheet/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/posts/db_dailywork_cheatsheet/</guid>
      <description>&lt;p&gt;日常cheatsheet～&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;run valgrind for a program&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;valgrind --tool=memcheck --leak-check=full --log-file=leak.log --soname-synonyms=somalloc=NONE &amp;lt;some_exe&amp;gt; [&amp;lt;some_exe_args&amp;gt;]
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;run tcpdump to capture mysql queries:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;tcpdump -r /tmp/a.cap -A -S -n -nn  | grep -i -E &amp;quot;select|insert|update|delete|replace&amp;quot; | sed &#39;s%\(.*\)\([.]\{4\}\)\(.*\)%\3%&#39; | less
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;python scripts:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;python -m SimpleHTTPServer 8123
wget -c -r -nH -m --limit-rate=400m &amp;quot;http://ip:8123/xxxx&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;python -c &#39;from zlib import crc32; print crc32(&amp;quot;1476777&amp;quot;) % 1024&#39;
&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;#!/usr/bin/python
# -*- coding: UTF-8 -*-
import sys
import json
data = &amp;quot;&amp;quot;
for line in sys.stdin:
        data += line
text = json.loads(data)
print(text)
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tee&lt;/code&gt; with a pipe output to screen and a file&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;echo &amp;quot;hello&amp;quot; | tee abc.txt
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ps&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;top&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;tasr&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;sar&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
  </channel>
</rss>
