These are chat archives for ManageIQ/manageiq/performance

28th
Mar 2017
Nick LaMuro
@NickLaMuro
Mar 28 2017 16:43
So fun fact: Of the 2 gigs our docker container is in size, 146M of that is from the manageiq-gems-pending spec dir...
because it is a git gem, and we just run bundle install, we get the whole shallow clone of the project, and not what we actually need
Keenan Brock
@kbrock
Mar 28 2017 17:21
maybe we should stop using git gems? :trollface: :fingers-crossed:
Jason Frey
@Fryguy
Mar 28 2017 18:13
@simaishi ^^ :point_up: March 28, 2017 12:43 PM
Satoe Imaishi
@simaishi
Mar 28 2017 18:21
hmm... i'm sure the number will go up if we look at spec dir from other repos too...
Nick LaMuro
@NickLaMuro
Mar 28 2017 18:34
for the record, there really isn't much that could be done here from the build end here besides possibly a rm -rf /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/**/spec
Jason Frey
@Fryguy
Mar 28 2017 18:36
yeah, which is fine...though I thikn we intentionally a) kept git history and b) kept spec dir for developers
I'd have to go back to the PRs, but I vaguely remember that
Nick LaMuro
@NickLaMuro
Mar 28 2017 18:37
@Fryguy looking on the box itself, it doesn't look like it is a git dir in the docker container
what is actually a larger suck of disk space is actually the node_modules dir of the manageiq-ui-service repo, coming in at about half a Gig...
Jason Frey
@Fryguy
Mar 28 2017 18:41
I haven't looked at the docker images in a while and can't remember if we wanted them to be production-like or development-like
if the latter, we can probably clean up a lot like we do on the appliances
The node_modules is interesting...we should see if those are in the appliances as well...because that would just those down quite a bit
Nick LaMuro
@NickLaMuro
Mar 28 2017 18:44
that is the thing, I don't think we can reduce the size of the node_modules dir, that is just how big the dependencies take up on disk

can't say about the difference between the container and the appliance though, but from what I saw in the appliance build repo, we are just doing a bundle install inside of a pushd /var/www/miq/vmdb:

https://github.com/ManageIQ/manageiq-appliance-build/blob/master/kickstarts/partials/post/bundler.ks.erb#L11-L13

But I am not familiar enough with the build process to know if that is even the right spot, of if I am way off target

Jason Frey
@Fryguy
Mar 28 2017 18:48
we can remove them because they get minified during build step
so the actual node_modules themselves no longer become relevant (i.e. they are for build time only)
Eric Hayes
@hayesr
Mar 28 2017 18:49
:point_up: Depending on the dev vs production question
Keenan Brock
@kbrock
Mar 28 2017 18:49
ooh - nice
Jason Frey
@Fryguy
Mar 28 2017 18:49
exactly
Nick LaMuro
@NickLaMuro
Mar 28 2017 18:50
@Fryguy I am unfamiliar with the manageiq-ui-service repo, but is it just a frontend lib? Or is there a backend process running on node for this?
Jason Frey
@Fryguy
Mar 28 2017 18:50
frontend...they use yarn build to compile and stuff it into manageiq
Nick LaMuro
@NickLaMuro
Mar 28 2017 18:50
okay, then yeah, totally agree
Jason Frey
@Fryguy
Mar 28 2017 18:50
eventually we might go to background process running on node, but that's future
Nick LaMuro
@NickLaMuro
Mar 28 2017 18:50
at that point, you wouldn't be able to kill the node_modules dir then
Jason Frey
@Fryguy
Mar 28 2017 18:51
yup
Nick LaMuro
@NickLaMuro
Mar 28 2017 18:51
or you would have to use a subset that is only needed to run the process
Jason Frey
@Fryguy
Mar 28 2017 18:51
we'd probably have to manipulate the Docker build so that an intermediate image doesn't have the node_modules, but I'm sure it's possible
@NickLaMuro yeah, something like that
Keenan Brock
@kbrock
Mar 28 2017 18:52
come that point - we'd have a different docker container for that process?
Nick LaMuro
@NickLaMuro
Mar 28 2017 18:52
the equivalent of a group :production in Gemfile land
Keenan Brock
@kbrock
Mar 28 2017 18:52
aka, more than 1
Jason Frey
@Fryguy
Mar 28 2017 18:52
@NickLaMuro Can you open an issue on manageiq, tag with build/docker and assign to @simaishi ?
Nick LaMuro
@NickLaMuro
Mar 28 2017 18:52
Sure
Jason Frey
@Fryguy
Mar 28 2017 18:52
I think it's worth pursuing
Nick LaMuro
@NickLaMuro
Mar 28 2017 18:53
I would assume it is more than just docker, but I don't have the breadth of knowledge in that department to say for sure
Jason Frey
@Fryguy
Mar 28 2017 18:53
yeah, she'll know if it applies to appliances as well or not
and the pods-based containers