Howdy, Stranger!

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


How to utilize 100% of my CPU
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.

How to utilize 100% of my CPU

yokowasisyokowasis Member

The usage of my CPU isn't even above 50%. And some of the cores even idle (parked).

Yet I can't even open my website. It says TCP_ERROR Operation Timed Out.

Any help is appreciated, How can I use 100% of my Server Resource (RAM, CPU).

Thanks.

«1

Comments

  • FAT32FAT32 Administrator, Deal Compiler Extraordinaire

    Use it for mining then you will utilize every single bit of them

  • I wish there is some tweak I can put on Apache/MySQL / php to make them use all available resources.

    Why would I buy a 8 core cpu if I Can't utilize it. There must be something I can do.

  • HBAndreiHBAndrei Member, Top Host, Host Rep
    edited May 2018

    @yokowasis said:
    I wish there is some tweak I can put on Apache/MySQL / php to make them use all available resources.

    Why would I buy a 8 core cpu if I Can't utilize it. There must be something I can do.

    The idea behind having a powerful CPU isn't to force Apache/MySQL/PHP to constantly use max resources, but to give them room to grow, and room for burst usage when needed.

    I don't know exactly what error you're getting but 'TCP_ERROR Operation Timed Out' seems to be more network related than CPU usage related, so might want to look into that.

    Thanked by 3Falzo MasonR lazyt
  • jsgjsg Member, Resident Benchmarker

    It's the color. The graph itself and the frame and lattice must have different colors. Like blue graph on green frame and lattice.

    "TCP Error Operation timed out" is a typical TCP Error with TCP standing for "Transfer Coloring Process" as you should know. Most probably your local client system can't deliver colors fast enough that's why you should use use different colors to use multiple cores of your CPU which also will give you higher CPU usage.

  • JarryJarry Member

    @yokowasis said:
    Why would I buy a 8 core cpu if I Can't utilize it.

    No offence man, but every noob thinks his web will be blazingly fast if he buys more cores and more ram. What you should do instead is: stick your head deep into system/webserver-logs and find where your bottleneck is!

  • MikeAMikeA Member, Patron Provider

    I wonder, why do you use Windows Server to run XAMPP web server stack instead of Linux and a few software packages?

    Thanked by 1Wolveix
  • By default Xamp it's not optimized at all. Your going to need to tweak your Apache, PHP and MySql install manually.
    Also using a windows server for a PHP app will definitely cost you on resources, have you considered IIS with PHP as fast_cgi or even better move to Linux based OS.

  • @HBAndrei said:

    @yokowasis said:
    I wish there is some tweak I can put on Apache/MySQL / php to make them use all available resources.

    Why would I buy a 8 core cpu if I Can't utilize it. There must be something I can do.

    The idea behind having a powerful CPU isn't to force Apache/MySQL/PHP to constantly use max resources, but to give them room to grow, and room for burst usage when needed.

    Yes. But in my case, they won't grow at all. There are a lot of room to grow. Yet they won't grow.

    I don't know exactly what error you're getting but 'TCP_ERROR Operation Timed Out' seems to be more network related than CPU usage related, so might want to look into that.

    I am pretty sure it's not network. Network traffic is barely hitting 1Mbps.

    @Jarry said:

    @yokowasis said:
    Why would I buy a 8 core cpu if I Can't utilize it.

    No offence man, but every noob thinks his web will be blazingly fast if he buys more cores and more ram.

    I am not really hoping for blazingly fast. Just for my website load under 5s.

    What you should do instead is: stick your head deep into system/webserver-logs and find where your bottleneck is!

    This is the reason I am asking. Any idea on how to find what bottleneck my website ? because CPU,RAM,Network,Disk all is far below the maximum capcity.

    @MikeA said:
    I wonder, why do you use Windows Server to run XAMPP web server stack instead of Linux and a few software packages?

    Because there are a lot of software that I used that only run, or run better in windows. Also because my PC is obviously using Windows. I can sync my works using Google Drive and One Drive, which can't be done or very troublesome to do in Linux, because of lack official software.

    @thekreek said:
    By default Xamp it's not optimized at all. Your going to need to tweak your Apache, PHP and MySql install manually.

    Is there any link / guide to tweak xampp ? to make it use all of the resources available ?

    Also using a windows server for a PHP app will definitely cost you on resources, have you considered IIS with PHP as fast_cgi

    I am not considered that. The main reason is because it's portable.

    or even better move to Linux based OS.

    Not an option.

  • jsgjsg Member, Resident Benchmarker
    edited May 2018

    @yokowasis said:
    I am pretty sure it's not network. Network traffic is barely hitting 1Mbps.

    "TCP Operation timed out" can have many reasons many of which can also be existing with low traffic.

    @Jarry said:
    What you should do instead is: stick your head deep into system/webserver-logs and find where your bottleneck is!

    This is the reason I am asking. Any idea on how to find what bottleneck my website ? because CPU,RAM,Network,Disk all is far below the maximum capcity.

    Absolutely not. You are asking because you want OTHERS=US to find the answer that you are unwilling to find.

    You threw a rather meaningless screenshot and an error message at us and did not even care to give us some context and data.

    What are we supposed to do with

    @yokowasis said:
    The usage of my CPU isn't even above 50%. And some of the cores even idle (parked).

    Yet I can't even open my website. It says TCP_ERROR Operation Timed Out.

    ?? Are we supposed to look into a magical crystal ball? Because you gave us NOTHING to work with. All you told us boils down to "Help, my server doesn't work plus I want it to be faster".

    Do not expect others to invest more in solving your problems than you are willing to invest in describing it properly.

  • kasslekassle Member

    i don't know what the real OP want to know, but the tittle says want to stress the cpu usage, so here it is:

    install IntelBurnTest (http://m.majorgeeks.com/files/details/intelburntest.html). if some core is idle, run another instance.

    but don't run it for more than 15 minutes ... don't even try. especially if you rent the server.

  • @jsg said:
    ?? Are we supposed to look into a magical crystal ball? Because you gave us NOTHING to work with. All you told us boils down to "Help, my server doesn't work plus I want it to be faster".

    Do not expect others to invest more in solving your problems than you are willing to invest in describing it properly.

    Any idea how can I describe it more properly ? What data do you need ?

    My Website is a Wordpress (W3 Cache Enabled). It has about 400 Visitor. That visitor is filling forms, to be processed and saved into the database.

    I am asking this because I absolutely have no idea where to start. If the CPU/RAM/DISK is 100%, I can start by looking which process use the most CPU/RAM/DISK and fix it accordingly. Right now, neither resource is at their maximum capacity. Hence the question.

  • @kassle said:
    i don't know what the real OP want to know, but the tittle says want to stress the cpu usage, so here it is:

    install IntelBurnTest (http://m.majorgeeks.com/files/details/intelburntest.html). if some core is idle, run another instance.

    but don't run it for more than 15 minutes ... don't even try. especially if you rent the server.

    Actually no, I don't want to test / benchmark my CPU by using tools.

    I want to know if Apache / Mysql / PHP is capable of using my server maximum resources.
    Sometimes apache is crashed, and I need to restart it, while in the other hand it still has a lot of resource available. Why apache choose to crash instead of using those idle core.

    Is there any config that limit apache / php / mysql to use certain amount of resource ? and forbid it to go above and beyond ?

  • mkshmksh Member

    int main( int argc, char **argv ) { while( 1 ); return 0; }

    Save this as usecpu.c then gcc -o usecpu usecpu.c and start one instance for every thread your system has. Mission accomplished.

    Thanked by 2vovler ralph
  • jsgjsg Member, Resident Benchmarker

    @yokowasis

    You should seperate the two issues and first concentrate on the TCP timeout problem. Once that is solved you have a basis for optimization which your other question basically is.

    A typical path to take with that kind of problems is to find out whether your server is reachable. ping and traceroute or mtr can help. Next you should be sure that your server stack is running. I don't know about windows but I strongly assume there is something like logs. Additionally you might want to check whether PHP is running properly e.g. by installing an ultra simple "hello world" script.

  • kasslekassle Member

    every network issue, began from:

    • can you ping the server ?
    • can you telnet web server port ?
    • can you visit basic html file ?
    • can you visit basic php (eg: phpinfo) file ?
  • @kassle said:
    every network issue, began from:

    • can you ping the server ?

    Yes, I can even RDP

    • can you telnet web server port ?
    • can you visit basic html file ?
    • can you visit basic php (eg: phpinfo) file ?

    Not tried yet, will try when my website down again.

    @jsg said:
    @yokowasis

    You should seperate the two issues and first concentrate on the TCP timeout problem. Once that is solved you have a basis for optimization which your other question basically is.

    A typical path to take with that kind of problems is to find out whether your server is reachable. ping and traceroute or mtr can help.

    Ping is fine, I can even RDP with no problem. So I guess we can rule out network problem.

    Next you should be sure that your server stack is running. I don't know about windows but I strongly assume there is something like logs. Additionally you might want to check whether PHP is running properly e.g. by installing an ultra simple "hello world" script.

    Server Stack is Running. I can visit localhost, but when I type domain it is very slow. If it's not timeout, it will take more than 30 sec just to load the front page.

  • to make it clear, my website works fine, if it has less visitor. All function work as it supposed to. But when the traffic (400 users) hit my server, my website load very slow, or timeout. With my dedicated server specs, I believe it can even handle 2000 concurrent user.

  • jarjar Patron Provider, Top Host, Veteran

    You may be a good candidate for managed hosting. Try knownhost.

    Thanked by 1ChrisMiller
  • deankdeank Member, Troll

    My car doesn't work. I mean it won't levitate.

    How come? Welp.

    Thanked by 2saibal mksh
  • HBAndreiHBAndrei Member, Top Host, Host Rep

    Any errors in the Apache error log?

  • raindog308raindog308 Administrator, Veteran

    The most entertaining threads on LET are when people come to ask for help but then insist on ignoring everyone's advice because they know better.

  • classyclassy Member

    PHP string manipulation on windows is SLOW (we had a problem with this for one of our customers)

  • uptimeuptime Member

    Most likely related to database - this would explain how CPU could be relatively idle while waiting for locks to be released. Without knowing any more details, that would be the first thing I'd take a closer look at. (Also, if I remember correctly a previous thread from some time ago, a more informed approach to database design in general was strongly suggested for this application.)

    Thanked by 2raindog308 mksh
  • raindog308raindog308 Administrator, Veteran

    @uptime said:
    Most likely related to database - this would explain how CPU could be relatively idle while waiting for locks to be released. Without knowing any more details, that would be the first thing I'd take a closer look at. (Also, if I remember correctly a previous thread from some time ago, a more informed approach to database design in general was strongly suggested for this application.)

    Wow, good memory: https://www.lowendtalk.com/discussion/132457/mysql-from-ram-drive-is-it-possible/p1

    Thanked by 1uptime
  • Apache max concurent reached?

  • mkshmksh Member

    @yokowasis said:

    or even better move to Linux based OS.

    Not an option.

    How come?

  • vmp32kvmp32k Member

    You have a scaling problem, not a performance issue. Somehow your stack or code is really bad at scaling up to the resources available. Since you seem really new to all this I wouldn't know where to even begin to point you in the right direction... I guess, check out some performance guides for Apache, MySQL, PHP and Windows. There are thousands of things that might be going wrong and PHP/Wordpress is notorious for having bad performance.

  • raindog308raindog308 Administrator, Veteran

    mksh said: How come?

    Come on, man...he's using Apache, MySQL, and PHP. You can't run that on Linux.

    Thanked by 2Aidan mksh
  • isijosamuaisijosamua Member
    edited May 2018

    mksh said: How come?

    I think because of this reason.

    yokowasis said: Because there are a lot of software that I used that only run, or run better in windows. Also because my PC is obviously using Windows. I can sync my works using Google Drive and One Drive, which can't be done or very troublesome to do in Linux, because of lack official software.

Sign In or Register to comment.