Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Enhancement at startup of gears and restart of applications (cgroup) #6261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Enhancement at startup of gears and restart of applications (cgroup) #6261

wants to merge 1 commit into from

Conversation

IshentRas
Copy link
Contributor

cg_template_boosted was originally created for handling application creation events (Which require extra resources to start) for instance JEE apps.
This PR is an enhancement for handling applications restart or gears start/restart actions as they also require the same boost.
Seen at customer's side (PM if you require more info)

@Miciah
Copy link
Contributor

Miciah commented Oct 8, 2015

Looks reasonable to me, although I could be missing some reason we were not already boosting these operations.

@ironcladlou, I think you might have some familiarity with the boost code, right? Also, you authored 8bee9db, which changed unidle_gear to use a REST call to the broker instead of a boosted direct call to start_gear, and this PR would add back the boost in that case, as well as in some other cases. Would you be able to review this PR?

@ironcladlou
Copy link
Contributor

I can't think right now offhand why restart couldn't also be boosted. As far as unidling via the REST API, I remember there was a very good reason that it's necessary, but I'm struggling to remember the details. There might be an old bugzilla issue about it. @jwhonce, I know you and I devised the unidling fix way back... do you happen to remember any more detail?

@Miciah
Copy link
Contributor

Miciah commented Oct 8, 2015

Yeah, your commit links to https://bugzilla.redhat.com/show_bug.cgi?id=1093776 "Idler doesn't unidle secondary gears in a scaled application". Your change makes sense, but I think it had the side effect of removing boost for unidle; I thought it was worth mentioning the commit because this PR restores that boost.

@jwhonce
Copy link
Contributor

jwhonce commented Oct 8, 2015

@Miciah @ironcladlou

History: V1 only idled the first gear in an application. That was ported to V2 but Online found a lot of scaled applications where node capacity could be increased if we idled all the gears in the application. Ie, a scaled database application that was created but never used. Pre @ironcladlou 's PR the database gear never idled. To idle and then unidle the whole application required orchestration from the Broker.

A potential issue with this PR is boosting a boosted gear during gear create and updates. The two test cases I see are that: 1) boosting a boosted gear is restored to default after the outer-most boosted block is finished, and 2) that the gear doesn't loose boost after the embedded boost block is finished.

@IshentRas
Copy link
Contributor Author

Thanks all for the comments so far. As far as I can tell, it has been a real issue at the client's side (starting,restarting JEE application) and I testing the below has definitely boosted the platform.
On over 400 deployed applications on the OSEv2 platform they have got over 80% with JEE cartridges.
They tried to change the resource_limits.conf so as to play with cg_template_throttled or cpu_cfs_quota_us but nothing has worked a part the P.R.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants