Slow Magento Enterprise - magento

We are using Magento Enterprise Edition on Nginx and FPC. Dedicated servers with ample ram and CPU. Everything runs fine with 60-70 visitors. However during high traffic like over 200 active visitors, we starts to have problem. During peak traffic our CPU is still under 10% and with 40% free memory. We have a dedicated App and DB server.
What could be wrong? Could this be a network issue? What are the chances that there is a problem with App server or the code base is not optimized given the fact that CPU is under 10% with ample ram.
Steve
Edit:
I am running a 32 core App server with 64GB of RAM. Have Nginx with PHP-FPM and FASTCGI. Upon checking the logs I found that that PHP-FPM has following errors during peak Hours:
[WARNING] [pool www] child 26196, script '/var/www/magento/index.php' execution timed out (600.011284 sec), terminating
I have 32 Workers process along with worker_connections 1024;
CDN is already setup and network is set to use 1G connection.

Related

Performance issue in odoo 15 with AWS EC2 2 core cpu and 4 gb ram

We have recently upgraded from Odoo 12 to Odoo 15, both community versions, and are now experiencing performance issues on your AWS EC2 server.
The server has 2 cores cpu and 4GB of RAM and we are using Apache2 as a reverse proxy. With around 9-10 concurrent users, you are seeing maximum CPU utilization of 25-30% during peak hours and 1.8GB of RAM usage.
Enabling workers results in console JavaScript errors due to missing dependencies, but without workers, the site loads slowly.
Can you advise on how to resolve this performance bottleneck?
Tried with adding parameter in odoo conf file based on the description available related to performance on odoo site.
Limit cpu, limit hard, limit soft, proxy mode, workers

timer expired ...abort Jmeter ERROR(Non gui mode) - while running the Load test up to 3000 Users

I was performing the Load test up to 3000 users on 16GB RAM and on EC2 instance. when the user reached 2000+, I got the Error timer expired, ...abort in command prompt. During this period Memory & CPU usage was up to 96%
Let me know is this error occurred due to Memory and CPU usage went up to 96% ?or anything to do with Jmeter scripts. bcoz Up to 1K it was working properly.
According to this answer to the JVM crashes with no frame specified, only “timer expired, abort” it occurs when a fatal error has occurred and the JVM wasn't properly switched off in 2 minutes time frame.
Most probably 3000 users is way too much for your test for that VM. Moreover 96% of usage of CPU and RAM is a little bit too much for me, I would rather stop ramping up the users when CPU/RAM usage starts exceeding 80% of total available capacity.
So the next step would be:
Configure JMeter to ramp-up users gradually, i.e. 3000 users in 15 minutes or so
Make sure to follow JMeter Best Practices
Make sure to setup realtime monitoring of CPU, RAM and other resources
Start your test
See how many virtual users were online when resources usage starts exceeding 80% using ie. Active Threads Over Time listener
If you have 3000 users - you should be good to go, if not - you will need to create another machine and to run JMeter in Distributed Mode

High memory and CPU consumption for rails application on google cloud

I have a Compute engine on google cloud with 4 core CPU Ivy Brigde and 15 GB RAM and on that I have deployed my rails application.
Before this I had hosted my rails application on digital ocean and there I was getting good throughput and also the cpu and memory consumption was minimal.
It never crossed 3 GB memory consumption on Digital ocean and the CPU consumption max was around 50% - 55%.
On Digital Ocean I had a single instance with 4 core CPU and 8GB RAM and even I was running mysql,redis and sidekiq on the same instance and still it could handle the load easily.
But as I moved to google cloud I started facing the problems for the same code.
Actually I was expecting more throughput from the Google cloud as Google has data centers in Asia, but I started facing issue.
When I restart apache everything comes back to normal and again after 2 - 3 hours it goes on consuming memeory and CPU and finally instance stops responding to the requests anymore.
I checked the logs..... and there are no much increase in traffic, also I cheked logs during the load time to ensure whether someone is attacking the servers.
But all the request I found are from a valid browsers with valid user agents.
I don't understand why is this happening.
First I felt if it is a DDOS/DOS attack but din't find anything suspicious in the log (apache access logs and rails logs).
Please help me.
Hoping for some good solution that I can try and debug the issue.
Thanks :)

High CPU load but low CPU usage and RAM usage

I am running a mobile website to get the live running status of any train in India. It is http://www.spoturtrain.com . The full code is written in PHP and Nginx is used as the webserver, php-fpm is used as the application server. All php requests are proxied to the app server. During peak traffic hours in the morning, the system load shoots up to 4 but the CPU% and the memory usage is low. Please take a look at the snapshot of the top command of the server.
Th %CPU displayed in the bottom section is per-thread, which means the percentage of one CPU core used by the indicated thread. The CPU(s) section indicates the total amount of available CPU that is being utilized, so it is possible to have one thread reporting that it is using 100% CPU, while only 25% (4 core) or 12.5% (8 core) of the overall CPU cycles are being consumed.
Analyzing thread CPU usage on Linux
You don't really ask a question, so it's hard to tell if you are wanting some advice or just asking to have the numbers explained. As #Charles states, a typical "acceptable" load is 1 per CPU core before noticeable performance degradation occurs, but in the case of PHP running on most web servers, you may (but probably won't in most cases) start noticing problems at anything above 1. Whether or not you do will largely depend on your disk and network I/O.
Whether or not the performance is acceptable for your application isn't something I can answer, but you can take a look at this thread for more places to jump into the options for getting your web server to thread requests.
What is thread safe or non thread safe in PHP
Whether or not you can do anything about it depends on your hosting situation.

Why does Apache+mod_php on Windows require low RAM usage?

I have Apache + mod_php installed on Windows but I can't relate it to any of those used on Linux.
It only has this:
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum number of requests a server process serves
ThreadsPerChild 250
MaxRequestsPerChild 0
regarding the children.
httpd.exe only takes 12MB of RAM and if I do an "ab" test with a script with only sleep(10) with 30 concurrent connections it only goes to 30MB of usage and it can take all of them together! I did the same on my ubuntu vps also in mod_php and to get 30 concurrent connections I had to start 30 servers and the VPS basically crashed because the RAM usage went over 200MB for the apache processes only. So the question is why the RAM used is -so- little?

Resources