lost and found ( for me ? )

Tuning Apache 2.4.6(MaxClients, MaxServers etc) on CentOS7

Reference

[root@localhost ~]# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)

[root@localhost ~]# yum install httpd -y

[root@localhost ~]# httpd -version
Server version: Apache/2.4.6 (CentOS)
Server built:   Nov 19 2015 21:43:13

confirm which multi processing module(prefork, worker, event) Apache loads.
In my case, Apache loads prefork module.
# httpd -V
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
Server version: Apache/2.4.6 (CentOS)
Server built:   Nov 19 2015 21:43:13
Server's Module Magic Number: 20120211:24
Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     prefork
 threaded:     no
   forked:     yes (variable process count)
Server compiled with....


[root@localhost ~]# httpd -M | grep prefork
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
mpm_prefork_module (shared)

[root@localhost ~]# grep -v ^# /etc/httpd/conf.modules.d/00-mpm.conf | grep -v ^$
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

edit httpd.conf
[root@localhost ~]# tail -10 /etc/httpd/conf/httpd.conf
IncludeOptional conf.d/*.conf

<IfModule mpm_prefork_module>
 StartServers       100
 MinSpareServers    100
 MaxSpareServers    100
 MaxClients         512
 ServerLimit 512
 MaxRequestsPerChild  1000
</IfModule>

restart httpd to reflect that.
[root@localhost ~]# systemctl restart httpd.service

Use KVM and VIrtualbox on the same machine ( Ubuntu 14.04 )

Here is how to use KVM and Virtualbox on Ubuntu 14.04

Reference
http://www.dedoimedo.com/computers/kvm-virtualbox.html

# kvm --version
QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.21), Copyright (c) 2003-2008 Fabrice Bellard

# dpkg -l | grep virtualbox
ii  unity-scope-virtualbox                                0.1+13.10.20130723-0ubuntu1                         all          VirtualBox scope for Unity
ii  virtualbox-5.0                                        5.0.12-104815~Ubuntu~trusty                         amd64        Oracle VM VirtualBox


You can not use Virtualbox and KVM simultaneously due to conflicts of kernel modules.

- switch to virtualbox from KVM

remove kernel modules of KVM.

root@ubuntu:~# modprobe -r kvm
root@ubuntu:~# modprobe -r kvm_amd
root@ubuntu:~#

load vbox kernel modules.

root@ubuntu:~# /etc/init.d/vboxdrv start
Starting VirtualBox kernel modules ...done.
root@ubuntu:~#

root@ubuntu:~# lsmod | grep vbox
vboxpci                24576  0
vboxnetadp             28672  0
vboxnetflt             28672  0
vboxdrv               450560  3 vboxnetadp,vboxnetflt,vboxpci
root@ubuntu:~#

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos60'...
Progress: 60%


$ vagrant ssh

$ vagrant ssh
Last login: Wed Nov 16 16:28:21 2011 from 10.0.2.2
[vagrant@localhost ~]$ exit
logout
Connection to 127.0.0.1 closed.

hattori@ubuntu:~/Vagrant_works/Works1$ vagrant halt
==> default: Attempting graceful shutdown of VM...


- switch to KVM from virtualbox

remove vbox kernel modules

$ sudo /etc/init.d/vboxdrv stop
Stopping VirtualBox kernel modules ...done.

$ sudo lsmod | grep vbox
$

load kvm kernel modules

$ sudo modprobe kvm_amd

$ sudo lsmod | grep kvm
kvm_amd                61440  0

kvm                   479232  1 kvm_amd