Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0C1932009EE for ; Wed, 18 May 2016 11:52:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0AB6F160A00; Wed, 18 May 2016 09:52:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 52E651609B1 for ; Wed, 18 May 2016 11:52:19 +0200 (CEST) Received: (qmail 30934 invoked by uid 500); 18 May 2016 09:52:13 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 30915 invoked by uid 500); 18 May 2016 09:52:13 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 30909 invoked by uid 99); 18 May 2016 09:52:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2016 09:52:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DCE7F2C1F60 for ; Wed, 18 May 2016 09:52:12 +0000 (UTC) Date: Wed, 18 May 2016 09:52:12 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9180) Optimize concurrent VM deployment operation on same network MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 18 May 2016 09:52:20 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9180?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15288699#comment-15288699 ]=20 ASF GitHub Bot commented on CLOUDSTACK-9180: -------------------------------------------- GitHub user koushik-das reopened a pull request: https://github.com/apache/cloudstack/pull/1251 CLOUDSTACK-9180: Optimize concurrent VM deployment operation on same = =E2=80=A6 =E2=80=A6network =20 Check if VR needs to be allocated for a given network and only acquire = lock if required =20 Refer to the bug for details. You can merge this pull request into a Git repository by running: $ git pull https://github.com/koushik-das/cloudstack CLOUDSTACK-9180 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1251.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1251 =20 ---- commit de8942644df26fdd97010f8eec1fddf7d97fc8ae Author: Koushik Das Date: 2015-12-16T12:23:03Z CLOUDSTACK-9180: Optimize concurrent VM deployment operation on same ne= twork Check if VR needs to be allocated for a given network and only acquire = lock if required ---- > Optimize concurrent VM deployment operation on same network > ----------------------------------------------------------- > > Key: CLOUDSTACK-9180 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-918= 0 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Components: Management Server > Affects Versions: 4.6.0 > Reporter: Koushik Das > Assignee: Koushik Das > Fix For: Future > > > During VM deployment a check is performed to see if VR exists or not. If = not it is created - first an entry is allocated in DB for VR and then it is= deployed. The allocation logic is placed in a lock (based on network id) s= o that only one thread does the allocation. But the locking is implemented = in a way such that all threads wait on that lock even when VR is already al= located. The correct approach would be to check if VR is allocated or not a= nd acquire lock only when needed. > This issue is more frequently seen when concurrently deploying VMs in bas= ic zone as all threads try to acquire lock using the same network id. In ad= vanced zone operations are spread across multiple networks and so less freq= uent. > Refer to findOrDeployVirtualRouter() in RouterDeploymentDefinition.java. -- This message was sent by Atlassian JIRA (v6.3.4#6332)