commit
44ec6bba37
20
generic-release-1.0/performance.sh
Normal file
20
generic-release-1.0/performance.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#/bin/bash
|
||||
#Copyright (c) [2019] Huawei Technologies Co., Ltd.
|
||||
#generic-release is licensed under the Mulan PSL v1.
|
||||
#You can use this software according to the terms and conditions of the Mulan PSL v1.
|
||||
#You may obtain a copy of Mulan PSL v1 at:
|
||||
# http://license.coscl.org.cn/MulanPSL
|
||||
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
||||
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
||||
#PURPOSE.
|
||||
#See the Mulan PSL v1 for more details.
|
||||
|
||||
CPUNO=`cat /proc/cpuinfo|grep processor|wc -l`
|
||||
export GOMP_CPU_AFFINITY=0-$[CPUNO - 1]
|
||||
|
||||
sysctl -w vm.min_free_kbytes=112640 &> /dev/null
|
||||
sysctl -w vm.dirty_ratio=60 &> /dev/null
|
||||
echo never > /sys/kernel/mm/transparent_hugepage/enabled
|
||||
echo never > /sys/kernel/mm/transparent_hugepage/defrag
|
||||
sysctl -w kernel.sched_autogroup_enabled=0 &> /dev/null
|
||||
sysctl -p &> /dev/null
|
||||
@ -68,3 +68,4 @@ then
|
||||
else
|
||||
echo -e "To run a command as administrator(user \"root\"),use \"sudo <command>\"."
|
||||
fi
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
%define dist_release_version 8
|
||||
%define generic_version 1.0
|
||||
%define generic_patch_level %{nil}
|
||||
%define generic_release 24
|
||||
%define generic_release 26
|
||||
%define builtin_release_version 1.0
|
||||
|
||||
%define current_arch %{_arch}
|
||||
@ -33,6 +33,15 @@ Requires: %{product_family}-repos
|
||||
%description
|
||||
%{product_family} release files
|
||||
|
||||
%package -n openEuler-performance
|
||||
Requires: coreutils systemd setup
|
||||
|
||||
Summary:performance script
|
||||
%description -n openEuler-performance
|
||||
performance script
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n generic-release-%{builtin_release_version}
|
||||
|
||||
@ -58,6 +67,7 @@ EOF
|
||||
|
||||
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/profile.d
|
||||
cp -a system-info.sh $RPM_BUILD_ROOT/etc/profile.d/
|
||||
cp -a performance.sh $RPM_BUILD_ROOT/etc/profile.d/
|
||||
|
||||
# write cpe to /etc/system/release-cpe
|
||||
echo "cpe:/o:%{product_family}:%{product_family}:%{version}:ga:server" > $RPM_BUILD_ROOT/etc/system-release-cpe
|
||||
@ -100,6 +110,8 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
/etc/system-release
|
||||
@ -116,7 +128,15 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/var/lib/supportinfo
|
||||
/usr/share/eula/eula.*
|
||||
|
||||
%files -n openEuler-performance
|
||||
%defattr(0644,root,root,0755)
|
||||
/etc/profile.d/performance.sh
|
||||
|
||||
%changelog
|
||||
* Fri Mar 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.0-25
|
||||
- add performance script,close transparent_hugepage,change vm.min_free_kbytes=112640,export GOMP_CPU_AFFINITY
|
||||
- close autogroup
|
||||
|
||||
* Tue Mar 3 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.0-24
|
||||
- remove unnecessary swap file
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user