Skip to main content

Change IO Scheduler for SSD and HDD server with Software RAID

Hi Guys,

It has been a while...

I faced a problem with IO on one of the RAID 1 Linux servers and the IO schedulers were the default cfq in the server. It doesn't matter if the drive is in software RAID or not.

If you are using SSD drives, then there are no mechanical parts in the HDD, so you need to change the IO schedulers to noop.

If the SSD drive is mounted as /hda, then below command will do it.

----------------------------------------------------------
echo noop > /sys/block/hda/queue/scheduler
----------------------------------------------------------

For the HDD drive, the scheduler that is recommended is `deadline` in case of poor performance problems.

----------------------------------------------------------
echo deadline > /sys/block/hdb/queue/scheduler
----------------------------------------------------------

In case of Software RAID, just make sure that the drive you are changing the scheduler is inside the RAID.

You can see the drives inside the software RAID using the command

----------------------------
cat /proc/mdstat
----------------------------

Popular posts from this blog

Qmail cheat sheet

http://supportlobby.com/blog/category/technical/qmail-technical/

========================
1) To check the mail queue in plesk from command line, you can use the command :

 /var/qmail/bin/qmail-qstat
========================

=========================
2) You can examine the queue with qmail-qread.

/var/qmail/bin/qmail-qread
=========================

=========================
3) From the qread command you get the message id . In the above example , let us assume one of the id is 524514 . Now you can find the file holding the email in/var/qmail/queue with find command.

# find /var/qmail/queue -iname 524514

/var/qmail/queue/remote/22/524514

/var/qmail/queue/mess/22/524514 (mail headers)

/var/qmail/queue/info/22/524514

4) From the mail header you get the IP address

vi /var/qmail/queue/mess/22/524514


Or

Shortcut for the cool guys
---------------------------------

find /var/qmail/queue -iname queu_id | grep mess | xargs less

=========================

=========================
4) If you wish …

Open VZ cheat Sheet

VZCTL COMMANDS
---------------------

vzctl set 101 --diskspace 1000000:1100000 --save  To set diskspace for container with ID 101

vzctl set 101 --diskinodes 90000:91000 --save     To set inodes for container with ID 101

vzctl set 101 --quotatime 600 --save              To set quotatime for container with ID 101 (The time limit by

                                                       which container is allowed to temporarily exceed  its quota soft limits)

vzctl exec 101 df                                  To execute command df at the server with the CTID 101

vzctl set 101 --quotaugidlimit 100 --save          Set number of user/group id's allowed for internal disk
                                                                     quota,if 0 UID/GUID quota will not be allowed\

 vzctl set 0 --dcachesize 5G --save        Set dcachesize of the hardware node

sysctl fs.fsync-enable=0     or  echo 0 > /proc/sys/fs/fsync-enable        disable fsync calls inside containers .

Add the  …

Enable TUN/TAP and PPD in VM on open VZ

How to enable TUN/TAP and PPD in VM on open VZ ========================================
Please use the below steps to Enable TUN/TAP and PPD in VM on open VZ.




   1.Check the Node is enabled with tun/tap by entering the same from
solusVM.
   >> Go to list node >> edit node >> check "Allow clients to set TUN/TAP"
and "Allow clients to set PPP".

   2.How to enable TUN/TAP in OpenVZ?
========================================================================================    
+++++++++++++++++++++++++++++++++++++++++++++
STEP 1: Login to Node via SSH
STEP 2: Run the below pasted command to find out tun module is already loaded
or not

[root@Node]# lsmod | grep tun
[root@Node]#

  If the outp