Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

EasyApache 3 - speed up building by using more cores

a289 shared this idea 9 years ago
Completed

It would be nice if EasyApache 3 could be configured to use more cores so the build completes faster. I found a post online which documents how to hack things to get it to do that, but it'd be nice if it was built in. See http://blog.unixy.net/2013/04/speed-up-cpanel-whm-easyapache-rebuilds-on-multi-core-or-multi-thread-server/ if desired.


If the reason it isn't already configured this way is because to not use too much CPU, the build could always run niced.

Replies (5)

photo
1

This is already done by EasyApache. It will pass -j2 to make when it detects multiple cores. Are you asking for EA to use more cores than 2?

photo
1

Yes, I meant more cores than it currently uses (i.e. 2 as you said). On servers with tons of cores, a lot sit idle.

photo
1

+2 for this feature, nowadays we have systems with 6-8-12+ cores or more that left doing nothing. Utilizing some of this cores should come at no performance cost while allowing us to efficiently use sysadmin's time.

photo
1

(Deleted and posted as reply to above)

photo
2

Morning!


I'm hesitant to spend a ton of effort on EA3 in this area since we're close to deprecating it. Instead of trying to figure out 'idle' cores, what if we just made it always use half the available cores on the machine?


If you had 1 or 2 cores, we'd always just use 1 core. If you have more than 4, we'd start using half the cores. If you have 8 cores, we'd use 4. If you have 32 cores, we'd make 16 cores available during building.


Does this sound like a good compromise?

photo
1

That sounds like a good compromise but be sure to run the EA build at low CPU priority (i.e. niced) so as to not have an unexpected level of system performance impact for sysadmins who are used to it having little to no impact due to not using many cores currently.

photo
2

Hi,


Only certain kernel schedulers allow the use of nice'ing, so this wouldn't be a 'It'll do this on all environments'


What if we simply provided a rawopt option for make? You can simply:

echo "\-j99" > /var/cpanel/easy/apache/rawopts/make


Where '99' is the number of cores you want EA3 to build with. This allows you to set it up on your own systems and not have to worry about 'nicing' or overburdening resources. This seems that it'll be a better fit than a general 'Auto-use these # of cores'

photo
1

Yes, that'd be great! Thanks for the rapid response.

photo
1

I would definitely go with the rawopts! Thanks Jacob

photo
1

Hello,


Tuesday we released EA 3.32.9, which contains the option to add a 'make' rawopt and add in '-j#' to allow more cores to be used by make. Test it out and let us know how it works for you!

photo
1

I edited /var/cpanel/easy/apache/rawopts/make and put -j16 in there but when running /scripts/easyapache, the build log says:

!! rawopt: '-j16' set to '' !!


Am I setting it incorrectly https://documentation.cpanel.net/display/EA/Raw+Opts doesn't seem to clarify how to set it? Total time went from about 11:30 to about 9:45 so it's possible it had some impact still, but I was expecting more of a change.

photo
1

Deleting this comment and posting as direct reply to above post.

Replies have been locked on this page!