@@ -189,16 +189,26 @@ def LparSetup(self):
189
189
try : self .desired_proc_units = float (conf .args .desired_proc_units )
190
190
except AttributeError :
191
191
self .desired_proc_units = 2.0
192
- try : self .max_proc_units = float (conf . args . max_proc_units )
192
+ try : self .max_proc_units = float (self . cv_HMC . get_available_proc_resources ()[ 0 ] )
193
193
except AttributeError :
194
194
self .max_proc_units = 2.0
195
195
try : self .overcommit_ratio = int (conf .args .overcommit_ratio )
196
196
except AttributeError :
197
197
self .overcommit_ratio = 1
198
+ try : self .min_memory = conf .args .min_memory
199
+ except AttributeError :
200
+ self .min_memory = "4096"
201
+ try : self .desired_memory = conf .args .desired_memory
202
+ except AttributeError :
203
+ self .desired_memory = "40960"
204
+ try : self .max_memory = conf .args .max_memory
205
+ except AttributeError :
206
+ self .max_memory = int (self .cv_HMC .get_available_mem_resources ()[0 ]) + int (self .desired_memory )
198
207
proc_mode = 'shared'
199
208
self .cv_HMC .profile_bckup ()
200
209
self .cv_HMC .change_proc_mode (proc_mode , self .sharing_mode , self .min_proc_units ,
201
- self .desired_proc_units , self .max_proc_units , self .overcommit_ratio )
210
+ self .desired_proc_units , self .max_proc_units ,
211
+ self .min_memory , self .desired_memory , self .max_memory ,self .overcommit_ratio )
202
212
'''
203
213
If cpu=dedicated is passed in machine_config lpar proc mode changes to dedicated mode.
204
214
Pass sharing_mode, min_proc_units, max_proc_units and desired_proc_units in config file.
@@ -231,7 +241,7 @@ def LparSetup(self):
231
241
self .desired_memory = "40960"
232
242
try : self .max_memory = conf .args .max_memory
233
243
except AttributeError :
234
- self .max_memory = self .cv_HMC .get_available_mem_resources ()[0 ]
244
+ self .max_memory = int ( self .cv_HMC .get_available_mem_resources ()[0 ]) + int ( self . desired_memory )
235
245
proc_mode = 'ded'
236
246
self .cv_HMC .profile_bckup ()
237
247
self .cv_HMC .change_proc_mode (proc_mode , self .sharing_mode , self .min_proc_units ,
0 commit comments