On Tue, Sep 20, 2016 at 2:32 AM, James Ge <james...@gmail.com> wrote:
> Hi Nat > Hello James! My name is Nathaniel. regarding grpc and grpcio, I installed it via using pip, i.e. > pip install grpc > Unfortunately, the "grpc" package on PyPI <https://pypi.python.org/pypi/grpc> is something completely unrelated to gRPC <http://www.grpc.io/>. Your having installed it probably doesn't hurt (I don't know with certainty) but it is certainly not relevant. In terms of investigating your problem it's only going to get in the way. pip install grpcio > > I believe it would make sure me using the latest version? > "pip freeze" will tell you what versions of what packages are installed; please share its output in your next report. > I simplify the code a little bit. Inside client.py, when I was using only > one process to run multi_test, i.e. multi_test(1), the streaming takes > about 9 seconds on my PC. However, when using 2 processes, i.e. > multi_test(2), it takes 21 seconds. I don't really understand why it takes > more time than running multi_test(1) twice > The first thing that leaps out at me is the use of multiprocessing - we have designed and tested gRPC Python in a multithreaded context, but until now multiprocessing hasn't come up and I have no knowledge whatsoever of any reasons why performance should or shouldn't be affected by the use of multiprocessing. Do you continue to observe the problematic behavior if you change the use of multiple processes to use of multiple threads? My next reaction is that your observations need a baseline <https://en.wiktionary.org/wiki/baseline>: how fast does your code run when you replace the use of gRPC Python with simple function calls but keep everything else (including the use of multiple processes or multiple threads) exactly the same? -Nathaniel -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To post to this group, send email to grpc-io@googlegroups.com. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAEOYnAQD0xiRgYGDAH8yjFWepJQYSSu35ZRRMmheLbr%2BHHct9g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.