LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-17-2017, 01:23 PM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Rep: Reputation: Disabled
CentOS7: Unable to persistently set kernel parameter


This is for learning only on CentOS7.
Code:
I have edited config file for 
1) cat /etc/sysctl.d/01-swappiness.conf		#I named this file.
	vm.swappiness = 31
2) cat /etc/sysctl.conf				#default config
	vm.swappiness = 35

#At reboot time, I have this resuly.
#Original kernel parameter value is vm.swappiness=30
# sysctl  vm.swappiness
vm.swappiness = 30

#Notice above, the vm.swappiness is not from 
/etc/sysctl.d/01-swappiness.conf	 
or 
/etc/sysctl.conf

#But at runtime, I am able to load the sysctl config file:
# sysctl -p /etc/sysctl.d/01-swappiness.conf                                             
vm.swappiness = 31

#Check result
# sysctl  vm.swappiness                                                                  
vm.swappiness = 31

#I am able to load the default sysctl config file:                                                               
# sysctl -p /etc/sysctl.conf 
vm.swappiness = 35

#Check result
# sysctl  vm.swappiness
vm.swappiness = 35
So what is overriding the custom settings in
/etc/sysctl.conf and /etc/sysctl.d/01-swappiness.conf ?
 
Old 03-17-2017, 05:18 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
It is being configured by tuned

https://www.centos.org/forums/viewtopic.php?t=55678
https://wiki.mikejung.biz/CentOS_7
 
1 members found this post helpful.
Old 03-17-2017, 05:26 PM   #3
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to set SELinux context in CentOS7 fanoflq Linux - Newbie 5 12-21-2016 03:41 PM
[SOLVED] [Centos7] Unable to run firewall-config schedar Linux - Newbie 6 10-18-2016 05:40 AM
CentOs7: Unable to remount after unmount... fanoflq Linux - Newbie 1 05-26-2016 08:15 AM
How to set up back up on CentOS7 hosting plan AdultFoundry Linux - Server 4 12-17-2015 08:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration