1 Davor Guttierrez 3 Gen d.o.o. Optimizing Linux Servers
2 What is optimization? Our server is slow We have new very expensive server but... We have new Linux distribution but... What is slow in your server? Too many services running,... Disk, I/O,...
3 Performance To boost performance of a server, we need just both its hardware and software components to make it operate efficiently.
4 Server optimization Optimization can include fine tuning of web servers (Apache, lighttpd, nginx etc), disk I/O, block devices, RAID or different filesystems (including SCSI and SSD devices), kernel, network I/O, TCP/IP network stack, firewall etc. as well as databases optimization benchmarking and profiling, finding bottlenecks, settings optimization; data storages tuning; disk and memory usage optimization
5 Start here... Always make custom installation of server, don't use default settings and default install Install only needed packages, never install whole group of packages You don't need X Window and GNOME on your server Console is 40x25 characters long and not 1024x768
6 Apache Tuning Make sure you starting a ton of initial daemons if you want good benchmark scores. Something like: MinSpareServers 20 MaxSpareServers 80 StartServers 32 this can be higher if apache is recompiled MaxClients 256 MaxRequestsPerChild Note: Starting a massive amount of httpd processes is really a benchmark hack. In most real world cases, setting a high number for max servers, and a sane spare server setting will be more than adequate. It's just the instant on load that benchmarks typically generate that the StartServers helps with.
7 Disk I/O optimization Linux currently ships with four different I/O schedulers. They are: deadline, noop, anticipatory, and cfq. There are many differences between these scheduling algorithms, here is a brief outline of each: CFQ: This is the default algorithm in most Linux distributions. It attempts to distribute all I/O bandwidth evenly among all processes requesting I/O. It is ideal for most purposes. NOOP: The noop algorithm attempts to use as little cpu as possible. It acts as a basic FIFO queue expecting the hardware controller to handle the performance operations of the requests. Anticipatory: This algorithm attempts to reorder all disk I/O operations to optimize disk seeks. It is designed to increase performance on systems that have slow disks. Deadline: This scheduling algorithm places I/O requests in a priority queue so each is guaranteed to be ran within a certain time. It is often used in real-time operating systems.
8 Disk I/O optimization Filesystem to use: EXT2 EXT3 ReiserFS EXT4 BTRFS Use FS options in fstab (noatime,...)
9 Disk I/O optimization RAID (software or hardware) RAID0 RAID1 RAID5 RAID10
10 Disk optimization Use benchmark programs like Bonnie++ Use hdparm Upgrade BIOS of your server
11 TCP Tunning For servers that are serving up huge numbers of concurent sessions, there are some tcp options that should probabaly be enabled. With a large # of clients doing their best to kill the server, its probabaly not uncommon for the server to have or more open sockets. Allows more local ports to be available echo > /proc/sys/net/ipv4/ip_local_port_range Increasing the amount of memory associated with socket buffers can often improve performance echo > /proc/sys/net/core/rmem_max echo > /proc/sys/net/core/rmem_default These reduce the amount of work the TCP stack has to do, so is often helpful in this situation echo 0 > /proc/sys/net/ipv4/tcp_sack echo 0 > /proc/sys/net/ipv4/tcp_timestamps
12 System Monitoring vmstat netstat ps top atop mtop
13 Kernel Tuning Recompile your kernel Exclude unneeded modules Use RealTime kernel
14 Memory optimization Use ECC RAM yes it's expensive Use more swap space application... Don't use swap partition, use swap file,
15 Samba tuning Rebuild it with mmap support. In cases where you are serving up a large amount of small files, this seems to be particularly useful. You just need to add a "--with-mmap" to the configure line.
16 Database optimization MySQL use MySQL tuning App Optimize table Do you use InnoDB or MyISSAM DB? Change database if possible
17 OpenLDAP Tuning The most important tuning aspect for OpenLDAP is deciding what attributes you want to build indexes on. Cachesize dbcachesize sizelimit loglevel 0 dbcachenowsync index cn,uid index uidnumber index gid index gidnumber index mail If you add the following parameters to /etc/openldap/slapd.conf before entering the info into the database, they will all get indexed and performance will increase.
18 Slow websites Use optimizers Use memcache Tune your apache Minimize number of Apache modules Change Apache for Nginx
19 Benchmark A good set of benchmarking utilities are often very helpful in doing system tuning work. It is impossible to duplicate "real world" situations, but that isnt really the goal of a good benchmark. A good benchmark typically tries to measure the performance of one particular thing very accurately. If you understand what the benchmarks are doing, they can be very useful tools.
DEPLOYMENT GUIDE Version 1.0 Deploying F5 with Apache Web Servers Table of Contents Table of Contents Deploying the BIG-IP LTM with the Apache web server Prerequisites and configuration notes... 1 Product
ASPE IT Training SQL Server Performance Tuning for DBAs A WHITE PAPER PREPARED FOR ASPE BY TOM CARPENTER www.aspe-it.com toll-free: 877-800-5221 SQL Server Performance Tuning for DBAs DBAs are often tasked
INTRODUCTION TO LINUX CLUSTERING DOCUMENT RELEASE 1.1 Copyright 2008 Jethro Carr This document may be freely distributed provided that it is not modified and that full credit is given to the original author.
Linux Software Raid Aug 2010 Mark A. Davis a What is RAID? Redundant Array of Inexpensive/Independent Drives It is a method of combining more than one hard drive into a logic unit for the purpose of: Increasing
This document will list the ManageEngine Applications Manager best practices 1. Hardware and Software requirements 2. Configuring Applications Manager 3. Securing Applications Manager 4. Fault Management
Release 2.3.4 - February 2005 Linux System and Performance Monitoring Darren Hoch Director of Professional Services StrongMail Systems, Inc. Linux Performance Monitoring PUBLISHED BY: Darren Hoch StrongMail
Deployment Planning Guide August 2011 Copyright: 2011, CCH, a Wolters Kluwer business. All rights reserved. Material in this publication may not be reproduced or transmitted in any form or by any means,
Best Practices Guide McAfee epolicy Orchestrator for use with epolicy Orchestrator versions 4.5.0 and 4.0.0 COPYRIGHT Copyright 2011 McAfee, Inc. All Rights Reserved. No part of this publication may be
Network Monitoring with Xian Network Manager Did you ever got caught by surprise because of a network problem and had downtime as a result? What about monitoring your network? Network downtime or network
Journyx Technical Document System Administration and Disaster Recovery Guide For Journyx Timesheet version 8.7m5 Document Version: 3.0.9 (January 2012) for version 8.7m5 For product versions prior to 8.7m5
www.freeraidrecovery.com Practical issues in DIY RAID Recovery Based on years of technical support experience 2012 www.freeraidrecovery.com This guide is provided to supplement our ReclaiMe Free RAID Recovery
Intel RAID Software User s Guide: Intel Embedded Server RAID Technology II Intel Integrated Server RAID Intel RAID Controllers using the Intel RAID Software Stack 3 Revision 8.0 August, 2008 Intel Order
6Gb/s SATA RAID TB T12-S6.TB - Desktop RM12-S6.TB - Rackmount User Manual Version: 1.0 Issue Date: October, 2013 ARCHTTP PROXY SERVER INSTALLATION 5.5 For Mac OS 10.X The ArcHttp proxy server is provided
Table of Contents Foreword................................................................... xv Preface.................................................................... xvii 1. MySQL Architecture and
Intel RAID Software User s Guide: Intel Embedded Server RAID Technology II Intel Integrated Server RAID Intel RAID Controllers using the Intel RAID Software Stack 3 Revision 11.0 July, 2009 Intel Order
AIX Monitoring Guidelines Best Practice www.halcyonsoftware.com About Ash Giddings With more than 20 years experience in the IT industry and coming from an operational background, Ash Giddings is a commercially
Performance Study VirtualCenter Database Performance for Microsoft SQL Server 2005 VirtualCenter 2.5 VMware VirtualCenter uses a database to store metadata on the state of a VMware Infrastructure environment.
Monitoring the Microsoft Windows Server System with PATROL - a Best Practices Guide Contents Introduction...1 Establishing a Baseline...1 The Operating System...1 CPU...2 Memory...4 Network...7 Disk...8
Parallels Cloud Server 6.0 User's Guide March 17, 2015 Copyright 1999-2015 Parallels IP Holdings GmbH and its affiliates. All rights reserved. Parallels IP Holdings GmbH Vordergasse 59 8200 Schaffhausen
RAID Basics Training Guide Discover a Higher Level of Performance RAID matters. Rely on Intel RAID. Table of Contents 1. What is RAID? 2. RAID Levels RAID 0 RAID 1 RAID 5 RAID 6 RAID 10 RAID 0+1 RAID 1E
Kaseya Performance And Best Practices Guide Authors: Jacques Eagle Date: Thursday, April 29, 2010 1 P a g e Contents Introduction... 5 B.0 - The Basics... 6 B.1 - Hot Fixes... 6 B.2 64 bit versus 32 bit
An Oracle White Paper March 2013 Load Testing Best Practices for Oracle E- Business Suite using Oracle Application Testing Suite Executive Overview... 1 Introduction... 1 Oracle Load Testing Setup... 2
E-mail Filter SurfControl E-mail Filter 5.0 for SMTP Getting Started Guide www.surfcontrol.com The World s #1 Web & E-mail Filtering Company CONTENTS CONTENTS INTRODUCTION About This Document...2 Product
1 von 14 15.06.2010 05:12 About Forum Howtos & FAQs Low graphics Shell Scripts RSS/Feed nixcraft - insight into linux admin work Home > CentOS by Vivek Gite 134 comments Need to monitor Linux server performance?