Metashare: poor CPU usage?

Nov 20, 2012 at 08:09

Hello,

I run Metashare on a 4CPU/8GB Ram virtual server and find response times to be relatively slow. Consider this use case:

On http://metashare.csc.fi/ I click "Browse resources" and click on the first 10 to be opened in separate tabs. This creates one python2.7 process on my host with a CPU utilization of max 130%. The load creeps just over 0.5.

I would expect a load of at least 4. I might have configured something poorly, can someone give me a pointer?

Regards,

Martin

 

Tags: CPU usage

Discussion 4 answers

  • avatar
    Answer by Joachim Wagner on May 21, 2013 at 09:57

    http://jessenoller.com/2009/02/01/python-threads-and-the-global-interpreter-lock/ section "The Global Interpreter Lock" suggests that this is a general Python problem and that it can be fixed by moving the computational intensive part of "browse resources" into a C extension that releases the GIL for the length of the computation (or use a subprocess). Alternatively, if the Django system keeps all its state information in the database, it should be safe to run mulitple instances of manage.py (on different ports) and to use lighttpd's load-balancer to distribute requests over these workers.

  • avatar
    Answer by MartinMatthiesen on Sep 09, 2013 at 10:18

    Joachim, thanks for the hint. The issue has been a bit on the backburner, since load was not such an issue after all. Could someone from the Metashare experts confirm that Joachim's second solution would work? Ie. is the state information kept in the database and therefore load-balancing possible as described?

  • avatar
    Answer by MartinMatthiesen on Sep 09, 2013 at 10:19

    Joachim, thanks for the hint. The issue has been a bit on the backburner, since load was not such an issue after all. Could someone from the Metashare experts confirm that Joachim's second solution would work? Ie. is the state information kept in the database and therefore load-balancing possible as described?

  • avatar
    Answer by rgzccfuehxb on Mar 17, 2016 at 02:54 p4F59x ayylgjfewoye, [url=http://sjtjihbkyyny.com/]sjtjihbkyyny[/url], [link=http://acdobffvlrfk.com/]acdobffvlrfk[/link], http://wuufxaiejdlv.com/
  • avatar
    Log in or Register to reply to this post.