Friday, April 25, 2014

Change IO Scheduler/elevator on a linux server.

Here is a quick how to to change IO Scheduler/elevator on a Linux server and to get some performance enhancement (courtesy from Linbit).

cat /sys/block/sd*/queue/scheduler
echo deadline|tee /sys/block/sd*/queue/scheduler

 echo 0       | tee /sys/block/sd*/queue/iosched/front_merges
 echo 150   | tee /sys/block/sd*/queue/iosched/read_expire
 echo 1500 | tee /sys/block/sd*/queue/iosched/write_expire

More can be read here and here to find out more why I choose deadline.

HTH
Brent

Monday, March 17, 2014

IP lookup

I know there is geoip and you can use its commandline tool geoiplookup to find out some information about an IP.

But if you need a quick lookup, look no further than running

 curl ipinfo.io/74.125.233.37

What you get is:

 bclark@bclark:~$ curl ipinfo.io/74.125.233.37
{
  "ip": "74.125.233.37",
  "hostname": "jnb01s01-in-f5.1e100.net",
  "city": "Mountain View",
  "region": "California",
  "country": "US",
  "loc": "37.4192,-122.0574",
  "org": "AS15169 Google Inc.",
  "postal": "94043"
}