Browse files

Consolidated all backfill and spot settings to async.conf and moved t…

…he backfill submitter to 'org.globus.workspace.async'
  • Loading branch information...
1 parent a7b85e9 commit c53bebcf57d19ddbc0a45bc3bb61679214f0a377 @timf timf committed Jan 4, 2011
Showing with 594 additions and 787 deletions.
  1. +190 −0 service/service/java/source/etc/workspace-service/async.conf
  2. +0 −92 service/service/java/source/etc/workspace-service/backfill.conf
  3. +3 −12 service/service/java/source/etc/workspace-service/other/main.conflocator.xml
  4. +11 −20 service/service/java/source/etc/workspace-service/other/main.xml
  5. +0 −136 service/service/java/source/etc/workspace-service/spotinstances.conf
  6. +1 −1 service/service/java/source/src/org/globus/workspace/{scheduler → async}/backfill/Backfill.java
  7. +1 −1 service/service/java/source/src/org/globus/workspace/manager/DelegatingManager.java
  8. +1 −1 service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapter.java
  9. +1 −1 service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapterImpl.java
  10. +176 −0 service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/async.conf
  11. +0 −92 service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/backfill.conf
  12. +3 −12 ...ice/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/main.conflocator.xml
  13. +13 −21 service/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/main.xml
  14. +0 −136 ...ice/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/spotinstances.conf
  15. +2 −3 service/service/java/tests/suites/spotinstances/home/README.txt
  16. +176 −0 ...ice/service/java/tests/suites/spotinstances/home/services/etc/nimbus/workspace-service/async.conf
  17. +0 −92 .../service/java/tests/suites/spotinstances/home/services/etc/nimbus/workspace-service/backfill.conf
  18. +4 −13 .../tests/suites/spotinstances/home/services/etc/nimbus/workspace-service/other/main.conflocator.xml
  19. +12 −20 ...service/java/tests/suites/spotinstances/home/services/etc/nimbus/workspace-service/other/main.xml
  20. +0 −134 ...ice/java/tests/suites/spotinstances/home/services/etc/nimbus/workspace-service/spotinstances.conf
View
190 service/service/java/source/etc/workspace-service/async.conf
@@ -0,0 +1,190 @@
+################################################################################
+#
+# This file is used for configuring asynchronous requests (Spot Instances and
+# backfill requests) for this site.
+#
+################################################################################
+
+
+# SI ENABLED
+#
+# Indicates whether the spot instances feature is enabled (true) or disabled
+# (false) for this site. This is for remote requests -- if backfill is enabled
+# below, the superuser backfill reqs will be honored but any remote attempt to
+# add asynchronous requests will not be honored. If you switch this from 'true'
+# to 'false', it will only prevent new requests from being added.
+
+si.enabled=false
+
+
+# BACKFILL ENABLED
+#
+# Indicates whether the backfill feature is enabled (true) or disabled (false)
+# for this site. If you switch this from 'true' to 'false', it will cause all
+# currently running backfill nodes to be destroyed.
+
+backfill.enabled=false
+
+
+################################################################################
+#
+# Backfill settings
+#
+################################################################################
+
+# The intent of backfill is to provide a Nimbus cloud with the ability to deploy
+# a VM on idle nodes. Such a VM could be configured with a service like Condor,
+# allowing the VM to contribute cycles to some other purpose instead of wasting
+# cycles on idle cloud nodes. When a user request is recieved the VM is terminated
+# immediately and the user VM is deployed.
+#
+# The VM used by backfill (and the services inside of it) must be able to handle
+# a hard shutdown. A hard shutdown is used to minimize the turnaround time for
+# responding to user requests.
+#
+# A way to think about backfill nodes is that they are spot instances with the
+# very lowest priority (lower than the minimum spot bid) and only registered by
+# the Nimbus administrator.
+
+# MAX INSTANCES
+#
+# Max instances is the maximum number of VM instances that backfill will deploy
+# if it is enabled. If there is not enough space on the cloud for the maximum #
+# of instances it will deploy as many as it can. For example, if max.instances
+# is set to 12 on a 16 node cloud but there are 10 active user VMs then backfill
+# will still launch 6 backfill nodes. If the spot instances settings have space
+# reserved for regular requests (see the 'minreservedmem' and 'maxutilization'
+# confs below), these backfill requests will be subject to that as well, so the
+# site will not fill up completely.
+#
+# If max instances is set to 0 then backfill will use all idle VMMs.
+#
+# The default is 0.
+
+max.instances=0
+
+
+# DISK IMAGE
+#
+# The disk image is the image to use in the repository of the user configured
+# below (repo.user). To set the instance type, see below (async.instancetype).
+
+disk.image=backfill.img
+
+
+# USER
+#
+# Authorization will be bypassed for this user but it needs to exist in order
+# to have a repository account for propagating "disk.image". Add this user
+# with the nimbus-new-user "--dn" option (set an explicit DN) or refer to a
+# pre-existing (administrator) one.
+
+repo.user=BACKFILL-SUPERUSER
+
+
+################################################################################
+#
+# Spot Instances settings
+#
+################################################################################
+
+# INSTANCE TYPE
+#
+# Defines the instance type that will become available as spot instances or backfill.
+# Supported instance types are: small, large and xlarge.
+#
+# Currently, Nimbus supports only one type of spot instance or backfill VM per
+# service. The amount of memory for each instance type is defined in the
+# elastic.conf file.
+
+async.instancetype=small
+
+
+# PRICING MODEL
+#
+# A pricing model is invoked every time the Spot Instances environment changes.
+# This can happen in many situations: when a request arrives, is canceled or
+# terminated, when the quantity of resources available for Spot Instances
+# increases or decreases, etc.
+#
+# Given the actual requests, the maximum quantity of VMs for Spot Instances and
+# the current spot price, a pricing model defines the next spot price based on
+# this variables. Usually a spot price change causes requests to be allocated,
+# if their bid is above the spot price, or pre-empted, if their bid is below
+# the current spot price.
+#
+# This property defines which implementation of the
+# org.globus.workspace.async.spotinstances.PricingModel Java interface should be
+# used by the Spot Instances module to set the spot price. This class will be
+# constructed by reflection, so it must be in the classpath of the Nimbus service.
+#
+# Currently there are two default implementations of the module, explained
+# as follows:
+#
+# ** org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel **
+#
+# This pricing model aims to satisfy the maximum number of requests, giving
+# priority to higher bid requests when there aren't available VMs to fulfill
+# all requests. Suitable for scientific clouds.
+#
+# ** org.globus.workspace.async.pricingmodel.MaximizeProfitPricingModel **
+#
+# This pricing model aims to maximize the revenue of the cloud provider, without
+# necessarily increasing cloud utilization. Suitable for commercial clouds.
+
+si.pricingmodel=org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel
+
+
+# MINIMUM PRICE
+#
+# Defines the minimum price (in allocation units) per minute that a Spot Instance
+# can cost
+
+si.minprice=0.1
+
+
+################################################################################
+#
+# Memory Management Policies
+#
+################################################################################
+
+# RESERVED MEMORY
+#
+# The policies below define how the total resource pool memory is divided between
+# ordinary Workspace Service requests (1st class requests) and Asynchronous
+# requests (SI or backfill requests).
+#
+# It's important to note that these policies are preventive, in the sense that
+# free space is reserved for future 1st class requests, but if the reserved space
+# is still not sufficient to satisfy a 1st class request, SI or backfill requests
+# will be pre-empted on-the-fly in order to free the needed amount of space
+# (emergency pre-emption).
+
+# This policy defines the minimum amount of free memory (in MB) that should be
+# reserved exclusively for 1st class requests, and thus will not be allocated for
+# SI or backfill requests.
+
+async.policies.minreservedmem=2048
+
+
+# MAX UTILIZATION
+#
+# This policy defines the maximum utilization (in %) for 1st class requests. When
+# the utilization raises above this value, Spot Instance or backfill requests are
+# pre-empted (preventive pre-emption) in order to decrease the utilization of 1st
+# class requests.
+#
+# The Workspace Service will reserve an amount of free memory for 1st class requests
+# in order to ensure that the utilization of 1st class requests is equal or below
+# that value, unless there is no more available memory to reserve.
+#
+# The amount of reserved memory for 1st class requests is derived from this formula:
+#
+# * maxUtilization = usedMem / (usedMem + reservedMem)
+#
+# Reorganized, becomes:
+#
+# * reservedMem = (1 - maxUtilization)*usedMem/maxUtilization
+
+async.policies.maxutilization=0.7
View
92 service/service/java/source/etc/workspace-service/backfill.conf
@@ -1,92 +0,0 @@
-################################################################################
-#
-# This file is used for configuring VM backfill deployment on idle VMM nodes.
-#
-# The intent of backfill is to provide a Nimbus cloud with the ability to
-# deploy a generic VM on idle nodes. Such a VM could be configured with a
-# service like Condor, allowing the VM to contribute cycles to some other
-# purpose instead of wasting cycles on idle cloud nodes. When a user request is
-# recieved the VM is terminated immediately and the user VM is deployed.
-#
-# NOTE: Backfill must be configured and run by the Nimbus administrator. It is
-# not currently a feature that users can leverage directly.
-#
-# The VM used by backfill (and the services inside of it) must be able to
-# handle a hard shutdown. A hard shutdown is used to minimize the turn-
-# around time for responding to user requests.
-#
-################################################################################
-
-
-# BACKFILL
-#
-# If you would like to use backfill, you can enable it in spotinstances.conf
-
-
-# MAX INSTANCES
-#
-# Max instances is the maximum number of VM instances that backfill will deploy
-# if it is enabled. If there is not enough space on the cloud for the maximum
-# number of instances it will deploy as many as it can. For example, if max
-# instances is set to 12 on a 16 node cloud but there are 10 active user VMs
-# then backfill will still launch 6 backfill nodes. If the spot instances
-# settings have space reserved for regular requests (see the spotinstances.conf
-# 'minreservedmem' and 'maxutilization' configurations), these backfill requests
-# will be subject to that as well, so the site will not fill up completely.
-#
-# If max instances is set to 0 then backfill will use all idle VMMs.
-#
-# The default is 0.
-
-max.instances=0
-
-
-# DISK IMAGE
-#
-# The disk image is the image to use in the repository of the user configured below (repo.user)
-
-disk.image=backfill.img
-
-
-# USER
-#
-# Authorization will be bypassed for this user but it needs to exist in order to have a
-# repository account for propagating "disk.image"
-
-repo.user=BACKFILL-SUPERUSER
-
-
-# INSTANCE MEMORY
-#
-# The instance memory is the amount of memory (in MB) that the backfill image
-# will use.
-
-memory.MB=1024
-
-
-# VCPUs
-#
-# The number of VCPUs to use.
-
-vcpus=1
-
-
-# INSTANCE DURATION
-#
-# Instance duration is the amount of time (in seconds) that the backfill instance
-# will potentially be active. Obviously, the nature of backfill instances
-# necessitates that when a user request arrives the backfill instance will be
-# preempted, regardless of this setting. When the duration has elapsed the
-# instance will be terminated. It is possible that another backfill instance
-# will be dispatched almost immediately after the previous one was terminated.
-#
-# The default duration is one week.
-
-duration.seconds=604800
-
-
-# NETWORK
-#
-# Set the network to public or private.
-
-network=public
View
15 service/service/java/source/etc/workspace-service/other/main.conflocator.xml
@@ -64,13 +64,13 @@
value="$CUMULUS{" />
</bean>
- <bean id="siSettings"
+ <bean id="asyncSettings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location"
- value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/spotinstances.conf" />
+ value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/async.conf" />
<property name="placeholderPrefix"
- value="$SI{" />
+ value="$ASYNC{" />
</bean>
<bean id="accountingSettings"
@@ -82,15 +82,6 @@
value="$ACCOUNTING{" />
</bean>
- <bean id="backfillSettings"
- class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-
- <property name="location"
- value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/backfill.conf" />
- <property name="placeholderPrefix"
- value="$BACKFILL{" />
- </bean>
-
<bean id="sshSettings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
View
31 service/service/java/source/etc/workspace-service/other/main.xml
@@ -553,35 +553,26 @@
</bean>
<bean id="nimbus-rm.backfill"
- class="org.globus.workspace.scheduler.backfill.Backfill"
+ class="org.globus.workspace.async.backfill.Backfill"
init-method="validate">
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-repr.ReprFactory"/>
<constructor-arg ref="nimbus-rm.loglevels" />
<property name="backfillEnabled"
- value="$SI{backfill.enabled}" />
+ value="$ASYNC{backfill.enabled}" />
<property name="maxInstances"
- value="$BACKFILL{max.instances}" />
+ value="$ASYNC{max.instances}" />
<property name="diskImage"
- value="$BACKFILL{disk.image}" />
- <property name="memoryMB"
- value="$BACKFILL{memory.MB}" />
- <property name="vcpus"
- value="$BACKFILL{vcpus}" />
- <property name="durationSeconds"
- value="$BACKFILL{duration.seconds}" />
- <property name="network"
- value="$BACKFILL{network}" />
-
+ value="$ASYNC{disk.image}" />
</bean>
<!-- ===================================================================
org.globus.workspace.async.* interfaces
=================================================================== -->
- <bean id="nimbus-rm.si.pricingmodel" class="$SI{si.pricingmodel}" />
+ <bean id="nimbus-rm.si.pricingmodel" class="$ASYNC{si.pricingmodel}" />
<bean id="nimbus-rm.si.asyncreqmap" class="org.globus.workspace.async.AsyncRequestMap">
<constructor-arg value="$COMMON{caches.dir}" />
@@ -594,22 +585,22 @@
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="nimbus-rm.home.instance"/>
<constructor-arg ref="nimbus-rm.home.group"/>
- <constructor-arg value="$SI{si.minprice}" />
+ <constructor-arg value="$ASYNC{si.minprice}" />
<constructor-arg ref="nimbus-rm.si.pricingmodel" />
<constructor-arg ref="nimbus-rm.si.asyncreqmap" />
- <constructor-arg value="$SI{si.enabled}" />
- <constructor-arg value="$SI{backfill.enabled}" />
+ <constructor-arg value="$ASYNC{si.enabled}" />
+ <constructor-arg value="$ASYNC{backfill.enabled}" />
<!-- set after object creation time to avoid circular dep -->
<property name="creationManager" ref="nimbus-rm.creation" />
<!-- Property values coming via spotinstances.conf -->
<property name="minReservedMem"
- value="$SI{async.policies.minreservedmem}" />
+ value="$ASYNC{async.policies.minreservedmem}" />
<property name="maxUtilization"
- value="$SI{async.policies.maxutilization}" />
+ value="$ASYNC{async.policies.maxutilization}" />
<property name="instanceMem"
- value="$ELASTIC{memory.$SI{si.instancetype}}" />
+ value="$ELASTIC{memory.$ASYNC{async.instancetype}}" />
</bean>
View
136 service/service/java/source/etc/workspace-service/spotinstances.conf
@@ -1,136 +0,0 @@
-######################################################
-# #
-# This file is used for configuring asynchronous #
-# requests (Spot Instances and #
-# backfill requests) for this site #
-# #
-######################################################
-
-################################################################################
-#
-# General settings
-#
-################################################################################
-
-# Indicates whether the spot instances feature is enabled (true) or disabled (false)
-# for this site. This is for remote requests -- if backfill is enabled below, the
-# superuser backfill reqs will be honored but any remote attempt to add asynchronous
-# requests will not be honored. If you switch this from 'true' to 'false', it will
-# only prevent new requests from being added.
-
-si.enabled=false
-
-# Indicates whether the backfill feature is enabled (true) or disabled (false)
-# for this site. See backfill.conf
-
-backfill.enabled=false
-
-################################################################################
-#
-# Spot Instances settings
-#
-################################################################################
-
-# A pricing model is invoked every time the Spot Instances
-# environment changes. This can happen in many situations:
-# when a request arrives, is canceled or terminated, when
-# the quantity of resources available for Spot Instances
-# increases or decreases, etc.
-#
-# Given the actual requests, the maximum quantity of VMs for
-# Spot Instances and the current spot price, a pricing model
-# defines the next spot price based on this variables.
-# Usually a spot price change causes requests to be allocated,
-# if their bid is above the spot price, or pre-empted, if their
-# bid is below the current spot price.
-#
-# This property defines which implementation of the
-# org.globus.workspace.async.spotinstances.PricingModel
-# interface should be used by the Spot Instances module
-# to set the spot price. This class will be constructed
-# by reflection, so it must be in the classpath of the
-# Nimbus executable.
-#
-# Currently there are two default implementations of that
-# interface, explained as follows:
-#
-# ** org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel **
-#
-# This pricing model aims to satisfy the maximum number of requests, giving
-# priority to higher bid requests when there aren't available VMs to fulfill
-# all requests. Suitable for scientific clouds.
-#
-# ** org.globus.workspace.async.pricingmodel.MaximizeProfitPricingModel **
-#
-# This pricing model aims to maximize the revenue of the cloud provider,
-# without necessarily increasing cloud utilization. Suitable for commercial
-# clouds.
-
-si.pricingmodel=org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel
-
-# Defines the instance type that will become
-# available as spot instances
-#
-# Supported instance types are:
-# small, large and xlarge.
-#
-# The amount of memory for each instance type
-# is defined in the elastic.conf file.
-#
-# Currently, Nimbus supports only one
-# Spot Instance type per site.
-
-si.instancetype=small
-
-# Defines the minimum price (in allocation units) per minute
-# that a Spot Instance can cost
-
-si.minprice=0.1
-
-
-################################################################################
-#
-# Memory Management Policies
-#
-################################################################################
-
-# The policies below define how the total resource pool memory is #
-# divided between ordinary Workspace Service requests #
-# (1st class requests) and Asynchronous requests (SI or backfill #
-# requests). #
-# #
-# It's important to note that these policies are preventive, in the #
-# sense that free space is reserved for future 1st class requests, #
-# but if the reserved space is still not sufficient to satisfy a #
-# 1st class request, SI or backfill requests will be pre-empted #
-# on-the-fly in order to free the needed amount of space (emergency #
-# pre-emption) #
-
-# This policy defines the minimum amount of free memory (in MegaBytes)
-# that should be reserved exclusively for 1st class requests, and thus
-# will not be allocated for SI or backfill requests.
-
-async.policies.minreservedmem=2048
-
-# This policy defines the maximum utilization (in %) for
-# 1st class requests. When the utilization raises above this
-# value, Spot Instance or backfill requests are pre-empted
-# (preventive pre-emption) in order to decrease the
-# utilization of 1st class requests.
-#
-# The Workspace Service will reserve an amount of free
-# memory for 1st class requests in order to ensure that
-# the utilization of 1st class requests is equal or below
-# that value, unless there is no more available memory
-# to reserve.
-#
-# The amount of reserved memory for 1st class requests
-# is derived from this formula:
-#
-# * maxUtilization = usedMem / (usedMem + reservedMem)
-#
-# reorganized, becomes:
-#
-# * reservedMem = (1 - maxUtilization)*usedMem/maxUtilization
-
-async.policies.maxutilization=0.7
View
2 ...orkspace/scheduler/backfill/Backfill.java → ...us/workspace/async/backfill/Backfill.java
@@ -14,7 +14,7 @@
* under the License.
*/
-package org.globus.workspace.scheduler.backfill;
+package org.globus.workspace.async.backfill;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
View
2 service/service/java/source/src/org/globus/workspace/manager/DelegatingManager.java
@@ -29,7 +29,7 @@
import org.globus.workspace.async.AsyncRequestManager;
import org.globus.workspace.creation.CreationManager;
import org.globus.workspace.persistence.DataConvert;
-import org.globus.workspace.scheduler.backfill.Backfill;
+import org.globus.workspace.async.backfill.Backfill;
import org.globus.workspace.service.InstanceResource;
import org.globus.workspace.service.WorkspaceCoschedHome;
import org.globus.workspace.service.WorkspaceGroupHome;
View
2 service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapter.java
@@ -20,9 +20,9 @@
import java.util.Hashtable;
import java.util.List;
+import org.globus.workspace.async.backfill.Backfill;
import org.globus.workspace.creation.IdempotentReservation;
import org.globus.workspace.network.AssociationEntry;
-import org.globus.workspace.scheduler.backfill.Backfill;
import org.globus.workspace.scheduler.defaults.ResourcepoolEntry;
import org.globus.workspace.service.CoschedResource;
import org.globus.workspace.service.GroupResource;
View
2 service/service/java/source/src/org/globus/workspace/persistence/PersistenceAdapterImpl.java
@@ -46,7 +46,7 @@
import org.globus.workspace.persistence.impls.IdempotencyPersistenceUtil;
import org.globus.workspace.persistence.impls.VMPersistence;
import org.globus.workspace.persistence.impls.VirtualMachinePersistenceUtil;
-import org.globus.workspace.scheduler.backfill.Backfill;
+import org.globus.workspace.async.backfill.Backfill;
import org.globus.workspace.scheduler.defaults.ResourcepoolEntry;
import org.globus.workspace.service.CoschedResource;
import org.globus.workspace.service.GroupResource;
View
176 ...ice/service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/async.conf
@@ -0,0 +1,176 @@
+################################################################################
+#
+# This file is used for configuring asynchronous requests (Spot Instances and
+# backfill requests) for this site.
+#
+################################################################################
+
+
+# SI ENABLED
+#
+# Indicates whether the spot instances feature is enabled (true) or disabled
+# (false) for this site. This is for remote requests -- if backfill is enabled
+# below, the superuser backfill reqs will be honored but any remote attempt to
+# add asynchronous requests will not be honored. If you switch this from 'true'
+# to 'false', it will only prevent new requests from being added.
+
+si.enabled=false
+
+
+# BACKFILL ENABLED
+#
+# Indicates whether the backfill feature is enabled (true) or disabled (false)
+# for this site. If you switch this from 'true' to 'false', it will cause all
+# currently running backfill nodes to be destroyed.
+
+backfill.enabled=false
+
+
+################################################################################
+#
+# Backfill settings
+#
+################################################################################
+
+# The intent of backfill is to provide a Nimbus cloud with the ability to deploy
+# a VM on idle nodes. Such a VM could be configured with a service like Condor,
+# allowing the VM to contribute cycles to some other purpose instead of wasting
+# cycles on idle cloud nodes. When a user request is recieved the VM is terminated
+# immediately and the user VM is deployed.
+#
+# The VM used by backfill (and the services inside of it) must be able to handle
+# a hard shutdown. A hard shutdown is used to minimize the turnaround time for
+# responding to user requests.
+#
+# A way to think about backfill nodes is that they are spot instances with the
+# very lowest priority (lower than the minimum spot bid) and only registered by
+# the Nimbus administrator.
+
+# MAX INSTANCES
+#
+# Max instances is the maximum number of VM instances that backfill will deploy
+# if it is enabled. If there is not enough space on the cloud for the maximum #
+# of instances it will deploy as many as it can. For example, if max.instances
+# is set to 12 on a 16 node cloud but there are 10 active user VMs then backfill
+# will still launch 6 backfill nodes. If the spot instances settings have space
+# reserved for regular requests (see the 'minreservedmem' and 'maxutilization'
+# confs below), these backfill requests will be subject to that as well, so the
+# site will not fill up completely.
+#
+# If max instances is set to 0 then backfill will use all idle VMMs.
+#
+# The default is 0.
+
+max.instances=0
+
+
+# DISK IMAGE
+#
+# The disk image is the image to use in the repository of the user configured
+# below (repo.user)
+
+disk.image=backfill.img
+
+
+# USER
+#
+# Authorization will be bypassed for this user but it needs to exist in order
+# to have a repository account for propagating "disk.image". Add this user
+# with the nimbus-new-user "--dn" option (set an explicit DN) or refer to a
+# pre-existing (administrator) one.
+
+repo.user=BACKFILL-SUPERUSER
+
+
+################################################################################
+#
+# Spot Instances settings
+#
+################################################################################
+
+# A pricing model is invoked every time the Spot Instances environment changes.
+# This can happen in many situations: when a request arrives, is canceled or
+# terminated, when the quantity of resources available for Spot Instances
+# increases or decreases, etc.
+#
+# Given the actual requests, the maximum quantity of VMs for Spot Instances and
+# the current spot price, a pricing model defines the next spot price based on
+# this variables. Usually a spot price change causes requests to be allocated,
+# if their bid is above the spot price, or pre-empted, if their bid is below
+# the current spot price.
+#
+# This property defines which implementation of the
+# org.globus.workspace.async.spotinstances.PricingModel Java interface should be
+# used by the Spot Instances module to set the spot price. This class will be
+# constructed by reflection, so it must be in the classpath of the Nimbus service.
+#
+# Currently there are two default implementations of the module, explained
+# as follows:
+#
+# ** org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel **
+#
+# This pricing model aims to satisfy the maximum number of requests, giving
+# priority to higher bid requests when there aren't available VMs to fulfill
+# all requests. Suitable for scientific clouds.
+#
+# ** org.globus.workspace.async.pricingmodel.MaximizeProfitPricingModel **
+#
+# This pricing model aims to maximize the revenue of the cloud provider, without
+# necessarily increasing cloud utilization. Suitable for commercial clouds.
+
+si.pricingmodel=org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel
+
+# Defines the instance type that will become available as spot instances.
+# Supported instance types are: small, large and xlarge.
+#
+# Currently, Nimbus supports only one Spot Instance type per site.
+# The amount of memory for each instance type is defined in the elastic.conf file.
+
+si.instancetype=small
+
+# Defines the minimum price (in allocation units) per minute that a Spot Instance
+# can cost
+
+si.minprice=0.1
+
+
+################################################################################
+#
+# Memory Management Policies
+#
+################################################################################
+
+# The policies below define how the total resource pool memory is divided between
+# ordinary Workspace Service requests (1st class requests) and Asynchronous
+# requests (SI or backfill requests).
+#
+# It's important to note that these policies are preventive, in the sense that
+# free space is reserved for future 1st class requests, but if the reserved space
+# is still not sufficient to satisfy a 1st class request, SI or backfill requests
+# will be pre-empted on-the-fly in order to free the needed amount of space
+# (emergency pre-emption).
+
+# This policy defines the minimum amount of free memory (in MB) that should be
+# reserved exclusively for 1st class requests, and thus will not be allocated for
+# SI or backfill requests.
+
+async.policies.minreservedmem=2048
+
+# This policy defines the maximum utilization (in %) for 1st class requests. When
+# the utilization raises above this value, Spot Instance or backfill requests are
+# pre-empted (preventive pre-emption) in order to decrease the utilization of 1st
+# class requests.
+#
+# The Workspace Service will reserve an amount of free memory for 1st class requests
+# in order to ensure that the utilization of 1st class requests is equal or below
+# that value, unless there is no more available memory to reserve.
+#
+# The amount of reserved memory for 1st class requests is derived from this formula:
+#
+# * maxUtilization = usedMem / (usedMem + reservedMem)
+#
+# Reorganized, becomes:
+#
+# * reservedMem = (1 - maxUtilization)*usedMem/maxUtilization
+
+async.policies.maxutilization=0.7
View
92 .../service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/backfill.conf
@@ -1,92 +0,0 @@
-################################################################################
-#
-# This file is used for configuring VM backfill deployment on idle VMM nodes.
-#
-# The intent of backfill is to provide a Nimbus cloud with the ability to
-# deploy a generic VM on idle nodes. Such a VM could be configured with a
-# service like Condor, allowing the VM to contribute cycles to some other
-# purpose instead of wasting cycles on idle cloud nodes. When a user request is
-# recieved the VM is terminated immediately and the user VM is deployed.
-#
-# NOTE: Backfill must be configured and run by the Nimbus administrator. It is
-# not currently a feature that users can leverage directly.
-#
-# The VM used by backfill (and the services inside of it) must be able to
-# handle a hard shutdown. A hard shutdown is used to minimize the turn-
-# around time for responding to user requests.
-#
-################################################################################
-
-
-# BACKFILL
-#
-# If you would like to use backfill, you can enable it in spotinstances.conf
-
-
-# MAX INSTANCES
-#
-# Max instances is the maximum number of VM instances that backfill will deploy
-# if it is enabled. If there is not enough space on the cloud for the maximum
-# number of instances it will deploy as many as it can. For example, if max
-# instances is set to 12 on a 16 node cloud but there are 10 active user VMs
-# then backfill will still launch 6 backfill nodes. If the spot instances
-# settings have space reserved for regular requests (see the spotinstances.conf
-# 'minreservedmem' and 'maxutilization' configurations), these backfill requests
-# will be subject to that as well, so the site will not fill up completely.
-#
-# If max instances is set to 0 then backfill will use all idle VMMs.
-#
-# The default is 0.
-
-max.instances=0
-
-
-# DISK IMAGE
-#
-# The disk image is the image to use in the repository of the user configured below (repo.user)
-
-disk.image=backfill.img
-
-
-# USER
-#
-# Authorization will be bypassed for this user but it needs to exist in order to have a
-# repository account for propagating "disk.image"
-
-repo.user=BACKFILL-SUPERUSER
-
-
-# INSTANCE MEMORY
-#
-# The instance memory is the amount of memory (in MB) that the backfill image
-# will use.
-
-memory.MB=1024
-
-
-# VCPUs
-#
-# The number of VCPUs to use.
-
-vcpus=1
-
-
-# INSTANCE DURATION
-#
-# Instance duration is the amount of time (in seconds) that the backfill instance
-# will potentially be active. Obviously, the nature of backfill instances
-# necessitates that when a user request arrives the backfill instance will be
-# preempted, regardless of this setting. When the duration has elapsed the
-# instance will be terminated. It is possible that another backfill instance
-# will be dispatched almost immediately after the previous one was terminated.
-#
-# The default duration is one week.
-
-duration.seconds=604800
-
-
-# NETWORK
-#
-# Set the network to public or private.
-
-network=public
View
15 .../tests/suites/basic/home/services/etc/nimbus/workspace-service/other/main.conflocator.xml
@@ -64,13 +64,13 @@
value="$CUMULUS{" />
</bean>
- <bean id="siSettings"
+ <bean id="asyncSettings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location"
- value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/spotinstances.conf" />
+ value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/async.conf" />
<property name="placeholderPrefix"
- value="$SI{" />
+ value="$ASYNC{" />
</bean>
<bean id="accountingSettings"
@@ -82,15 +82,6 @@
value="$ACCOUNTING{" />
</bean>
- <bean id="backfillSettings"
- class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-
- <property name="location"
- value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/backfill.conf" />
- <property name="placeholderPrefix"
- value="$BACKFILL{" />
- </bean>
-
<bean id="sshSettings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
View
34 ...service/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/other/main.xml
@@ -553,35 +553,27 @@
</bean>
<bean id="nimbus-rm.backfill"
- class="org.globus.workspace.scheduler.backfill.Backfill"
+ class="org.globus.workspace.async.backfill.Backfill"
init-method="validate">
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-repr.ReprFactory"/>
<constructor-arg ref="nimbus-rm.loglevels" />
<property name="backfillEnabled"
- value="$SI{backfill.enabled}" />
+ value="$ASYNC{backfill.enabled}" />
<property name="maxInstances"
- value="$BACKFILL{max.instances}" />
+ value="$ASYNC{max.instances}" />
<property name="diskImage"
- value="$BACKFILL{disk.image}" />
- <property name="memoryMB"
- value="$BACKFILL{memory.MB}" />
- <property name="vcpus"
- value="$BACKFILL{vcpus}" />
- <property name="durationSeconds"
- value="$BACKFILL{duration.seconds}" />
- <property name="network"
- value="$BACKFILL{network}" />
+ value="$ASYNC{disk.image}" />
</bean>
<!-- ===================================================================
org.globus.workspace.async.* interfaces
=================================================================== -->
- <bean id="nimbus-rm.si.pricingmodel" class="$SI{si.pricingmodel}" />
+ <bean id="nimbus-rm.si.pricingmodel" class="$ASYNC{si.pricingmodel}" />
<bean id="nimbus-rm.si.asyncreqmap" class="org.globus.workspace.async.AsyncRequestMap">
<constructor-arg value="$COMMON{caches.dir}" />
@@ -594,22 +586,22 @@
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="nimbus-rm.home.instance"/>
<constructor-arg ref="nimbus-rm.home.group"/>
- <constructor-arg value="$SI{si.minprice}" />
+ <constructor-arg value="$ASYNC{si.minprice}" />
<constructor-arg ref="nimbus-rm.si.pricingmodel" />
<constructor-arg ref="nimbus-rm.si.asyncreqmap" />
- <constructor-arg value="$SI{si.enabled}" />
- <constructor-arg value="$SI{backfill.enabled}" />
+ <constructor-arg value="$ASYNC{si.enabled}" />
+ <constructor-arg value="$ASYNC{backfill.enabled}" />
<!-- set after object creation time to avoid circular dep -->
<property name="creationManager" ref="nimbus-rm.creation" />
-
- <!-- Property values coming via spotinstances.conf -->
+
+ <!-- Property values coming via spotinstances.conf -->
<property name="minReservedMem"
- value="$SI{async.policies.minreservedmem}" />
+ value="$ASYNC{async.policies.minreservedmem}" />
<property name="maxUtilization"
- value="$SI{async.policies.maxutilization}" />
+ value="$ASYNC{async.policies.maxutilization}" />
<property name="instanceMem"
- value="$ELASTIC{memory.$SI{si.instancetype}}" />
+ value="$ELASTIC{memory.$ASYNC{async.instancetype}}" />
</bean>
View
136 ...ice/java/tests/suites/basic/home/services/etc/nimbus/workspace-service/spotinstances.conf
@@ -1,136 +0,0 @@
-######################################################
-# #
-# This file is used for configuring asynchronous #
-# requests (Spot Instances and #
-# backfill requests) for this site #
-# #
-######################################################
-
-################################################################################
-#
-# General settings
-#
-################################################################################
-
-# Indicates whether the spot instances feature is enabled (true) or disabled (false)
-# for this site. This is for remote requests -- if backfill is enabled below, the
-# superuser backfill reqs will be honored but any remote attempt to add asynchronous
-# requests will not be honored. If you switch this from 'true' to 'false', it will
-# only prevent new requests from being added.
-
-si.enabled=false
-
-# Indicates whether the backfill feature is enabled (true) or disabled (false)
-# for this site. See backfill.conf
-
-backfill.enabled=false
-
-################################################################################
-#
-# Spot Instances settings
-#
-################################################################################
-
-# A pricing model is invoked every time the Spot Instances
-# environment changes. This can happen in many situations:
-# when a request arrives, is canceled or terminated, when
-# the quantity of resources available for Spot Instances
-# increases or decreases, etc.
-#
-# Given the actual requests, the maximum quantity of VMs for
-# Spot Instances and the current spot price, a pricing model
-# defines the next spot price based on this variables.
-# Usually a spot price change causes requests to be allocated,
-# if their bid is above the spot price, or pre-empted, if their
-# bid is below the current spot price.
-#
-# This property defines which implementation of the
-# org.globus.workspace.async.spotinstances.PricingModel
-# interface should be used by the Spot Instances module
-# to set the spot price. This class will be constructed
-# by reflection, so it must be in the classpath of the
-# Nimbus executable.
-#
-# Currently there are two default implementations of that
-# interface, explained as follows:
-#
-# ** org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel **
-#
-# This pricing model aims to satisfy the maximum number of requests, giving
-# priority to higher bid requests when there aren't available VMs to fulfill
-# all requests. Suitable for scientific clouds.
-#
-# ** org.globus.workspace.async.pricingmodel.MaximizeProfitPricingModel **
-#
-# This pricing model aims to maximize the revenue of the cloud provider,
-# without necessarily increasing cloud utilization. Suitable for commercial
-# clouds.
-
-si.pricingmodel=org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel
-
-# Defines the instance type that will become
-# available as spot instances
-#
-# Supported instance types are:
-# small, large and xlarge.
-#
-# The amount of memory for each instance type
-# is defined in the elastic.conf file.
-#
-# Currently, Nimbus supports only one
-# Spot Instance type per site.
-
-si.instancetype=small
-
-# Defines the minimum price (in allocation units) per minute
-# that a Spot Instance can cost
-
-si.minprice=0.1
-
-
-################################################################################
-#
-# Memory Management Policies
-#
-################################################################################
-
-# The policies below define how the total resource pool memory is #
-# divided between ordinary Workspace Service requests #
-# (1st class requests) and Asynchronous requests (SI or backfill #
-# requests). #
-# #
-# It's important to note that these policies are preventive, in the #
-# sense that free space is reserved for future 1st class requests, #
-# but if the reserved space is still not sufficient to satisfy a #
-# 1st class request, SI or backfill requests will be pre-empted #
-# on-the-fly in order to free the needed amount of space (emergency #
-# pre-emption) #
-
-# This policy defines the minimum amount of free memory (in MegaBytes)
-# that should be reserved exclusively for 1st class requests, and thus
-# will not be allocated for SI or backfill requests.
-
-async.policies.minreservedmem=2048
-
-# This policy defines the maximum utilization (in %) for
-# 1st class requests. When the utilization raises above this
-# value, Spot Instance or backfill requests are pre-empted
-# (preventive pre-emption) in order to decrease the
-# utilization of 1st class requests.
-#
-# The Workspace Service will reserve an amount of free
-# memory for 1st class requests in order to ensure that
-# the utilization of 1st class requests is equal or below
-# that value, unless there is no more available memory
-# to reserve.
-#
-# The amount of reserved memory for 1st class requests
-# is derived from this formula:
-#
-# * maxUtilization = usedMem / (usedMem + reservedMem)
-#
-# reorganized, becomes:
-#
-# * reservedMem = (1 - maxUtilization)*usedMem/maxUtilization
-
-async.policies.maxutilization=0.7
View
5 service/service/java/tests/suites/spotinstances/home/README.txt
@@ -25,8 +25,7 @@ tests because it creates conflicts.
708a714
> -->
-6) The backfill and SI are enabled in "spotinstances.conf", they are normally disabled by
- default.
+6) The backfill and SI are enabled in "async.conf", they are normally disabled by default.
-7) The "async.policies.minreservedmem" setting in "spotinstances.conf" is 256, this is expected
+7) The "async.policies.minreservedmem" setting in "async.conf" is 256, this is expected
by all of the calculations in the test suites.
View
176 ...ice/java/tests/suites/spotinstances/home/services/etc/nimbus/workspace-service/async.conf
@@ -0,0 +1,176 @@
+################################################################################
+#
+# This file is used for configuring asynchronous requests (Spot Instances and
+# backfill requests) for this site.
+#
+################################################################################
+
+
+# SI ENABLED
+#
+# Indicates whether the spot instances feature is enabled (true) or disabled
+# (false) for this site. This is for remote requests -- if backfill is enabled
+# below, the superuser backfill reqs will be honored but any remote attempt to
+# add asynchronous requests will not be honored. If you switch this from 'true'
+# to 'false', it will only prevent new requests from being added.
+
+si.enabled=false
+
+
+# BACKFILL ENABLED
+#
+# Indicates whether the backfill feature is enabled (true) or disabled (false)
+# for this site. If you switch this from 'true' to 'false', it will cause all
+# currently running backfill nodes to be destroyed.
+
+backfill.enabled=false
+
+
+################################################################################
+#
+# Backfill settings
+#
+################################################################################
+
+# The intent of backfill is to provide a Nimbus cloud with the ability to deploy
+# a VM on idle nodes. Such a VM could be configured with a service like Condor,
+# allowing the VM to contribute cycles to some other purpose instead of wasting
+# cycles on idle cloud nodes. When a user request is recieved the VM is terminated
+# immediately and the user VM is deployed.
+#
+# The VM used by backfill (and the services inside of it) must be able to handle
+# a hard shutdown. A hard shutdown is used to minimize the turnaround time for
+# responding to user requests.
+#
+# A way to think about backfill nodes is that they are spot instances with the
+# very lowest priority (lower than the minimum spot bid) and only registered by
+# the Nimbus administrator.
+
+# MAX INSTANCES
+#
+# Max instances is the maximum number of VM instances that backfill will deploy
+# if it is enabled. If there is not enough space on the cloud for the maximum #
+# of instances it will deploy as many as it can. For example, if max.instances
+# is set to 12 on a 16 node cloud but there are 10 active user VMs then backfill
+# will still launch 6 backfill nodes. If the spot instances settings have space
+# reserved for regular requests (see the 'minreservedmem' and 'maxutilization'
+# confs below), these backfill requests will be subject to that as well, so the
+# site will not fill up completely.
+#
+# If max instances is set to 0 then backfill will use all idle VMMs.
+#
+# The default is 0.
+
+max.instances=0
+
+
+# DISK IMAGE
+#
+# The disk image is the image to use in the repository of the user configured
+# below (repo.user)
+
+disk.image=backfill.img
+
+
+# USER
+#
+# Authorization will be bypassed for this user but it needs to exist in order
+# to have a repository account for propagating "disk.image". Add this user
+# with the nimbus-new-user "--dn" option (set an explicit DN) or refer to a
+# pre-existing (administrator) one.
+
+repo.user=BACKFILL-SUPERUSER
+
+
+################################################################################
+#
+# Spot Instances settings
+#
+################################################################################
+
+# A pricing model is invoked every time the Spot Instances environment changes.
+# This can happen in many situations: when a request arrives, is canceled or
+# terminated, when the quantity of resources available for Spot Instances
+# increases or decreases, etc.
+#
+# Given the actual requests, the maximum quantity of VMs for Spot Instances and
+# the current spot price, a pricing model defines the next spot price based on
+# this variables. Usually a spot price change causes requests to be allocated,
+# if their bid is above the spot price, or pre-empted, if their bid is below
+# the current spot price.
+#
+# This property defines which implementation of the
+# org.globus.workspace.async.spotinstances.PricingModel Java interface should be
+# used by the Spot Instances module to set the spot price. This class will be
+# constructed by reflection, so it must be in the classpath of the Nimbus service.
+#
+# Currently there are two default implementations of the module, explained
+# as follows:
+#
+# ** org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel **
+#
+# This pricing model aims to satisfy the maximum number of requests, giving
+# priority to higher bid requests when there aren't available VMs to fulfill
+# all requests. Suitable for scientific clouds.
+#
+# ** org.globus.workspace.async.pricingmodel.MaximizeProfitPricingModel **
+#
+# This pricing model aims to maximize the revenue of the cloud provider, without
+# necessarily increasing cloud utilization. Suitable for commercial clouds.
+
+si.pricingmodel=org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel
+
+# Defines the instance type that will become available as spot instances.
+# Supported instance types are: small, large and xlarge.
+#
+# Currently, Nimbus supports only one Spot Instance type per site.
+# The amount of memory for each instance type is defined in the elastic.conf file.
+
+si.instancetype=small
+
+# Defines the minimum price (in allocation units) per minute that a Spot Instance
+# can cost
+
+si.minprice=0.1
+
+
+################################################################################
+#
+# Memory Management Policies
+#
+################################################################################
+
+# The policies below define how the total resource pool memory is divided between
+# ordinary Workspace Service requests (1st class requests) and Asynchronous
+# requests (SI or backfill requests).
+#
+# It's important to note that these policies are preventive, in the sense that
+# free space is reserved for future 1st class requests, but if the reserved space
+# is still not sufficient to satisfy a 1st class request, SI or backfill requests
+# will be pre-empted on-the-fly in order to free the needed amount of space
+# (emergency pre-emption).
+
+# This policy defines the minimum amount of free memory (in MB) that should be
+# reserved exclusively for 1st class requests, and thus will not be allocated for
+# SI or backfill requests.
+
+async.policies.minreservedmem=2048
+
+# This policy defines the maximum utilization (in %) for 1st class requests. When
+# the utilization raises above this value, Spot Instance or backfill requests are
+# pre-empted (preventive pre-emption) in order to decrease the utilization of 1st
+# class requests.
+#
+# The Workspace Service will reserve an amount of free memory for 1st class requests
+# in order to ensure that the utilization of 1st class requests is equal or below
+# that value, unless there is no more available memory to reserve.
+#
+# The amount of reserved memory for 1st class requests is derived from this formula:
+#
+# * maxUtilization = usedMem / (usedMem + reservedMem)
+#
+# Reorganized, becomes:
+#
+# * reservedMem = (1 - maxUtilization)*usedMem/maxUtilization
+
+async.policies.maxutilization=0.7
View
92 .../java/tests/suites/spotinstances/home/services/etc/nimbus/workspace-service/backfill.conf
@@ -1,92 +0,0 @@
-################################################################################
-#
-# This file is used for configuring VM backfill deployment on idle VMM nodes.
-#
-# The intent of backfill is to provide a Nimbus cloud with the ability to
-# deploy a generic VM on idle nodes. Such a VM could be configured with a
-# service like Condor, allowing the VM to contribute cycles to some other
-# purpose instead of wasting cycles on idle cloud nodes. When a user request is
-# recieved the VM is terminated immediately and the user VM is deployed.
-#
-# NOTE: Backfill must be configured and run by the Nimbus administrator. It is
-# not currently a feature that users can leverage directly.
-#
-# The VM used by backfill (and the services inside of it) must be able to
-# handle a hard shutdown. A hard shutdown is used to minimize the turn-
-# around time for responding to user requests.
-#
-################################################################################
-
-
-# BACKFILL
-#
-# If you would like to use backfill, you can enable it in spotinstances.conf
-
-
-# MAX INSTANCES
-#
-# Max instances is the maximum number of VM instances that backfill will deploy
-# if it is enabled. If there is not enough space on the cloud for the maximum
-# number of instances it will deploy as many as it can. For example, if max
-# instances is set to 12 on a 16 node cloud but there are 10 active user VMs
-# then backfill will still launch 6 backfill nodes. If the spot instances
-# settings have space reserved for regular requests (see the spotinstances.conf
-# 'minreservedmem' and 'maxutilization' configurations), these backfill requests
-# will be subject to that as well, so the site will not fill up completely.
-#
-# If max instances is set to 0 then backfill will use all idle VMMs.
-#
-# The default is 0.
-
-max.instances=0
-
-
-# DISK IMAGE
-#
-# The disk image is the image to use in the repository of the user configured below (repo.user)
-
-disk.image=backfill.img
-
-
-# USER
-#
-# Authorization will be bypassed for this user but it needs to exist in order to have a
-# repository account for propagating "disk.image"
-
-repo.user=BACKFILL-SUPERUSER
-
-
-# INSTANCE MEMORY
-#
-# The instance memory is the amount of memory (in MB) that the backfill image
-# will use.
-
-memory.MB=1024
-
-
-# VCPUs
-#
-# The number of VCPUs to use.
-
-vcpus=1
-
-
-# INSTANCE DURATION
-#
-# Instance duration is the amount of time (in seconds) that the backfill instance
-# will potentially be active. Obviously, the nature of backfill instances
-# necessitates that when a user request arrives the backfill instance will be
-# preempted, regardless of this setting. When the duration has elapsed the
-# instance will be terminated. It is possible that another backfill instance
-# will be dispatched almost immediately after the previous one was terminated.
-#
-# The default duration is one week.
-
-duration.seconds=604800
-
-
-# NETWORK
-#
-# Set the network to public or private.
-
-network=public
View
17 ...uites/spotinstances/home/services/etc/nimbus/workspace-service/other/main.conflocator.xml
@@ -64,13 +64,13 @@
value="$CUMULUS{" />
</bean>
- <bean id="siSettings"
+ <bean id="asyncSettings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location"
- value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/spotinstances.conf" />
+ value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/async.conf" />
<property name="placeholderPrefix"
- value="$SI{" />
+ value="$ASYNC{" />
</bean>
<bean id="accountingSettings"
@@ -82,15 +82,6 @@
value="$ACCOUNTING{" />
</bean>
- <bean id="backfillSettings"
- class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-
- <property name="location"
- value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/backfill.conf" />
- <property name="placeholderPrefix"
- value="$BACKFILL{" />
- </bean>
-
<bean id="sshSettings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
@@ -132,7 +123,7 @@
<property name="location"
value="$NIMBUS_HOME/services/etc/nimbus/workspace-service/metadata.conf"/>
</bean>
-
+
<bean id="metadataSettings"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
View
32 ...java/tests/suites/spotinstances/home/services/etc/nimbus/workspace-service/other/main.xml
@@ -553,7 +553,7 @@
</bean>
<bean id="nimbus-rm.backfill"
- class="org.globus.workspace.scheduler.backfill.Backfill"
+ class="org.globus.workspace.async.backfill.Backfill"
init-method="validate">
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
@@ -566,25 +566,17 @@
<property name="backfillEnabled"
value="false" />
<property name="maxInstances"
- value="$BACKFILL{max.instances}" />
+ value="$ASYNC{max.instances}" />
<property name="diskImage"
- value="$BACKFILL{disk.image}" />
- <property name="memoryMB"
- value="$BACKFILL{memory.MB}" />
- <property name="vcpus"
- value="$BACKFILL{vcpus}" />
- <property name="durationSeconds"
- value="$BACKFILL{duration.seconds}" />
- <property name="network"
- value="$BACKFILL{network}" />
+ value="$ASYNC{disk.image}" />
</bean>
<!-- ===================================================================
org.globus.workspace.async.* interfaces
=================================================================== -->
- <bean id="nimbus-rm.si.pricingmodel" class="$SI{si.pricingmodel}" />
+ <bean id="nimbus-rm.si.pricingmodel" class="$ASYNC{si.pricingmodel}" />
<bean id="nimbus-rm.si.asyncreqmap" class="org.globus.workspace.async.AsyncRequestMap">
<constructor-arg value="$COMMON{caches.dir}" />
@@ -597,22 +589,22 @@
<constructor-arg ref="nimbus-rm.loglevels" />
<constructor-arg ref="nimbus-rm.home.instance"/>
<constructor-arg ref="nimbus-rm.home.group"/>
- <constructor-arg value="$SI{si.minprice}" />
+ <constructor-arg value="$ASYNC{si.minprice}" />
<constructor-arg ref="nimbus-rm.si.pricingmodel" />
<constructor-arg ref="nimbus-rm.si.asyncreqmap" />
- <constructor-arg value="$SI{si.enabled}" />
- <constructor-arg value="$SI{backfill.enabled}" />
+ <constructor-arg value="$ASYNC{si.enabled}" />
+ <constructor-arg value="$ASYNC{backfill.enabled}" />
<!-- set after object creation time to avoid circular dep -->
<property name="creationManager" ref="nimbus-rm.creation" />
-
- <!-- Property values coming via spotinstances.conf -->
+
+ <!-- Property values coming via spotinstances.conf -->
<property name="minReservedMem"
- value="$SI{async.policies.minreservedmem}" />
+ value="$ASYNC{async.policies.minreservedmem}" />
<property name="maxUtilization"
- value="$SI{async.policies.maxutilization}" />
+ value="$ASYNC{async.policies.maxutilization}" />
<property name="instanceMem"
- value="$ELASTIC{memory.$SI{si.instancetype}}" />
+ value="$ELASTIC{memory.$ASYNC{async.instancetype}}" />
</bean>
View
134 .../tests/suites/spotinstances/home/services/etc/nimbus/workspace-service/spotinstances.conf
@@ -1,134 +0,0 @@
-######################################################
-# #
-# This file is used for configuring asynchronous #
-# requests (Spot Instances and #
-# backfill requests) for this site #
-# #
-######################################################
-
-################################################################################
-#
-# General settings
-#
-################################################################################
-
-# Indicates whether the spot instances feature is enabled (true) or disabled (false)
-# for this site. This is for remote requests -- if backfill is enabled below, the
-# superuser backfill reqs will be honored but any remote attempt to add asynchronous
-# requests will not be honored. If you switch this from 'true' to 'false', it will
-# only prevent new requests from being added.
-
-si.enabled=true
-
-# (TEST SUITES: see main.xml Backfill and AsyncManager conf)
-backfill.enabled=true
-
-################################################################################
-#
-# Spot Instances settings
-#
-################################################################################
-
-# A pricing model is invoked every time the Spot Instances
-# environment changes. This can happen in many situations:
-# when a request arrives, is canceled or terminated, when
-# the quantity of resources available for Spot Instances
-# increases or decreases, etc.
-#
-# Given the actual requests, the maximum quantity of VMs for
-# Spot Instances and the current spot price, a pricing model
-# defines the next spot price based on this variables.
-# Usually a spot price change causes requests to be allocated,
-# if their bid is above the spot price, or pre-empted, if their
-# bid is below the current spot price.
-#
-# This property defines which implementation of the
-# org.globus.workspace.async.spotinstances.PricingModel
-# interface should be used by the Spot Instances module
-# to set the spot price. This class will be constructed
-# by reflection, so it must be in the classpath of the
-# Nimbus executable.
-#
-# Currently there are two default implementations of that
-# interface, explained as follows:
-#
-# ** org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel **
-#
-# This pricing model aims to satisfy the maximum number of requests, giving
-# priority to higher bid requests when there aren't available VMs to fulfill
-# all requests. Suitable for scientific clouds.
-#
-# ** org.globus.workspace.async.pricingmodel.MaximizeProfitPricingModel **
-#
-# This pricing model aims to maximize the revenue of the cloud provider,
-# without necessarily increasing cloud utilization. Suitable for commercial
-# clouds.
-
-si.pricingmodel=org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel
-
-# Defines the instance type that will become
-# available as spot instances
-#
-# Supported instance types are:
-# small, large and xlarge.
-#
-# The amount of memory for each instance type
-# is defined in the elastic.conf file.
-#
-# Currently, Nimbus supports only one
-# Spot Instance type per site.
-
-si.instancetype=small
-
-# Defines the minimum price (in allocation units) per minute
-# that a Spot Instance can cost
-
-si.minprice=0.1
-
-
-################################################################################
-#
-# Memory Management Policies
-#
-################################################################################
-
-# The policies below define how the total resource pool memory is #
-# divided between ordinary Workspace Service requests #
-# (1st class requests) and Asynchronous requests (SI or backfill #
-# requests). #
-# #
-# It's important to note that these policies are preventive, in the #
-# sense that free space is reserved for future 1st class requests, #
-# but if the reserved space is still not sufficient to satisfy a #
-# 1st class request, SI or backfill requests will be pre-empted #
-# on-the-fly in order to free the needed amount of space (emergency #
-# pre-emption) #
-
-# This policy defines the minimum amount of free memory (in MegaBytes)
-# that should be reserved exclusively for 1st class requests, and thus
-# will not be allocated for SI or backfill requests.
-
-async.policies.minreservedmem=256
-
-# This policy defines the maximum utilization (in %) for
-# 1st class requests. When the utilization raises above this
-# value, Spot Instance or backfill requests are pre-empted
-# (preventive pre-emption) in order to decrease the
-# utilization of 1st class requests.
-#
-# The Workspace Service will reserve an amount of free
-# memory for 1st class requests in order to ensure that
-# the utilization of 1st class requests is equal or below
-# that value, unless there is no more available memory
-# to reserve.
-#
-# The amount of reserved memory for 1st class requests
-# is derived from this formula:
-#
-# * maxUtilization = usedMem / (usedMem + reservedMem)
-#
-# reorganized, becomes:
-#
-# * reservedMem = (1 - maxUtilization)*usedMem/maxUtilization
-
-async.policies.maxutilization=0.7

0 comments on commit c53bebc

Please sign in to comment.