SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
NLUUG 15 May 2014
Performance tuning a public mirror server
Mike Hulsman
mike.hulsman@proxy.nl
NLUUG 15 May 2014
My background
• Been a sysadmin since 1990
• Around 1995 started using Linux
• Since 2012 supporting ftp.nluug.nl
• Working @ Proxy in the Managed Services Team
NLUUG 15 May 2014
Hobby
NLUUG 15 May 2014
History of ftp.nluug.nl
• December 1992 – total download 448575834 bytes
NLUUG 15 May 2014
Former hardware
• 2 servers round robin DNS
• All SCSI storage attached to 1 server
• Storage exported with NFS and GFS
NLUUG 15 May 2014
Current Hardware
• 1 server
• Xeon E3-1220 3.1 Ghz
• 16 GB Memory
• LSI Megaraid SAS 9271-4i
• 4 x 1GB ethernet
• 13 x 2TB disk, 12 disks in Raid5
• 1 hot spare drive
• 11 free positions for extra drives
NLUUG 15 May 2014
Performance servers 1 day avg
Max 480 Mb/s
Avg 160 Mb/s
2 TB/day
Max 800 Mb/s
Avg 340 Mb/s
4 TB/day
The current server
The 2 servers
NLUUG 15 May 2014
What we serve
• 17 TB of used storage
• 13.800.038 files
• 12.224.856 files smaller than 1 MB
• 681.468 directories
• 1.606.561 links (hard and soft links)
NLUUG 15 May 2014
Max of TB/month
Jun 2013 Oct 2013 Apr 2008 May 2013 Nov 2013 Feb 2014 Mar 2014 Dec 2013 Jan 2014 Apr 2014
0
20
40
60
80
100
120
140
93.67 94.61 94.66 96.43
103.94
109.47
117.63 118.05 119.84
128.62
TB/month
NLUUG 15 May 2014
Atoptool with netatop
• Atoptool together with netatop kernel module
•
NLUUG 15 May 2014
Mrtg
NLUUG 15 May 2014
Munin
NLUUG 15 May 2014
Nagios
NLUUG 15 May 2014
Design decisions new server
• Machine is I/O based not CPU or Memory
• Disk I/O should be as fast as possible
• 4 x 1 Gb ethernet cards in bonding mode
• Is a public mirror server, downtime is not critical
• Costs effective, whole server including disks costed about 5K
NLUUG 15 May 2014
Raid setup
• Machine build was in november 2012
• Hitachi Ultrastar 7k3000 2 TB drives
– 2.0 million hours MTBF, 5 years guaranty
– 64 MB cache
• LSI MegaRAID SAS 9271-4i Card
– 1 Gb cache memory
– CacheVault, NV Flash cache and battery
• 256kB Stripe size
• 12 disks in Raid5 1 hot spare
NLUUG 15 May 2014
What was changed
NLUUG 15 May 2014
Problem #1
• 4 x 1Gb ethernet interfaces
– Bonded as balance-alb
• Send and receive are bonded
– Did not work out as we thought.
– Maximum speed of all interfaces together did not exceed 960 Mb/s
• In June 2013 together with Surfnet assistance moved to
802.3ad and xmit_hash_policy=layer3+4
– With atop we could see that the balancing is working
– Did not work out as aspected
– Maximum speed at that time was 993 Mb/s
NLUUG 15 May 2014
Solution
• Changes in the bonding parameters
• Upgraded / downgraded ethernet driver versions
• Tuning kernel parameters
• Crap said the Surfnet engineer ;-)
• Connection to a Cisco module where 8 ports have only a 1
Gb/s backend port.
• We were on ports Gi9/3 Gi9/4 Gi9/5 Gi9/6
• After rerouting ports (Gi9/3 Gi9/11 Gi9/17 Gi9/28) peaks of
2.4 Gb/s were seen
NLUUG 15 May 2014
The whole process of tuning
• At first I did not document, only implement
– Now I document what I changed, including time stamp
• Buffers were too small
• Timeout's were too long
• Did not know where to start
• So many performance tuning articles
• The problem with a public mirror server is that it is public
• I even changed parameters while writing this presentation
NLUUG 15 May 2014
Firewall
• Lot's of messages ip_conntrack: table full
– net.netfilter.nf_conntrack_max = 1048576
• wc -l /proc/net/nf_conntrack
– net.netfilter.nf_conntrack_tcp_timeout_established = 600
• Defaults are 432000 (5 day's)
NLUUG 15 May 2014
We can get troughput
NLUUG 15 May 2014
Networking buffers
• Ethtool -G ethx rx 4096 tx 4096
• Ifconfig ethx txqueuelen 20000
– Also for bonding interface (not sure if needed)
• Ethtool -K ethx gso on (generic-segmentation-offload)
• Ethtool -K ethx gro on (generic-receive-offload)
NLUUG 15 May 2014
Filesystems
• Limited to 3TB filesystems
• Echo “noop” > /sys/block/sda/queue/scheduler
– Also tried deadline
• All are ext4
– options noatime,nodiratime,noacl,commit=15
• LSI CacheFlushInterval=10 (default 5)
NLUUG 15 May 2014
OS level
• irqbalance to oneshot
• Chkconfig –del cpuspeed; service stop cpuspeed
• vm.min_free_kbytes=204800
– To prevent out of memory errors
– Prevent deadlocks under high loads
• Ulimit
– Max openfiles
NLUUG 15 May 2014
Yum-plugin-fastestmirror
• centos.mirror1.spango.com 1.624 ms
• ftp.nluug.nl 1.533 ms
• mirror.prolocation.net 1.44 ms
• mirror.widexs.nl 1.371 ms
• Add “prefer=ftp.nluug.nl” to
/etc/yum/pluginconf.d/fastestmirror.conf
NLUUG 15 May 2014
Application level
• Rsync just the standards
• Vsftpd just the standards
• Apache 2.2.15
– Were running 4 instances, 1 for every IPv4 and Ipv6
– Reduce now to 1 instance
– KeepAlive On
– MaxKeepAliveRequests 1000
– ServerLimit 1024
– MaxClients 1024
– MaxRequestsPerChild 800
NLUUG 15 May 2014
Future
• Hardware
– Memory from 16GB to 32 GB
• Add more opensource projects
– Than we need more disks
• Nginx
•
• Maybe I should try XFS in the future
• We just need more hits !!
NLUUG 15 May 2014
Some of the mirrors
• Most Linux distributions are mirrored (currently 163 different)
• BSD (FreeBSD, NetBSD, OpenBSD
• Openindiana, opensolaris, illumos
• Jenkins
• Mariadb
• Vim
• Blender, gimp, ImageMagick
• Apache
• Qt , perl, gcc
• Vlc, xbmc, openelec
NLUUG 15 May 2014
• Questions......
• mike.hulsman@proxy.nl
• ftp-admin@nluug.nl
NLUUG 15 May 2014
List of URL's
• https://github.com/jeffmurphy/NetPass/blob/master/doc/netfilter
• https://gist.github.com/kfox/1942782
• http://www.atoptool.nl/
• http://www.bufferbloat.net/attachments/9/BufferBloat11.pdf
• http://lwn.net/Articles/507065/
• http://www.coverfire.com/articles/queueing-in-the-linux-network-

Weitere ähnliche Inhalte

Kürzlich hochgeladen

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Kürzlich hochgeladen (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

Empfohlen

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Empfohlen (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Performance tuning a public mirror server - Mike Hulsman (Proxy)

  • 1. NLUUG 15 May 2014 Performance tuning a public mirror server Mike Hulsman mike.hulsman@proxy.nl
  • 2. NLUUG 15 May 2014 My background • Been a sysadmin since 1990 • Around 1995 started using Linux • Since 2012 supporting ftp.nluug.nl • Working @ Proxy in the Managed Services Team
  • 3. NLUUG 15 May 2014 Hobby
  • 4. NLUUG 15 May 2014 History of ftp.nluug.nl • December 1992 – total download 448575834 bytes
  • 5. NLUUG 15 May 2014 Former hardware • 2 servers round robin DNS • All SCSI storage attached to 1 server • Storage exported with NFS and GFS
  • 6. NLUUG 15 May 2014 Current Hardware • 1 server • Xeon E3-1220 3.1 Ghz • 16 GB Memory • LSI Megaraid SAS 9271-4i • 4 x 1GB ethernet • 13 x 2TB disk, 12 disks in Raid5 • 1 hot spare drive • 11 free positions for extra drives
  • 7. NLUUG 15 May 2014 Performance servers 1 day avg Max 480 Mb/s Avg 160 Mb/s 2 TB/day Max 800 Mb/s Avg 340 Mb/s 4 TB/day The current server The 2 servers
  • 8. NLUUG 15 May 2014 What we serve • 17 TB of used storage • 13.800.038 files • 12.224.856 files smaller than 1 MB • 681.468 directories • 1.606.561 links (hard and soft links)
  • 9. NLUUG 15 May 2014 Max of TB/month Jun 2013 Oct 2013 Apr 2008 May 2013 Nov 2013 Feb 2014 Mar 2014 Dec 2013 Jan 2014 Apr 2014 0 20 40 60 80 100 120 140 93.67 94.61 94.66 96.43 103.94 109.47 117.63 118.05 119.84 128.62 TB/month
  • 10. NLUUG 15 May 2014 Atoptool with netatop • Atoptool together with netatop kernel module •
  • 11. NLUUG 15 May 2014 Mrtg
  • 12. NLUUG 15 May 2014 Munin
  • 13. NLUUG 15 May 2014 Nagios
  • 14. NLUUG 15 May 2014 Design decisions new server • Machine is I/O based not CPU or Memory • Disk I/O should be as fast as possible • 4 x 1 Gb ethernet cards in bonding mode • Is a public mirror server, downtime is not critical • Costs effective, whole server including disks costed about 5K
  • 15. NLUUG 15 May 2014 Raid setup • Machine build was in november 2012 • Hitachi Ultrastar 7k3000 2 TB drives – 2.0 million hours MTBF, 5 years guaranty – 64 MB cache • LSI MegaRAID SAS 9271-4i Card – 1 Gb cache memory – CacheVault, NV Flash cache and battery • 256kB Stripe size • 12 disks in Raid5 1 hot spare
  • 16. NLUUG 15 May 2014 What was changed
  • 17. NLUUG 15 May 2014 Problem #1 • 4 x 1Gb ethernet interfaces – Bonded as balance-alb • Send and receive are bonded – Did not work out as we thought. – Maximum speed of all interfaces together did not exceed 960 Mb/s • In June 2013 together with Surfnet assistance moved to 802.3ad and xmit_hash_policy=layer3+4 – With atop we could see that the balancing is working – Did not work out as aspected – Maximum speed at that time was 993 Mb/s
  • 18. NLUUG 15 May 2014 Solution • Changes in the bonding parameters • Upgraded / downgraded ethernet driver versions • Tuning kernel parameters • Crap said the Surfnet engineer ;-) • Connection to a Cisco module where 8 ports have only a 1 Gb/s backend port. • We were on ports Gi9/3 Gi9/4 Gi9/5 Gi9/6 • After rerouting ports (Gi9/3 Gi9/11 Gi9/17 Gi9/28) peaks of 2.4 Gb/s were seen
  • 19. NLUUG 15 May 2014 The whole process of tuning • At first I did not document, only implement – Now I document what I changed, including time stamp • Buffers were too small • Timeout's were too long • Did not know where to start • So many performance tuning articles • The problem with a public mirror server is that it is public • I even changed parameters while writing this presentation
  • 20. NLUUG 15 May 2014 Firewall • Lot's of messages ip_conntrack: table full – net.netfilter.nf_conntrack_max = 1048576 • wc -l /proc/net/nf_conntrack – net.netfilter.nf_conntrack_tcp_timeout_established = 600 • Defaults are 432000 (5 day's)
  • 21. NLUUG 15 May 2014 We can get troughput
  • 22. NLUUG 15 May 2014 Networking buffers • Ethtool -G ethx rx 4096 tx 4096 • Ifconfig ethx txqueuelen 20000 – Also for bonding interface (not sure if needed) • Ethtool -K ethx gso on (generic-segmentation-offload) • Ethtool -K ethx gro on (generic-receive-offload)
  • 23. NLUUG 15 May 2014 Filesystems • Limited to 3TB filesystems • Echo “noop” > /sys/block/sda/queue/scheduler – Also tried deadline • All are ext4 – options noatime,nodiratime,noacl,commit=15 • LSI CacheFlushInterval=10 (default 5)
  • 24. NLUUG 15 May 2014 OS level • irqbalance to oneshot • Chkconfig –del cpuspeed; service stop cpuspeed • vm.min_free_kbytes=204800 – To prevent out of memory errors – Prevent deadlocks under high loads • Ulimit – Max openfiles
  • 25. NLUUG 15 May 2014 Yum-plugin-fastestmirror • centos.mirror1.spango.com 1.624 ms • ftp.nluug.nl 1.533 ms • mirror.prolocation.net 1.44 ms • mirror.widexs.nl 1.371 ms • Add “prefer=ftp.nluug.nl” to /etc/yum/pluginconf.d/fastestmirror.conf
  • 26. NLUUG 15 May 2014 Application level • Rsync just the standards • Vsftpd just the standards • Apache 2.2.15 – Were running 4 instances, 1 for every IPv4 and Ipv6 – Reduce now to 1 instance – KeepAlive On – MaxKeepAliveRequests 1000 – ServerLimit 1024 – MaxClients 1024 – MaxRequestsPerChild 800
  • 27. NLUUG 15 May 2014 Future • Hardware – Memory from 16GB to 32 GB • Add more opensource projects – Than we need more disks • Nginx • • Maybe I should try XFS in the future • We just need more hits !!
  • 28. NLUUG 15 May 2014 Some of the mirrors • Most Linux distributions are mirrored (currently 163 different) • BSD (FreeBSD, NetBSD, OpenBSD • Openindiana, opensolaris, illumos • Jenkins • Mariadb • Vim • Blender, gimp, ImageMagick • Apache • Qt , perl, gcc • Vlc, xbmc, openelec
  • 29. NLUUG 15 May 2014 • Questions...... • mike.hulsman@proxy.nl • ftp-admin@nluug.nl
  • 30. NLUUG 15 May 2014 List of URL's • https://github.com/jeffmurphy/NetPass/blob/master/doc/netfilter • https://gist.github.com/kfox/1942782 • http://www.atoptool.nl/ • http://www.bufferbloat.net/attachments/9/BufferBloat11.pdf • http://lwn.net/Articles/507065/ • http://www.coverfire.com/articles/queueing-in-the-linux-network-