I am trying to optimize a set of servers that have to reside on single machine. i.e. i can have multiple application server, a DB server and of course a samba server as well in same instance. Now I was looking into several optimizing options available to me. In my quest, i did my tuning of the network stack. coming to the CPU, MEMORY and the BLKIO tweaks, i am using CGROUPS. The problem i am facing is that for enhanced performance in the nature of the applications that i am running, the CFQ Scheduler that is implemented for the BLKIO subsystem is not optimal. I was looking more for a Deadline Scheduler because that will serve my purpose well. My question is whether it is possible for us to change the scheduler in the kernel compilation itself for the BLKIO to Deadline and it will reflect in my usage of [CGROUP hierarchies][3]? Since when running the service cgconf, a new fs is mounted and i dont want it to revert to CFQ scheduler. I also welcome any suggestions that will enable me to have more control over my resources.

EDIT: I am using CentOS 6.2 for the testing. It will be later pushed on Redhat 6.2

  • Some parts of the blkio cgroup do not work in deadline. For example proportional weighting - since weight has no function in deadline. People who use SSDs or have a lot of disks (>= 8) striped in some fashion shouldn't use CFQ as there comes a point that the CPU cost in making weighting decisions for backing media is offset by the actual access, read/write times of the backing media itself. – Matthew Ife Dec 15 '12 at 11:14
  • What OS/version/kernel/distribution are you using? If Red Hat/CentOS, there are some other utilities worth exploring. – ewwhite Dec 15 '12 at 11:31
  • Can you explain why you have multiple virtual servers on a single server to host the applications, rather than just run all these applications in parallel on a single server? I do not understand the purpose of virtual machines in your setup when all VM's run on a single host. – Matthew Ife Dec 15 '12 at 11:40
  • @MIfe Effective and granular assignment of resources on a large system. – ewwhite Dec 15 '12 at 11:41
  • @ewwhite I fail to see why the resource management desired is not possible on a single host, using cgroups (which are already being used anyway) with much lower overheads, a simpler design and finer grained control of resources since the single kernel will manage the state of all processes. – Matthew Ife Dec 15 '12 at 11:49

I would really like to see you use RHEL/CentOS 6.3. Version 6.2 of EL was short-lived, and many of the bugfixes and enhancements were targeted for the release of newer point-release kernels. Red Hat/CentOS make this extremely clear, since there are NO updates for 6.2, and the packages are only available in the vault archive.

Either way, the tool you should make use of is the tuned and tuned-adm framework. Some of this is detailed here, in this question, with a more storage-focused answer here.

tuned-adm allows you to apply profiles to the system on-the-fly. Enabling a profile with: tuned-adm profile enterprise-storage, for instance, will apply the changes in the last column in the graph below; including remounting the filesystems with nobarrier and changing the I/O scheduler to deadline across the available block devices. Unfortunately, the virtual-guest profile only comes in EL 6.3 or newer... :( Another reason to upgrade...

In the end, tuned is a daemon, so it can be stopped/restarted on the fly. Just reload/reapply the service when a new FS is mounted. It will take care of the rest. You can also create your own profile with sysctl.conf and other performance settings...

enter image description here

  • I will definitely check out the tuned daemon. I came across it somewhile back but didn't dig deep. Are there perchance any more utils that you know of that i should look into? – Aamir Mushtaq Dec 15 '12 at 12:21
  • @AamirMushtaq Not really. What I specified in my answer was a way to tune your system without reboots in a modular and consistent manner. I'd also strongly suggest standardizing on something newer than EL 6.2. – ewwhite Dec 15 '12 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.