Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


NGINX & Server CPU Question
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

NGINX & Server CPU Question

This is a very vague and broad question but if I can get a general idea then that would suffice. So I was wondering if my CPU is running at 100% while performing X task, how badly will my site hosted on NGINX be affected? Lets just say it's a blog based on Wordpress.

Thanks.

Comments

  • the bottleneck will be PHP FPM or Database.

    depend on how much traffic do you get, plugin, theme

  • WSCallumWSCallum Member
    edited April 2020

    All depends on how long you're running at 100% for, if its for a few minutes, say, then processes will back up and your site is unlikely to load until the process is ran, therefore your site is going to get slower, and eventually probably not load at all (or it will take a lengthy period of time before it responds to the request that the user will not bother visiting your website) - So if it's important to you that your website is accessible, make sure you have spare capacity so that reaching 100% for extended periods doesn't happen.

    Remember that as an average rule of thumb, users will not bother visiting a website if it doesn't load in around 2 seconds or less.

  • jsgjsg Member, Resident Benchmarker

    @sgno1 said:
    This is a very vague and broad question but if I can get a general idea then that would suffice. So I was wondering if my CPU is running at 100% while performing X task, how badly will my site hosted on NGINX be affected? Lets just say it's a blog based on Wordpress.

    Two points I'd like to mention.

    (a) Is "X task" multi threaded? If so, you should limit the number of hardware threads or CPU cores it can use so as to leave reasonable room for running your site. If it is single threaded there should be no problem.

    (b) You can use 'nice' (the OS command) to give lower priority to "X task" and higher prio to the site applications (nginx, DB, ...).

  • Even if a program runs at 100% lol, it has threads within, as soon as one ends something else will be processed (like nginx), so it shouldn't have an effect tbh. unless you're getting thousands of requests per second, no

  • sgno1sgno1 Member

    Perfect thanks I have 8 threads and the program I use, uses max CPU threads to quickly complete the task it is given. I can limit its threads which will slow it down a little to complete its task. Just a quick question, how much CPU (%) should be left for NGINX to run normally? Or would this depend totally on how much traffic I get/how heavy my web application is.

  • eva2000eva2000 Veteran

    sgno1 said: Just a quick question, how much CPU (%) should be left for NGINX to run normally? Or would this depend totally on how much traffic I get/how heavy my web application is.

    benchmark and stress test different configuration settings and see which is best for your specific web apps/load

Sign In or Register to comment.