Reducing Python processes resource usage
8 posts
• Page 1 of 1
Reducing Python processes resource usage
Hi,
Our Python processes take too much resources, around 90 MB / 10% - 20% CPU per each, while on Linux the usage is much lower.
Any idea what parameters we can tune or change to lower this usage?
Thanks.
Our Python processes take too much resources, around 90 MB / 10% - 20% CPU per each, while on Linux the usage is much lower.
Any idea what parameters we can tune or change to lower this usage?
Thanks.
Re: Reducing Python processes resource usage
Hello,
1. What is an application you running in Python?
2. What is the bitness of python.exe and bitness of OS? Is it virtual machine?
3. Did you measure response time from app on Linux and Windows? What is the difference?
1. What is an application you running in Python?
2. What is the bitness of python.exe and bitness of OS? Is it virtual machine?
3. Did you measure response time from app on Linux and Windows? What is the difference?
Re: Reducing Python processes resource usage
1) Django 1.4
2) Both 64-bit, VMWare guest.
3) Yes, Linux has 2-3 times faster performance, I will post exact measures soon.
2) Both 64-bit, VMWare guest.
3) Yes, Linux has 2-3 times faster performance, I will post exact measures soon.
Re: Reducing Python processes resource usage
1. Are applications running on Windows and Linux box identical?
2. Do the application use a database? What is database type? What the driver?
2. Do the application use a database? What is database type? What the driver?
Re: Reducing Python processes resource usage
Ruslan wrote:1. Are applications running on Windows and Linux box identical?
2. Do the application use a database? What is database type? What the driver?
1) Yes, it's exactly the same code.
2) MSSQL used for Windows (with SQL Client 2012, pyodbc and pyodbc-azure), Oracle 11 used for Linux (with cxOracle and oracle-instantclient 11).
Re: Reducing Python processes resource usage
You have quite different environments on Windows and Linux, so it's difficult to compare them correctly.
By default Zoo installs 32-bit Python even for 64-bit machines. But our experience shows that using 64-bit Python may lead to increased performance of web apps.
So, please consider installing 64-bit Python (on dev machine first). And notice that you will need to have all python native libs for 64-bit version too.
By default Zoo installs 32-bit Python even for 64-bit machines. But our experience shows that using 64-bit Python may lead to increased performance of web apps.
So, please consider installing 64-bit Python (on dev machine first). And notice that you will need to have all python native libs for 64-bit version too.
Re: Reducing Python processes resource usage
Hi,
If you recall other post on this matter, this exactly what we found as the reason for unbearable slowdowns, hence all our deployments are 64-bit now.
That said, even now the Python process works slower than on Linux / Apache, and take much more resources.
If you recall other post on this matter, this exactly what we found as the reason for unbearable slowdowns, hence all our deployments are 64-bit now.
That said, even now the Python process works slower than on Linux / Apache, and take much more resources.
Re: Reducing Python processes resource usage
Lets create simple django view without db access in your code and measure request time on Windows and Linux.
Example view:
Measure with ab:
Please show output of ab for Windows and Linux servers.
Example view:
- Code: Select all
def hello_world(request):
return HttpResponse('Hello World!')
Measure with ab:
- Code: Select all
ab -c 10 -n 10000 http://<url to test view>
Please show output of ab for Windows and Linux servers.
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests