remove linux tuning tips

Not verified and not reliable
This commit is contained in:
Carla Schroder
2015-08-20 11:13:30 -07:00
parent 16b52d2cb4
commit 5ba5a6d7f5

View File

@@ -475,123 +475,6 @@ When ORA-56600 occurs (Oracle Bug 8467564) set this php.ini setting:
.. _oracle forum discussion:
https://community.oracle.com/message/3468020#3468020
********************
General Linux tuning
********************
System configuration overview
=============================
.. code-block:: console
# cat /etc/sysctl.conf
...
net.core.somaxconn = 4096
net.ipv4.tcp_max_syn_backlog = 2048
...
# ulimit -nH 4096
Make sure that your ``/tmp`` is in ramdisk which improves session handling
performance. To do so, add the following to ``/etc/fstab``::
none /tmp tmpfs,size=6g defaults
Make sure the APC or Opcache bytecode cache is installed. This example is for
CentOS/Red Hat/Fedora running PHP 5.4:
.. code-block:: console
$ sudo yum install php-pecl-apc
On Ubuntu systems running PHP 5.4 this command installs APC:
.. code-block:: console
$ sudo apt-get install php-apc
PHP 5.5 replaces APC with OPCache. OPCache is bundled with PHP 5.5 so it should
not be necessary to install it separately. OPCache improves PHP performance by
storing precompiled script bytecode in shared memory, thereby removing the need
for PHP to load and parse scripts on each request. This extension is bundled
with PHP 5.5.0 and later, and is available in PECL for PHP versions 5.2, 5.3,
and 5.4.
APC is both an opcode cache and data store. OPCache is only an opcode cache, so
for caching user data you should also install APCu.
You can test the state of APC(u) by putting the testing file from the
documentation
in your server root. It is usually called 'apc.php' and can be found in
/usr/share/doc/php5-apcu/apc.php or /usr/share/doc/packages/php5-apcu/apc.php or
a similar location, depending on your distribution.
Tuning System Parameters
========================
Configuration for more concurrent requests.
.. code-block:: bash
echo "2048 64512" > /proc/sys/net/ipv4/ip_local_port_range
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse
echo "10" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "65536" > /proc/sys/net/core/somaxconn
echo "65536" > /proc/sys/net/ipv4/tcp_max_syn_backlog
echo "262144" > /proc/sys/net/netfilter/nf_conntrack_max
Check if the values have been set accordingly:
.. code-block:: console
# cat /proc/sys/net/ipv4/ip_local_port_range
2048 64512
# cat /proc/sys/net/ipv4/tcp_tw_recycle
1
# cat /proc/sys/net/ipv4/tcp_tw_reuse
1
# cat /proc/sys/net/ipv4/tcp_fin_timeout
10
# cat /proc/sys/net/core/somaxconn
65536
# cat /proc/sys/net/ipv4/tcp_max_syn_backlog
65536
# cat /proc/sys/net/netfilter/nf_conntrack_max
262144
Next, persist the settings across reboots by adding them into
``/etc/sysctl.conf``::
net.ipv4.ip_local_port_range = 2048 64512
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 10
net.core.somaxconn = 65536
net.ipv4.tcp_max_syn_backlog = 65536
net.netfilter.nf_conntrack_max = 262144
Tuning Memory
=============
Add RAM disk to fstab::
- none /var/www/html tmpfs defaults,size=6g
Move PHP Code into RAM Disk:
.. code-block:: console
# mv /var/www/html /var/www/html_fs
Copy ownCloud installation to RAM Disk and symlink storage to ownCloud ``data``
directory.
.. note:: ram disks are not reboot-safe. You need to establish a way to persist
them, for instance by using ``cp`` or ``rsync`` to transfer them from a
location on the hard disk to the ram disk before apache starts.
********************
SSL / Encryption App
********************