On 11/18/2013 02:25 PM, Edgar Magana wrote:

The problem that we are experiencing is when concurrent calls to the
same API are sent, the number of operation at the plug-in back-end are
long enough to make the next concurrent API call to get stuck at the DB
transaction level, which creates a hung state for the Neutron Server to
the point that all concurrent API calls will fail.

This can be fixed if we include some "locking" system such as calling:

from neutron.common import utile
…

@utils.synchronized('any-name', external=True)
def create_port(self, context, port):
…

Obviously, this will create a serialization of all concurrent calls
which will ends up in having a really bad performance. Does anyone has a
better solution?

Can you break it up into smaller independent transactions so that the number of operations is reasonable?

Can you use finer-grained serialization?

Is there a way (possibly involving changing the API) that you can do as much as possible (hopefully including all the stuff that is likely to fail) before starting the database transaction?

Chris



_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to