Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

How to optimize CloudLinux OS limits

5,026 views

Published on

You already know that CloudLinux OS makes your servers more stable and secure, but do you know how to configure it to perform best? In this webinar recording, Bogdan Shyshka discusses how to set and optimize CloudLinux OS limits and what they really mean. He goes over the dangers of low or high limits, defaults and starting points, and shares some tips and tricks that can help you maximize your server performance.

Video recordings: https://cloudlinux.com/cloudlinux-academy

Published in: Technology
  • Follow the link, new dating source: ❤❤❤ http://bit.ly/2u6xbL5 ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ♥♥♥ http://bit.ly/2u6xbL5 ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • awesome
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

How to optimize CloudLinux OS limits

  1. 1. HOW TO OPTIMIZE CloudLinux OS Limits
  2. 2. • What is LVE • mod_hostinglimits is Apache module that: o detects VH o puts apache process into LVE o lets apache server it o removes apache process from LVE UNDERSTANDING LVE
  3. 3. • LVE limits don’t depend on hardware • Default LVE limits optimized for regular shared hosting account o More powerful hardware → more clients per server o Less powerful hardware → less clients • Low end customers → smaller limits • High end customers → larger limits TYPICAL Hosting Account SPEED=100% PMEM=256MB VMEM=0 IO=1024KB/s NPROC=100 EP=20 HIGH END Hosting Account SPEED=200% PMEM=512MB VMEM=0 IO=1024KB/s NPROC=100 EP=40 Limits <-> Hardware dependency
  4. 4. • PHP/CGI scripts • SSH sessions • Cron jobs What do limits “LIMIT” • E-Maile Pipes (cPanel only) • MySQL queries (requires MySQL Governor, CPU & IO only) Static content is NOT limited by default o Noticeable overhead o Can be changed by setting AllowHandler * in modhostinglimits.conf
  5. 5. LIMITS UNITS DEFAULT VALUE SPEED % of a core, or HZ 100% PMEM KB 256MB VMEM KB 0MB IO KB/sec 1024KB/sec IOPS [requires lve1.3+] Operations per second 1024 NPROC number 100 EP number 20 Default Limits
  6. 6. Type RLIMIT LVE Limit CPU Per process. Amount of seconds each process will execute. Whole account. Total amount of CPU all processes within account can use at the same time. Memory Per process, limits memory consumption per process. Total memory consumption for all processes within accounts. IO No alternative Amount of data per second that can be read/written IOPS No alternative Number of IO operations / second allowed Number of processes Max number of processes per account Max number of processes per account Entry processes No alternatives Max number of apache connections for account Difference between RLimit & LVE Limits
  7. 7. • % of a single core OR # in hz o speed=150% → 1 and ½ cores o 2ghz → 2ghz, no matter what the speed of CPU is • Default → 100% (1 core) • Recommended SPEED settings → 100% for regular accounts, 200% for high performance accounts • Once limit reached, processes slow down • Hyper threading counts as a separate core SPEED (CPU LIMIT) HZ settings allows to set approximately same performance level across different hardware
  8. 8. • Single thread can occupy one core o Using limit < 1 core will cause automatic throttling of all requests • ½ core → requests take 2x as slow • Due to context switching → CPU usage is higher than without the limit DANGER OF LOW LIMIT
  9. 9. • Limits should be at most ½ of all cores • Better 1/4 of all cores WHAT IF LIMIT TOO HIGH If limit >= ½ cores – you need just 2 accounts to OVERLOAD server
  10. 10. • Disc throughput ○ Read & Write ○ KB/s • Default: 1024KB/sec • Processes throttled on IO once limit is hit IO LIMIT
  11. 11. • SSD provides better throughput ○ HDD → 30-100MB/s ○ SSD → 80-500MB/s ○ Limits are still per account / might not have to be changed IO limits Standard account High-end account HDD 1 MB/s 5 MB/s SSD 4 MB/s 10 MB/s SSD vs HDD Disks [IO]
  12. 12. • Disc throughput o Read & Write • Restricts total number of IO operations o Operations stop once limit is reached, until second expires • Default: 1024 operations per second IOPS LIMIT
  13. 13. SSD vs HDD Disks [IOPS] • SSD provides significantly higher IOPS rate ○ HDD → 100 to 400 IOPS ○ SDD → 5,000 to 100,000 IOPS  Source: https://en.wikipedia.org/wiki/IOPS  https://calypsotesters.com/summary-performance- comparison-hdd-sshd-ssd/ ○ Limits are still per account / might not have to be changed  Yet, you can…
  14. 14. vMEM vs pMEM • vMEM -- virtual memory (deprecated on CL6 & CL7) vMEM → allocated memory, often not used. Prevents process from allocating more memory • pMEM -- physical memory pMEM → used memory. Counts actual memory of pages in use. Will kill (OOM) processes for account, if pMEM limit is reached
  15. 15. • Default: 256MB • RSS field in ps, RES in top. ○ Includes shared memory ○ Includes disk caches  Used for account, caches will be freed if user reached memory limit pMEM limit
  16. 16. • Number of processes limit • Default: 100 • Most users will never hit this limit ○ Safe to increases to 1000... NPROC Limit PROTECTS AGAINST FORK BOMBS AND SIMILAR ATTACKS
  17. 17. • Number of entry processes (Apache connections) • Default: 20 • Error code 508 response when limit is reached • Protects against exhaustion of Apache slots (MaxClients) EP LIMIT
  18. 18. Questions? Twitter.com/CloudLinuxOS Visit CloudLinux.com

×