Set the nice value of mapper process to -5

The mapper is the dbus service discovery manager which is used
pervasively in openbmc apps. During stress tests it was observed
that mapper is acting as a bottleneck and affecting BMC performance and
leading to mapper calls failing. We saw improved performance with the
mapper by bumping the priority.

Resolves openbmc/openbmc#2656

Change-Id: I7fa5bf1fe78a944fb773cfba99e00f27de6b2110
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/meta-witherspoon/recipes-phosphor/dbus/phosphor-mapper.bbappend b/meta-witherspoon/recipes-phosphor/dbus/phosphor-mapper.bbappend
new file mode 100644
index 0000000..668ee93
--- /dev/null
+++ b/meta-witherspoon/recipes-phosphor/dbus/phosphor-mapper.bbappend
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+MAPPER_SVC = "xyz.openbmc_project.ObjectMapper.service"
+
+MAPPER_DROPIN_DIR = "${MAPPER_SVC}.d"
+
+SYSTEMD_OVERRIDE_${PN} += "mapper-nice.conf:${MAPPER_DROPIN_DIR}/mapper-nice.conf"
diff --git a/meta-witherspoon/recipes-phosphor/dbus/phosphor-mapper/mapper-nice.conf b/meta-witherspoon/recipes-phosphor/dbus/phosphor-mapper/mapper-nice.conf
new file mode 100644
index 0000000..5464cb5
--- /dev/null
+++ b/meta-witherspoon/recipes-phosphor/dbus/phosphor-mapper/mapper-nice.conf
@@ -0,0 +1,2 @@
+[Service]
+Nice=-5
\ No newline at end of file