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"
}

Wednesday, December 4, 2013

Speed up exim

I received an interesting challenge / request to speed up a clients server that runs the email marketing tool, Active Campaign.

One of the first things I did was move the Exim queue to SSDs.

Thereafter I pushed the following settings, to Exim.

root@mailserver ~ # cat /etc/exim4/conf.d/main/01_exim4-deliver_speedup
# THIS FILE IS AUTOMATICALLY DISTRIBUTED BY PUPPET.  ANY CHANGES WILL BE
# OVERWRITTEN.

deliver_queue_load_max = 20
queue_only_load = 20
split_spool_directory
queue_run_max = 150
remote_max_parallel = 200
smtp_connect_backlog = 50
smtp_accept_max = 500
smtp_accept_queue_per_connection = 2000


On going live, we have identified that the client can deliver 90 000 newletters in under two and a half hours.

HTH
Brent

Tuesday, April 23, 2013

Gnome 3 mouse focus



One annoyance I have with Gnome 3, and not easily available to fix, is the need to click a window to change the focus.

I prefer to have the focus of my windows to follow the mouse.

I used the tool dconf-editor

I found the config lives the path in org.gnome.desktop.wm.preferences

Tick 'auto raise'
Right click on 'focus-mode' and select 'mouse' .

HTH
Brent


Thursday, January 3, 2013

RAID Disk Space Calculator



http://www.icc-usa.com/raid-calculator.php

HTH
Brent

Check if system is 32bit or 64bit

Im always looking for cleaner ways to get the architecture of my running host for my scripts.

Here is some commands Ive come across.

arch
getconf LONG_BIT

and then the classic

uname -m

HTH
Brent

Tuesday, January 1, 2013

Sometimes you may want to know what the state of an Ethernet card is. But lets say you don't have root, to use tools like ethtool or mii-tool.

Heres a quick tip

grep ''  /sys/class/net/eth0/*
/sys/class/net/eth0/address:00:1b:21:6a:85:d6
/sys/class/net/eth0/addr_len:6
/sys/class/net/eth0/broadcast:ff:ff:ff:ff:ff:ff
/sys/class/net/eth0/carrier:1
/sys/class/net/eth0/dev_id:0x0
/sys/class/net/eth0/dormant:0
/sys/class/net/eth0/duplex:full
/sys/class/net/eth0/features:0xba9
/sys/class/net/eth0/flags:0x1003
/sys/class/net/eth0/ifindex:2
/sys/class/net/eth0/iflink:2
/sys/class/net/eth0/link_mode:0
/sys/class/net/eth0/mtu:1500
/sys/class/net/eth0/operstate:up
/sys/class/net/eth0/speed:100
/sys/class/net/eth0/tx_queue_len:1000
/sys/class/net/eth0/type:1
/sys/class/net/eth0/uevent:INTERFACE=eth0
/sys/class/net/eth0/uevent:IFINDEX=2

HTH

Brent