You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Petroshenko (JIRA)" <ji...@apache.org> on 2018/10/31 14:28:01 UTC

[jira] [Comment Edited] (IGNITE-9850) Python thin: Find out the cause of the python's client low performance

    [ https://issues.apache.org/jira/browse/IGNITE-9850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16670167#comment-16670167 ] 

Pavel Petroshenko edited comment on IGNITE-9850 at 10/31/18 2:27 PM:
---------------------------------------------------------------------

What has been done:
 # Profiling the python Thin Client on the standard cpython VM
 # Based on the profiling results, a bottleneck with the package imports was found. Performance of the Python Thin Client is comparable with that of the Node.JS now
 # The found bottleneck has been fixed and merged to master
 # Implemented an optimization for caching the read data (to minimize the number of socket reads), which didn't give any reasonable gain in performance, so it doesn't make sense to integrate it at this point. Just for our records, the change is made here: https://github.com/nobitlost/ignite/commit/c9e5686a0c6df235c8aec03df27c3a6fd84654e2
 # So there is no room for further performance improvements as far as I can see

Reasons why Python is slower than other clients:
 # The cpython VM has no dynamic or JIT compiler, it's a purely interpreted language implementation (for example turning the HotSpot compiler in Java itself makes it at least 2+ times slower)
 # Python is a natively single-threaded language by nature, while other languages can perform some blocking operations (including io) asynchronously on dedicated threads (specific to internal VM and system libraries implementation)
 # The VMs have different runtime (scheduler, garbage collector, interpreter) implementations. Some of them are manually optimized for a specific platform, some are not.

So given that we can clearly explain the difference and the performance of the Python client is comparable to Node.JS I suggest closing this issue as resolved.


was (Author: pavel.petroshenko):
What has been done:
 # Profiling the python Thin Client on the standard cpython VM
 # Based on the profiling results, a bottleneck with the package imports was found. Performance of the Python Thin Client is comparable with that of the Node.JS now
 # The found bottleneck has been fixed and merged to master
 # Implemented an optimization for caching the read data (to minimize the number of socket reads), which didn't give any reasonable gain in performance, so it doesn't make sense to integrate it at this point
 # So there is no room for further performance improvements as far as I can see

Reasons why Python is slower than other clients:
 # The cpython VM has no dynamic or JIT compiler, it's a purely interpreted language implementation (for example turning the HotSpot compiler in Java itself makes it at least 2+ times slower)
 # Python is a natively single-threaded language by nature, while other languages can perform some blocking operations (including io) asynchronously on dedicated threads (specific to internal VM and system libraries implementation)
 # The VMs have different runtime (scheduler, garbage collector, interpreter) implementations. Some of them are manually optimized for a specific platform, some are not.

So given that we can clearly explain the difference and the performance of the Python client is comparable to Node.JS I suggest closing this issue as resolved.

> Python thin: Find out the cause of the python's client low performance
> ----------------------------------------------------------------------
>
>                 Key: IGNITE-9850
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9850
>             Project: Ignite
>          Issue Type: Task
>          Components: thin client
>    Affects Versions: 2.7
>            Reporter: Igor Sapego
>            Assignee: Dmitry Melnichuk
>            Priority: Critical
>              Labels: python
>             Fix For: 2.8
>
>
> According to benchmarks results reported by IGNITE-9824, python thin client is 3 to 4 times slower than Java client. We need to find out the root cause of this and if we can fix it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)