Too many TCP segments retransmited in a virtual machine

Posted on

I find there are too many TCP segments retransmited in a Xen virtual machine. sudo netstat -s | grep segments 537559 segments received 558908 segments send out 3533 segments retransmited 2677 bad segments received. There are 4 VMs on a host which has 4 cores. The segment retransmision rate is too high. It finally turns
Read more

Cache at Facebook

Posted on

About caching system at Facebook. According to: https://www.facebook.com/notes/facebook-engineering/monitoring-cache-with-claspin/10151076705703920 Facebook has two major cache systems: Memcache, which is a simple lookaside cache with most of its smarts in the client, and TAO, a caching graph database that does its own queries to MySQL. The NSDI’13 paper introduces more about Memcache: https://www.usenix.org/conference/nsdi13/scaling-memcache-facebook The USENIX ATC’13 paper introduces
Read more

How to exclude certain repositories in yum?

Posted on

This tutorial introduces how to exclude certain repositories in yum. Excluding certain repositories is needed usually. One example may be when you have several repositories that have the same package and you only want the one from a certain repository. For my situation, I choose to exclude the google-chrome and other repositories from Google when
Read more

How to install Scala on Fedora Linux

Posted on

This tutorial introduces how to install Scala 2.9.2 on 64-bit Fedora Linux 17. There are some changes needed to make scala work on Fedora Linux 17. Please check it out in the answer. Install Java Scala depends on Java, so please install Java first. In this tutorial, we installed JDK to: /usr/java/jdk1.6.0_24/lib/. Install Scala from
Read more

Question2answer: show excerpt in the RSS feed

Posted on

There is a “Include full text in feeds:” option in the “RSS feeds” configuration panel but no options/method to only show excerpt instead of the “full text” or nothing for RSS feeds. This need to hack the question2answer source code. Details are in the answer. The changes based on Question2asnwer 1.5.4: diff –git a/qa-include/qa-index.php b/qa-include/qa-index.php
Read more

How to delete all topics and posts from a user/spammer in myBB?

Posted on

This is a tutorial on “how to delete all topics and posts from a user/spammer in myBB”. Please check out the answer. I use the Goodbye Spammer plugin for MyBB. First, install it after downloading the plugin form its homepage: Upload ./inc/plugins/goodbyespammer.php to ./inc/plugins/ Upload ./inc/languages/english/goodbyespammer.lang.php to ./inc/languages/english/ Go to ACP > Plugins > Activate
Read more

How to get the assembly code for OCaml code generated by ocamlopt?

Posted on

How to get the native assembly code (e.g. x86-64 asm) for OCaml code generated by the native ocamlopt compiler? To get the assembly code for an OCaml program, add these parameters to ocamlopt: -S -inline 20 -nodynlink An example is as follows. The OCaml program: $ cat not.ml let not x = ((x – 1)
Read more

How to repair a MySQL table?

Posted on

After a server crash and restarting, MyBB reports a SQL Error as follows: MyBB SQL Error MyBB has experienced an internal SQL error and cannot continue. SQL Error: 145 – Table ‘./mybb/mybb_sessions’ is marked as crashed and should be repaired Query: SELECT * FROM mybb_sessions WHERE sid=’40021925bd0494ea31…’ AND ip=’x.x.x.x’ LIMIT 1 The dababase is MySQL.
Read more

Plain text file pipelined to Linux mailx turns to “Content-Type: application/octet-stream” (an attachment)

Posted on

Plain text file pipelined to Linux mailx turns to “Content-Type: application/octet-stream” which is recognized as an attachment by some email client. The command is like this: $ cat log.txt | mail -s “Updated log file” -r “from@example.com” “to@example.com” I expect it to be: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit But it turns out to be: Content-Type:
Read more

Where are the Linux routing table entries stored on disk?

Posted on

I know the routing tables on Linux is in memory after being set. However, where are the routing table entries stored on disk? I mean where are the routing table is persistently stored so that the routing table can be reloaded like the iptables (under /etc/sysconfig/iptables on Fedora/RHEL/CentOS Linuxes). If the system uses the /etc/rc.d/init.d/network
Read more

How to use OCaml as a script language?

Posted on

How to use OCaml as a script language like bash and python? It will be good that I can write a script in OCaml and directly invoke it. For example, I write a script named “script.ml” and then I can invoke it directly by $ ./script.ml Thanks! Three helloworld scripts: script3.ml #! /usr/bin/env ocaml print_string
Read more

Where are the backup files of my iPhone by iTune and how to get the real files from them?

Posted on

I backup my iPhone with iTune to my local computer. Where can I find out the backup files of my iPhone by iTune? And how to get the real files (like songs, notes, etc.) from the backup files? The location of the backup files from iTune It depends on the computer’s operating system: Mac: ~/Library/Application
Read more

Set Chrome RSS Subscription Extension to Subscribe to RSS feed using Feedly

Posted on

How to set Chrome RSS Subscription Extension so that I can subscribe to RSS feed using Feedly? Both tools are great and it will be better to combine them together. The link in feedly to subscribe a RSS feed (e.g. https://www.systutorials.com/b/feed/ ) is: http://www.feedly.com/home#subscription/feed/https://www.systutorials.com/b/feed/ We can replace the RSS feed URL with a %s in
Read more

Good tools to manage OCaml packages

Posted on

Which tools to mange OCaml packages in my system (Linux)? I use OPAM to manage OCaml packages: http://opam.ocamlpro.com/index.html To install it: $ wget https://raw.githubusercontent.com/ocaml/opam/master/shell/opam_installer.sh $ sh ./opam_installer.sh /usr/local/bin More options are available here. To make opam settings take effect, append this to ~/.bashrc: eval `opam config env` Some frequent usages: opam list # List all
Read more