Before going for this task my assumptions were as front - I was under impression that prctl command will do the temporary effect and will not remain across the reboot. This is what my understanding - prctl is an “on-the-fly” way to temporarily set Resource Control assignments & only after reboot modified parameter get permanent.
Then Alex replied explaining how exactly it works...
prctl, rcapadm modifies the running zone.
zonecfg defines the resource parameters of the zone when it boots.
So... To make a change dynamically you:
1) Update the zonecfg. The reason you do this is so that when rebooted it doesn't revert back to the old settings.
2) Use the prctl, rcapadm commands to modify the zone while it is online. The data you feed into prctl and rcapadm should match the changes you've made to zonecfg.
Below are the detail steps to add capped-memory to running container –
Now modify the zones runtime settings:
Then verify you're settings have taken effect:
It taught me a new lesson and at the same time I am still wondering “AM I KNOWING THIS BEFORE OR I WAS JUST LOST???” SHAME ON ME, VERY DISAPPOINTING HOWEVER THIS CONCEPT IS NOW GOT HARDCODED IN MY LITTLE BRAIN….
Thanks Alex, thanks a lot.
Hope this will help someone, somewhere!