Davor Guttierrez dguttierrez@me.com 3 Gen d.o.o. Optimizing Linux Servers



Similar documents
Davor Guttierrez 3 Gen d.o.o. Optimizing Linux Servers

Secure Web. Hardware Sizing Guide

Web Hosting for Fame and Fortune. A Guide to using Apache as your web-server solution

PERFORMANCE TUNING ORACLE RAC ON LINUX

Drupal Performance Tuning

Performance Tuning and Optimization for high traffic Drupal sites. Khalid Baheyeldin Drupal Camp, Toronto May 11 12, 2007

Virtualization and Performance NSRC

The current version installed on your server is el6.x86_64 and it's the latest available.

Wednesday, October 10, 12. Running a High Performance LAMP stack on a $20 Virtual Server

Running MySQL on CentOS Linux. Peter Zaitsev April 14, 2014

KVM PERFORMANCE IMPROVEMENTS AND OPTIMIZATIONS. Mark Wagner Principal SW Engineer, Red Hat August 14, 2011

Apache and Tomcat Clustering Configuration Table of Contents

ontune SPA - Server Performance Monitor and Analysis Tool

MAGENTO HOSTING Progressive Server Performance Improvements

Drupal in the Cloud. by Azhan Founder/Director S & A Solutions

Advanced Linux System Administration on Red Hat

Monitoring and Alerting

Performance and scalability of a large OLTP workload

Hardware Performance Optimization and Tuning. Presenter: Tom Arakelian Assistant: Guy Ingalls

Optimizing TYPO3 performance

OS Installation Guide Red Hat Linux 9.0

Optimizing Linux Performance

CIT 668: System Architecture. Performance Testing

Web Server Deathmatch

AirWave 7.7. Server Sizing Guide

Linux Software Raid. Aug Mark A. Davis

Audit & Tune Deliverables

Choosing Storage Systems

Linux Tools for Monitoring and Performance. Khalid Baheyeldin November 2009 KWLUG

20 Command Line Tools to Monitor Linux Performance

ServerPronto Cloud User Guide

Linux Performance Optimizations for Big Data Environments

OVERVIEW Methodology Objectives Terminology Recommended Test Protocol... 3 CLOUD SERVICES VS. DEDICATED HOSTING...

Deployment Guide. How to prepare your environment for an OnApp Cloud deployment.

Storage benchmarking cookbook

CLOUDSPECS PERFORMANCE REPORT LUNACLOUD, AMAZON EC2, RACKSPACE CLOUD AUTHOR: KENNY LI NOVEMBER 2012

Pricing Guide. Overview FD Enterprise License SaaS Packages Dedicated SaaS Shared SaaS. Page 2 Page 3 Page 4 Page 5 Page 8

Practical Load Balancing

Redhat 6.2 Installation Howto -Basic Proxy and Transparent

RED HAT ENTERPRISE LINUX 7

NGS BioAssist- meeting Wai Yi Leung (LUMC)

AirWave 8.0. Server Sizing Guide

GraySort on Apache Spark by Databricks

Windows Server Performance Monitoring

Tomcat Tuning. Mark Thomas April 2009

Proposed Scalability and Performance Roadmap. Ken Rozendal IBM Fall 2000

White paper. QNAP Turbo NAS with SSD Cache

Globus Striped GridFTP Framework and Server. Raj Kettimuthu, ANL and U. Chicago

Chapter 11 I/O Management and Disk Scheduling

Tushar Joshi Turtle Networks Ltd

MySQL performance in a cloud. Mark Callaghan

SQL Server Performance Tuning and Optimization

Blueprints for Scalable IBM Spectrum Protect (TSM) Disk-based Backup Solutions

What is a Web Hosting Service? Running A Successful Web Hosting Business

EUCIP IT Administrator - Module 2 Operating Systems Syllabus Version 3.0

Rails Application Deployment. July Philly on Rails

How To Configure Apa Web Server For High Performance

Best Practices for Using MySQL in the Cloud

When talking about hosting

Database Hardware Selection Guidelines

Application Performance Testing Basics

Distribution One Server Requirements

How To Run A Power5 On A Powerbook On A Mini Computer (Power5) On A Microsoft Powerbook (Power4) On An Ipa (Power3) On Your Computer Or Ipa On A Minium (Power2

A candidate following a programme of learning leading to this unit will be able to:

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

Linux Performance Tuning

Performance Tuning and Optimizing SQL Databases 2016

Linux Troubleshooting. 5 Days

SUN COBALT RaQ 4 Server Appliance FAQ

DESIGN AND IMPLEMENTATION OF A WEB SERVER FOR A HOSTING SERVICE

Timing of a Disk I/O Transfer

Pump Up Your Network Server Performance with HP- UX

Redpaper. Tuning Red Hat Enterprise Linux on IBM Eserver xseries Servers. Front cover. ibm.com/redbooks. Describes ways to tune the operating system

Middleware and Distributed Systems. Design of Scalable Servers. Martin v. Löwis. Donnerstag, 16. Februar 12

BASICS OF SCALING: LOAD BALANCERS

Chapter 11 I/O Management and Disk Scheduling

This guide specifies the required and supported system elements for the application.

DSS. Diskpool and cloud storage benchmarks used in IT-DSS. Data & Storage Services. Geoffray ADDE

Search and Destroy: ELIMINATING PERFORMANCE BOTTLENECKS

Microsoft SQL Server: MS Performance Tuning and Optimization Digital

I3: Maximizing Packet Capture Performance. Andrew Brown

The safer, easier way to help you pass any IT exams. Industry Standard Architecture and Technology. Title : Version : Demo 1 / 5

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

HPC performance applications on Virtual Clusters

Enterprise Network Deployment, 10,000 25,000 Users

Tuning for Web Serving on the Red Hat Enterprise Linux 6.4 KVM Hypervisor. Barry Arndt - Linux Technology Center, IBM

Ensuring scalability and performance with Drupal as your audience grows

Which Database is Better for Zabbix? PostgreSQL vs MySQL. Yoshiharu Mori SRA OSS Inc. Japan

Benchmarking FreeBSD. Ivan Voras

UBUNTU DISK IO BENCHMARK TEST RESULTS

Which filesystem should I use? LinuxTag Heinz Mauelshagen Consulting Development Engineer

MySQL Cluster Deployment Best Practices

REDEFINING THE ENTERPRISE OS RED HAT ENTERPRISE LINUX 7

The Monitis Monitoring Agent ver. 1.2

Red Hat Linux Administration II Installation, Configuration, Software and Troubleshooting

Accelerate Oracle Performance by Using SmartCache of T Series Unified Storage

The team that wrote this redbook Comments welcome Introduction p. 1 Three phases p. 1 Netfinity Performance Lab p. 2 IBM Center for Microsoft

Your Server Support Looking after your servers, giving you peace of mind

Gateway Portal Load Balancing

Implementing Internet Storage Service Using OpenAFS. Sungjin Dongguen Arum

Transcription:

Davor Guttierrez dguttierrez@me.com 3 Gen d.o.o. Optimizing Linux Servers

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,...

Performance To boost performance of a server, we need just both its hardware and software components to make it operate efficiently.

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

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

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 10000 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.

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.

Disk I/O optimization Filesystem to use: EXT2 EXT3 ReiserFS EXT4 BTRFS Use FS options in fstab (noatime,...)

Disk I/O optimization RAID (software or hardware) RAID0 RAID1 RAID5 RAID10

Disk optimization Use benchmark programs like Bonnie++ Use hdparm Upgrade BIOS of your server

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 20000 or more open sockets. Allows more local ports to be available echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range Increasing the amount of memory associated with socket buffers can often improve performance echo 262143 > /proc/sys/net/core/rmem_max echo 262143 > /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

System Monitoring vmstat netstat ps top atop mtop

Kernel Tuning Recompile your kernel Exclude unneeded modules Use RealTime kernel

Memory optimization Use ECC RAM yes it's expensive Use more swap space application... Don't use swap partition, use swap file,

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.

Database optimization MySQL use MySQL tuning App Optimize table Do you use InnoDB or MyISSAM DB? Change database if possible

OpenLDAP Tuning The most important tuning aspect for OpenLDAP is deciding what attributes you want to build indexes on. Cachesize 10000 dbcachesize 100000 sizelimit 10000 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.

Slow websites Use optimizers Use memcache Tune your apache Minimize number of Apache modules Change Apache for Nginx

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.

Benchmark Tools Bonnie DBench http_load dkftpbench tiobench dt ttcp netperf httperf autobench

TNX... E-mail: dguttierrez Blog: www.d-mashina.net CV: www.guttierrez.org