Bug 1401931 - [RFE] reduce the size of the appliance
Summary: [RFE] reduce the size of the appliance
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-appliance
Classification: oVirt
Component: RFEs
Version: 4.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ovirt-4.1.1
: 4.1
Assignee: Yuval Turgeman
QA Contact: Gonza
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-06 12:27 UTC by Yaniv Kaul
Modified: 2017-04-21 09:47 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-21 09:47:38 UTC
oVirt Team: Node
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: exception+
pstehlik: testing_plan_complete-
mgoldboi: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)
ovirt-engine dependency tree (1.54 MB, image/png)
2017-01-19 15:53 UTC, Ido Rosenzwig
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1297492 1 None None None 2021-01-20 06:05:38 UTC
oVirt gerrit 73328 0 master MERGED build: removed firmware packages from appliance 2017-03-01 13:29:57 UTC
oVirt gerrit 73356 0 ovirt-4.1-snapshot MERGED build: removed firmware packages from appliance 2017-03-01 16:10:35 UTC
oVirt gerrit 73357 0 ovirt-4.1-pre MERGED build: removed firmware packages from appliance 2017-03-01 16:10:55 UTC
oVirt gerrit 73358 0 ovirt-4.1 MERGED build: removed firmware packages from appliance 2017-03-01 16:11:21 UTC

Internal Links: 1297492

Description Yaniv Kaul 2016-12-06 12:27:45 UTC
Description of problem:
The appliance is quite big, ranging from 800MB on a good day to 1.5GB.
We should see how we can reduce its size, as it'll mean faster deployment, less updates needed, faster upgrade, faster build-time, etc.

The 'easiest' path is to reduce the number of packages that are in the appliance itself.

This is a RFE to go over the RPMs and see what can be removed.
The query I usually use is:
rpm -qa --queryformat '%{size} %{name}\n' | sort -rn | more


One of the first that come to mind is Linux firmware. It is not needed on a VM, and is probably the biggest you'll find in a VM...

Other suggestions are to use java...-headless in order to carry over less X11 stuff, which we do not need.

Note: the idea here is not to fight over every bite, but with few easy wins reduce the size (so a neat 'trick' to remove all but English locale, is not an option here, for example).

Comment 1 Fabian Deutsch 2016-12-06 16:37:32 UTC
Yep - one measure we already took an which is on track is bug 1297492.

The solution here is not to split up the kernel, but now the kmod compression is simply getting enabled in the kernel build, which reduces the kernel on-disk footprint.

But as you noted, additional mesures can be taken.

Comment 2 Yaniv Kaul 2016-12-07 07:39:43 UTC
Speaking about Kernel, you can probably drop linux-firmware RPM, which is a huge RPM. I don't think it's needed for VMs.

Comment 3 Fabian Deutsch 2017-01-03 10:06:33 UTC
Ido, can you compare the size of an appliance build with the linux-firmware package (like today).
And the size of the appliance without the linux-firmware package.

Sandro also suggested to use java-headless for engine. This requires a separate RFE.

Comment 4 Ido Rosenzwig 2017-01-12 16:43:10 UTC
The size of the RPM with linux-firmware package is 762 MB,
and without the package is 712 MB.

We save 50 MB in total.

Comment 5 Ido Rosenzwig 2017-01-19 15:53:23 UTC
Created attachment 1242518 [details]
ovirt-engine dependency tree

Legend:

Green node  : smaller then 10MB
Yellow node : between 10MB to 40MB
Red node    : greater then 40MB

Comment 6 Ido Rosenzwig 2017-01-19 16:12:52 UTC
Do we need the package 'numpy'? 
It is required by ovirt-engine in the spec file, but there no file import it.
One can see (in the attachment on comment 5) that the package has some large dependencies.
If we can let it go, we can minimize the size of the appliance.

Comment 7 Yedidyah Bar David 2017-01-19 17:41:17 UTC
(In reply to Ido Rosenzwig from comment #6)
> Do we need the package 'numpy'? 
> It is required by ovirt-engine in the spec file, but there no file import it.
> One can see (in the attachment on comment 5) that the package has some large
> dependencies.
> If we can let it go, we can minimize the size of the appliance.

No idea. I suggest to check git log and find the patch that added it. Then either it will be obvious or you can ask the author.

Comment 8 Sandro Bonazzola 2017-02-10 10:00:28 UTC
(In reply to Ido Rosenzwig from comment #6)
> Do we need the package 'numpy'? 
> It is required by ovirt-engine in the spec file, but there no file import it.
> One can see (in the attachment on comment 5) that the package has some large
> dependencies.
> If we can let it go, we can minimize the size of the appliance.

It has been added for bug #1045042 with https://gerrit.ovirt.org/26371

I think we should remove ovirt-engine-websocket-proxy from the appliance.
It can be added after HE is deployed or installed in a separate VM.

Moran? Yaniv?

Comment 9 Yaniv Kaul 2017-02-12 11:27:56 UTC
(In reply to Sandro Bonazzola from comment #8)
> (In reply to Ido Rosenzwig from comment #6)
> > Do we need the package 'numpy'? 
> > It is required by ovirt-engine in the spec file, but there no file import it.
> > One can see (in the attachment on comment 5) that the package has some large
> > dependencies.
> > If we can let it go, we can minimize the size of the appliance.
> 
> It has been added for bug #1045042 with https://gerrit.ovirt.org/26371
> 
> I think we should remove ovirt-engine-websocket-proxy from the appliance.
> It can be added after HE is deployed or installed in a separate VM.
> 
> Moran? Yaniv?

I'm in favor. It is only used for Spice HTML 5 (which we should drop!) or the NoVNC.

Note that we can remove numpy itself only - it's optional for the proxy and only improves performance, nothing dramatic we can't leave without - vs. saving 100+ MB or so.

Comment 10 Yaniv Lavi 2017-02-12 15:23:45 UTC
(In reply to Sandro Bonazzola from comment #8)
> (In reply to Ido Rosenzwig from comment #6)
> > Do we need the package 'numpy'? 
> > It is required by ovirt-engine in the spec file, but there no file import it.
> > One can see (in the attachment on comment 5) that the package has some large
> > dependencies.
> > If we can let it go, we can minimize the size of the appliance.
> 
> It has been added for bug #1045042 with https://gerrit.ovirt.org/26371
> 
> I think we should remove ovirt-engine-websocket-proxy from the appliance.
> It can be added after HE is deployed or installed in a separate VM.
> 
> Moran? Yaniv?

Ack, sounds good.

Comment 11 Moran Goldboim 2017-02-21 11:23:24 UTC
(In reply to Yaniv Dary from comment #10)
> (In reply to Sandro Bonazzola from comment #8)
> > (In reply to Ido Rosenzwig from comment #6)
> > > Do we need the package 'numpy'? 
> > > It is required by ovirt-engine in the spec file, but there no file import it.
> > > One can see (in the attachment on comment 5) that the package has some large
> > > dependencies.
> > > If we can let it go, we can minimize the size of the appliance.
> > 
> > It has been added for bug #1045042 with https://gerrit.ovirt.org/26371
> > 
> > I think we should remove ovirt-engine-websocket-proxy from the appliance.
> > It can be added after HE is deployed or installed in a separate VM.
> > 
> > Moran? Yaniv?
> 
> Ack, sounds good.

going with this approach will actually means that we'll have degradation in the integration with cloudforms (https://access.redhat.com/documentation/en-us/red_hat_cloudforms/4.2/html/support_matrix/index#remote_consoles). considering saving 100mb compared with the noise it can make, i wouldn't go on this pass till we have better support from CF side.

Comment 12 Yaniv Kaul 2017-02-21 12:45:23 UTC
(In reply to Moran Goldboim from comment #11)
> (In reply to Yaniv Dary from comment #10)
> > (In reply to Sandro Bonazzola from comment #8)
> > > (In reply to Ido Rosenzwig from comment #6)
> > > > Do we need the package 'numpy'? 
> > > > It is required by ovirt-engine in the spec file, but there no file import it.
> > > > One can see (in the attachment on comment 5) that the package has some large
> > > > dependencies.
> > > > If we can let it go, we can minimize the size of the appliance.
> > > 
> > > It has been added for bug #1045042 with https://gerrit.ovirt.org/26371
> > > 
> > > I think we should remove ovirt-engine-websocket-proxy from the appliance.
> > > It can be added after HE is deployed or installed in a separate VM.
> > > 
> > > Moran? Yaniv?
> > 
> > Ack, sounds good.
> 
> going with this approach will actually means that we'll have degradation in
> the integration with cloudforms
> (https://access.redhat.com/documentation/en-us/red_hat_cloudforms/4.2/html/
> support_matrix/index#remote_consoles). considering saving 100mb compared
> with the noise it can make, i wouldn't go on this pass till we have better
> support from CF side.

It's not a degradation, it just means they need to install it, no big deal, can be part of the documentation. 
As Spice-HTML5 is not supported anyway, it's just for the NoVNC - and it could be added clearly to the NoVNC page, for example.

And it's additional 100MB to be reduced from the appliance, making it quicker to download and install (and more importantly for me, put it into CI quickly, in the main path).

Comment 17 Yaniv Kaul 2017-04-10 12:48:48 UTC
What is the size 4.1?

Comment 18 Gonza 2017-04-12 07:42:10 UTC
Please note that new packages have been added to the appliance for the hosted engine, like fluentd and collectd plus dependencies.

rhvm-appliance-1:4.1.20170403.0-1.el7.noarch.rpm
Size	1474137152

rhvm-appliance-1:4.1.20170221.0-1.el7ev.noarch.rpm
Size	1663783960

Comment 19 Yaniv Kaul 2017-04-12 07:50:21 UTC
(In reply to Gonza from comment #18)
> Please note that new packages have been added to the appliance for the
> hosted engine, like fluentd and collectd plus dependencies.
> 
> rhvm-appliance-1:4.1.20170403.0-1.el7.noarch.rpm
> Size	1474137152
> 
> rhvm-appliance-1:4.1.20170221.0-1.el7ev.noarch.rpm
> Size	1663783960

Still huge. Would you run:
rpm -qa --queryformat '%{size} %{name}\n' | sort -rn

(from the initial description) to see that we've improved and removed big and unneeded packages?


Note You need to log in before you can comment on or make changes to this bug.