<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux on Council of Elrond</title><link>https://songkou.github.io/tags/linux/</link><description>Recent content in Linux on Council of Elrond</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 21 Jul 2026 03:00:00 +0800</lastBuildDate><atom:link href="https://songkou.github.io/tags/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>SaltStack_Guide</title><link>https://songkou.github.io/posts/salt-guide/</link><pubDate>Tue, 21 Jul 2026 03:00:00 +0800</pubDate><guid>https://songkou.github.io/posts/salt-guide/</guid><description>&lt;p&gt;&lt;em&gt;Target platform: Debian / Ubuntu. Current LTS at time of writing: &lt;strong&gt;Salt 3008 LTS&lt;/strong&gt;. Packages are now hosted on Broadcom&amp;rsquo;s Artifactory (the old &lt;code&gt;repo.saltproject.io&lt;/code&gt; has been retired).&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="1-what-salt-is"&gt;1. What Salt is&lt;/h2&gt;
&lt;p&gt;Salt (formerly SaltStack) is an open-source automation and infrastructure management framework used for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Configuration management&lt;/li&gt;
&lt;li&gt;Remote command execution&lt;/li&gt;
&lt;li&gt;Software deployment&lt;/li&gt;
&lt;li&gt;Server orchestration&lt;/li&gt;
&lt;li&gt;Compliance enforcement&lt;/li&gt;
&lt;li&gt;Infrastructure automation&lt;/li&gt;
&lt;li&gt;Network device automation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It runs in two common modes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Master / minion (agent) mode&lt;/strong&gt; — a central &lt;code&gt;salt-master&lt;/code&gt; sends commands to many &lt;code&gt;salt-minion&lt;/code&gt; agents over an encrypted ZeroMQ message bus. This is the classic, scalable setup:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="https://songkou.github.io/posts/salt-guide/master-minion-topology.svg" alt="Salt master/minion architecture: one Salt Master (control server) connected over ZeroMQ TCP 4505/4506 to three minions - two Linux and one Windows; commands and states flow down, results and grains flow up"&gt;&lt;/p&gt;</description></item><item><title>Perftest_RDMA_Benchmarking</title><link>https://songkou.github.io/posts/perftest/</link><pubDate>Sat, 18 Jul 2026 20:00:00 +0800</pubDate><guid>https://songkou.github.io/posts/perftest/</guid><description>&lt;h2 id="what-is-perftest"&gt;What is perftest?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;perftest&lt;/strong&gt; is the standard micro-benchmark suite for RDMA — it validates and benchmarks InfiniBand, hardware RoCE, and Soft-RoCE links, not ordinary TCP networking. Each tool measures one RDMA verb:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Test&lt;/th&gt;
					&lt;th&gt;Measures&lt;/th&gt;
					&lt;th&gt;Real-world workloads it models&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ib_write_bw&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;RDMA Write bandwidth&lt;/td&gt;
					&lt;td&gt;Data replication, storage writes, GPU/bulk data transfers&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ib_write_lat&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;RDMA Write latency&lt;/td&gt;
					&lt;td&gt;Updating remote memory — small one-sided writes&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ib_read_bw&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;RDMA Read bandwidth&lt;/td&gt;
					&lt;td&gt;Distributed storage and database reads, remote memory access&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ib_read_lat&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;RDMA Read latency&lt;/td&gt;
					&lt;td&gt;Fetching remote memory — storage/database-style lookups&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ib_send_bw&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Send/Receive bandwidth&lt;/td&gt;
					&lt;td&gt;MPI messages, RPC, request queues&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ib_send_lat&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Send/Receive latency&lt;/td&gt;
					&lt;td&gt;Small request/response round trips — RPC and MPI latency&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ib_atomic_bw&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Atomic operation rate&lt;/td&gt;
					&lt;td&gt;Distributed locks and counters&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ib_atomic_lat&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Atomic latency&lt;/td&gt;
					&lt;td&gt;Synchronization primitives&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="write-read-and-send-are-different-operations"&gt;Write, Read, and Send are different operations&lt;/h3&gt;
&lt;p&gt;The grouping in the table is not accidental — the three verbs have different semantics:&lt;/p&gt;</description></item><item><title>How_Linux_Sends_and_Receives_Network_Packets</title><link>https://songkou.github.io/posts/how_linux_sends_and_receives_network_packets/</link><pubDate>Sat, 11 Jul 2026 07:00:00 +0800</pubDate><guid>https://songkou.github.io/posts/how_linux_sends_and_receives_network_packets/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Study notes rewritten in my own words&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="network-models"&gt;Network models&lt;/h2&gt;
&lt;p&gt;To let all kinds of devices talk to each other over a network, the ISO defined
the &lt;strong&gt;OSI reference model&lt;/strong&gt; with 7 layers. Each layer has a single job:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Application&lt;/strong&gt; – provides a uniform interface to programs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Presentation&lt;/strong&gt; – converts data into a format another system understands&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Session&lt;/strong&gt; – establishes, manages and terminates sessions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transport&lt;/strong&gt; – end-to-end data transfer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network&lt;/strong&gt; – routing, forwarding, fragmentation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data link&lt;/strong&gt; – framing, error detection, MAC addressing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Physical&lt;/strong&gt; – transmits frames over the physical medium&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;OSI is mostly a &lt;em&gt;conceptual&lt;/em&gt; model — it never shipped a concrete implementation.
What we actually use is the simpler &lt;strong&gt;TCP/IP model&lt;/strong&gt; with 4 layers, and the Linux
stack is built to match it:&lt;/p&gt;</description></item><item><title>Mysql_installation</title><link>https://songkou.github.io/posts/mysql_installation/</link><pubDate>Sun, 07 Feb 2021 18:33:58 +0800</pubDate><guid>https://songkou.github.io/posts/mysql_installation/</guid><description>&lt;p&gt;The general view of the difference between mysql and marinaDB can refer to this link:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.panoply.io/a-comparative-vmariadb-vs-mysql"&gt;https://blog.panoply.io/a-comparative-vmariadb-vs-mysql&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And I quote some here:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MySQL:&lt;/strong&gt; MySQL is an open-source relational database management system (RDBMS). Just like all other relational databases, MySQL uses tables, constraints, triggers, roles, stored procedures and views as the core components that you work with. A table consists of rows, and each row contains a same set of columns. MySQL uses primary keys to uniquely identify each row (a.k.a record) in a table, and foreign keys to assure the referential integrity between two related tables.&lt;/p&gt;</description></item><item><title>Linux_name_space</title><link>https://songkou.github.io/posts/linux_name_space/</link><pubDate>Fri, 01 Jan 2021 14:52:01 +0800</pubDate><guid>https://songkou.github.io/posts/linux_name_space/</guid><description>&lt;h1 id="linux-namespace"&gt;Linux NameSpace&lt;/h1&gt;
&lt;p&gt;Docker denpends on Linux NameSpace, Thus this is a brief explaination on linux name space.&lt;/p&gt;
&lt;p&gt;We can use unshare command to manipulate/playaround with linux name spaces.&lt;/p&gt;
&lt;h2 id="how-to-check-what-kind-of-linux-namespace-is-supported"&gt;How to check what kind of linux namespace is supported&lt;/h2&gt;
&lt;p&gt;We can use “man unshare” to check what kind of linux namespace is supported. There are 8 types of name spaces:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt; mount namespace
 Mounting and unmounting filesystems will not affect the rest of the system (CLONE_NEWNS flag), except for filesystems which are explicitly marked as shared (with mount --make-shared; see /proc/self/mountinfo or
 findmnt -o+PROPAGATION for the shared flags).

 unshare automatically sets propagation to private in the new mount namespace to make sure that the new namespace is really unshared. This feature is possible to disable by option --propagation unchanged. Note
 that private is the kernel default.

 UTS namespace
 Setting hostname or domainname will not affect the rest of the system. (CLONE_NEWUTS flag)

 IPC namespace
 The process will have an independent namespace for System V message queues, semaphore sets and shared memory segments. (CLONE_NEWIPC flag)

 network namespace
 The process will have independent IPv4 and IPv6 stacks, IP routing tables, firewall rules, the /proc/net and /sys/class/net directory trees, sockets, etc. (CLONE_NEWNET flag)

 pid namespace
 Children will have a distinct set of PID to process mappings from their parent. (CLONE_NEWPID flag)

 user namespace
 The process will have a distinct set of UIDs, GIDs and capabilities. (CLONE_NEWUSER flag)

 See clone(2) for the exact semantics of the flags.
&lt;/code&gt;&lt;/pre&gt;&lt;ol&gt;
&lt;li&gt;Mount（mnt） isolate mounting space&lt;/li&gt;
&lt;li&gt;Process ID (pid) isolate process ID.&lt;/li&gt;
&lt;li&gt;Network (net) isolate network , port ID, etc&lt;/li&gt;
&lt;li&gt;Interprocess Communication (ipc) isolate System V IPC &amp;amp; POSIX message queues&lt;/li&gt;
&lt;li&gt;UTS Namespace(uts) Isolate hostname and domain name&lt;/li&gt;
&lt;li&gt;User Namespace (user) isolate user group and users.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Additionally, Linux 4.6 and 5.6 introduced cgroups and time two types. in total it’s 8.&lt;/p&gt;</description></item><item><title>squid_setup</title><link>https://songkou.github.io/posts/squid_setup/</link><pubDate>Thu, 18 Jun 2020 23:15:45 +0800</pubDate><guid>https://songkou.github.io/posts/squid_setup/</guid><description>&lt;pre&gt;&lt;code&gt;1. yum -y update

2. yum install openssl

3. yum install squid

4. vim /etc/squid/squid.conf

5. tail -f /var/log/squid/access.log

6. systemctl start squid

7. systemctl status squid

8. ss -nlp | grep squid | grep 3128

dns_nameservers 8.8.8.8 8.8.4.4
&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>