2013-06-15 08:51:35 +02:00
|
|
|
#
|
|
|
|
# spec file for package numad
|
|
|
|
#
|
2021-10-20 12:13:13 +02:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2013-06-15 08:51:35 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2021-10-20 12:13:13 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-06-15 08:51:35 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: numad
|
2021-10-20 12:13:13 +02:00
|
|
|
URL: http://git.fedorahosted.org/git/numad.git
|
2013-06-15 08:51:35 +02:00
|
|
|
Summary: Userspace daemon that automatically binds workloads to NUMA nodes
|
2021-10-20 12:13:13 +02:00
|
|
|
License: LGPL-2.1-only
|
2013-06-15 08:51:35 +02:00
|
|
|
Group: System/Daemons
|
|
|
|
Version: 0.5.20130522
|
|
|
|
Release: 0
|
|
|
|
Source0: numad-%{version}.tar.bz2
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Patch1: mainline-sysfs-paths.patch
|
|
|
|
Patch2: numad-sbindir.patch
|
|
|
|
Patch3: numad-opensuse-init.patch
|
2017-02-23 11:17:05 +01:00
|
|
|
Patch4: numad-versioning.patch
|
|
|
|
Patch5: numad-rpm-opt-flags.patch
|
|
|
|
Patch6: numad-opensuse-systemd.patch
|
|
|
|
Patch7: numad-systemd-simple-type.patch
|
2021-10-20 12:13:13 +02:00
|
|
|
Patch8: harden_numad.service.patch
|
2013-06-15 08:51:35 +02:00
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
2019-06-12 17:19:41 +02:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2013-06-15 08:51:35 +02:00
|
|
|
%{?systemd_requires}
|
|
|
|
%define has_systemd 1
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
numad is a userspace daemon that monitors NUMA usage and resource usage
|
|
|
|
and attempts to configure workloads using cpusets to use a subset of
|
|
|
|
CPUs and memory nodes to maximise the number local memory access for
|
|
|
|
best performance. Alternatively, it can be used to give hints as to how
|
|
|
|
workloads should be manually bound to CPUs and memory nodes. This daemon
|
|
|
|
is primarily intended for scenarios where there are multiple processes
|
|
|
|
each which fit within a NUMA node. Examples of such configurations are
|
|
|
|
virtual machine instances where each VM is smaller than a NUMA node
|
|
|
|
or running multiple JVMs where each instance fits within a NUMA node.
|
|
|
|
If the workload is one process that spans two or more nodes such as
|
|
|
|
a large database server or a single JVM instance then numad is likely
|
|
|
|
to regress performance.
|
|
|
|
|
|
|
|
%prep
|
2024-03-27 14:15:11 +01:00
|
|
|
%autosetup -p1
|
2013-06-15 08:51:35 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
make OPT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall prefix=$RPM_BUILD_ROOT%{_prefix} install
|
|
|
|
gzip $RPM_BUILD_ROOT%{_mandir}/man8/numad.8
|
|
|
|
%{__install} -D -m 644 numad.conf $RPM_BUILD_ROOT/etc/numad.conf
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
install -D -m 0644 numad.service %{buildroot}%{_unitdir}/numad.service
|
|
|
|
ln -sf ../../usr/sbin/service $RPM_BUILD_ROOT/usr/sbin/rcnumad
|
|
|
|
%endif
|
|
|
|
%if 0%{suse_version} < 1230
|
|
|
|
%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/init.d
|
|
|
|
%{__install} -m 744 numad.init $RPM_BUILD_ROOT%{_sysconfdir}/init.d/numad
|
|
|
|
ln -sf ../../etc/init.d/numad $RPM_BUILD_ROOT/usr/sbin/rcnumad
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sbindir}/numad
|
|
|
|
%{_sbindir}/rcnumad
|
|
|
|
%{_mandir}/man8/numad.8.gz
|
|
|
|
%config /etc/numad.conf
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%{_unitdir}/numad.service
|
|
|
|
%endif
|
|
|
|
%if 0%{suse_version} < 1230
|
|
|
|
%config /etc/init.d/numad
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_add_pre numad.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_del_preun numad.service
|
2017-02-23 11:17:05 +01:00
|
|
|
%else
|
|
|
|
%stop_on_removal numad
|
2013-06-15 08:51:35 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%post
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_add_post numad.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_del_postun numad.service
|
2017-02-23 11:17:05 +01:00
|
|
|
%else
|
|
|
|
%restart_on_update numad
|
|
|
|
%insserv_cleanup
|
2013-06-15 08:51:35 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|