Mash slowness update
Luke Macken
lmacken at redhat.com
Tue May 5 22:28:27 UTC 2015
On Tue, May 05, 2015 at 04:16:55PM -0500, Dennis Gilmore wrote:
> So in debugging why mash is so slow. we had a realisation, one thing it was
> supposed to always be doing never worked. and that is hardlinking the
> packages in /mnt/koji/mash to /mnt/koji/packages/ this is due to apache owning
> everything under /mnt/koji/packages and the compose processes all running as
> masher. the hardlink failed due to permission errors
[…]
> the rawhide mash today took ~3 hours to put all the files into place in
[…]
> when run as apache in a test putting all the files in place in /mnt/koji/mash
> took ~4 minutes
Nice find, this is huge.
> we need to have bodhi run mash as apache
Untested patch attached. It should be simple enough to test in staging
to see if it causes any SELinux explosions.
luke
-------------- next part --------------
From 2c9b22e9cdada5740cbedb667eba497bcd3eecf1 Mon Sep 17 00:00:00 2001
From: Luke Macken <lmacken at redhat.com>
Date: Tue, 5 May 2015 22:22:38 +0000
Subject: [PATCH] Run bodhi as apache instead of the masher user.
This will let us finally take advantage of the hardlink optimization in mash.
https://lists.fedoraproject.org/pipermail/rel-eng/2015-May/019985.html
Signed-off-by: Luke Macken <lmacken at redhat.com>
diff --git a/roles/bodhi/backend/files/bodhi-masher.conf b/roles/bodhi/backend/files/bodhi-masher.conf
index 1f962ed..d8c5f79 100644
--- a/roles/bodhi/backend/files/bodhi-masher.conf
+++ b/roles/bodhi/backend/files/bodhi-masher.conf
@@ -3,7 +3,7 @@ Alias /updates/static /usr/share/bodhi/static
WSGISocketPrefix run/wsgi
WSGIRestrictSignal Off
-WSGIDaemonProcess bodhi user=masher group=masher display-name=bodhi
+WSGIDaemonProcess bodhi user=apache group=apache display-name=bodhi
WSGIPythonOptimize 1
WSGIScriptAlias /updates /usr/share/bodhi/bodhi.wsgi/updates
diff --git a/roles/bodhi/backend/tasks/main.yml b/roles/bodhi/backend/tasks/main.yml
index 71df8ec..9c76b14 100644
--- a/roles/bodhi/backend/tasks/main.yml
+++ b/roles/bodhi/backend/tasks/main.yml
@@ -13,8 +13,8 @@
template: >
src="bodhi-masher.cfg.j2"
dest="/etc/bodhi/bodhi.cfg"
- owner=masher
- group=masher
+ owner=apache
+ group=apache
mode=0600
notify:
- restart httpd
@@ -37,13 +37,13 @@
- name: change owner and group attributes of bodhi.pem file
file: >
path="/etc/pki/bodhi/bodhi.pem"
- owner=masher
- group=masher
+ owner=apache
+ group=apache
tags:
- config
- name: change owner and group attributes of /var/log/bodhi directory
- file: path=/var/log/bodhi owner=masher group=masher
+ file: path=/var/log/bodhi owner=apache group=apache
tags:
- config
@@ -51,8 +51,8 @@
template: >
src=mash.conf
dest=/etc/bodhi/mash.conf
- owner=masher
- group=masher
+ owner=apache
+ group=apache
mode=0640
tags:
- config
@@ -70,7 +70,7 @@
- name: change owner attribute of /var/tmp/bodhi-bz.cookie file
file: >
path=/var/tmp/bodhi-bz.cookie
- owner=masher
+ owner=apache
tags:
- config
@@ -78,7 +78,7 @@
copy: >
src="{{ item }}"
dest="/etc/bodhi/{{ item }}"
- owner=masher
+ owner=apache
mode=0640
with_items:
- f20-updates.mash
@@ -107,8 +107,8 @@
template: >
src="bodhi-epel-masher.cfg.j2"
dest="/etc/bodhi/bodhi.cfg"
- owner=masher
- group=masher
+ owner=apache
+ group=apache
mode=0600
when: inventory_hostname.startswith('bodhi-backend02')
notify:
@@ -122,8 +122,8 @@
template: >
src="bodhi-masher-jobrunner.cfg.j2"
dest="/etc/bodhi/bodhi.cfg"
- owner=masher
- group=masher
+ owner=apache
+ group=apache
mode=0600
when: inventory_hostname.startswith('bodhi-backend01')
notify:
--
1.7.2.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/rel-eng/attachments/20150505/9615da5c/attachment-0001.sig>
More information about the rel-eng
mailing list