From 1cbd5fe024626eeffeb44413a67eb47ca5fa7e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20S=2E=20Montero?= Date: Thu, 17 Sep 2009 21:51:39 +0000 Subject: [PATCH] #124: Added EC2_JVM_ARGS and custom number of concurrent EC2 operations git-svn-id: http://svn.opennebula.org/one/trunk@797 3034c82b-c49b-4eb3-8279-a7acafdc01c0 --- src/vmm_mad/ec2/one_vmm_ec2.rb | 11 ++++++++++- src/vmm_mad/ec2/vmm_ec2rc | 16 +++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/vmm_mad/ec2/one_vmm_ec2.rb b/src/vmm_mad/ec2/one_vmm_ec2.rb index 7b6fca0543..cdc30deffa 100755 --- a/src/vmm_mad/ec2/one_vmm_ec2.rb +++ b/src/vmm_mad/ec2/one_vmm_ec2.rb @@ -27,6 +27,8 @@ if !EC2_LOCATION exit(-1) end +EC2_JVM_CONCURRENCY = ENV["EC2_JVM_CONCURRENCY"] + ONE_LOCATION = ENV["ONE_LOCATION"] if !ONE_LOCATION @@ -65,7 +67,14 @@ class EC2Driver < VirtualMachineDriver # EC2 constructor, loads defaults for the EC2Driver # # ------------------------------------------------------------------------ # def initialize(ec2_conf = nil) - super(5,true) + + if !EC2_JVM_CONCURRENCY + concurrency = 5 + else + concurrency = EC2_JVM_CONCURRENCY.to_i + end + + super(concurrency,true) @defaults = Hash.new diff --git a/src/vmm_mad/ec2/vmm_ec2rc b/src/vmm_mad/ec2/vmm_ec2rc index 1cd70de51e..89828a2956 100644 --- a/src/vmm_mad/ec2/vmm_ec2rc +++ b/src/vmm_mad/ec2/vmm_ec2rc @@ -13,10 +13,24 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # # See the License for the specific language governing permissions and # # limitations under the License. # -#--------------------------------------------------------------------------- ## +#--------------------------------------------------------------------------- # #May be needed in some setups #CLASSPATH="" + +#---------------------------------------------------------------------------- +# EC2 API TOOLS Configuration. +#---------------------------------------------------------------------------- #EC2_HOME="" #EC2_PRIVATE_KEY="" #EC2_CERT="" + +# +#---------------------------------------------------------------------------- +# Driver configuration +#---------------------------------------------------------------------------- +# Arguments for the JAVA Virtual Machine +EC2_JVM_ARGS="-Xms16m -Xmx64m" + +# Number of concurrent EC2 operations (not instances) +EC2_JVM_CONCURRENCY=10