LinuxQuestions.org
Visit Jeremy's Blog.
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 12-28-2019, 10:35 AM   #1
Bala123
LQ Newbie
 
Registered: Sep 2017
Posts: 17

Rep: Reputation: Disabled
How to disable multi threading in redhat linux hosted in AWS?


Hi Team,

How to disable multi threading in redhat linux 7 which is hosted in aws?

I followed the below blog, but no luck.Could you please help with this.

https://www.golinuxhub.com/2018/01/h...ble-hyper.html

Thanks,
Bala
 
Old 12-28-2019, 10:49 AM   #2
wdtr2005
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
In AWS, you have virtual servers. The servers are pieces of cpu, or a cpu usually. Multi threading enables a process to run code at the same time. I do not see why you would want to go single thread. It would be like asking for a text screen that only shows 1 line of text. Why do you want to disable it? I think aws mini/micro is 1 cpu, and during the server build determines how many cpus you get.
 
Old 12-28-2019, 12:11 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Bala123 View Post
Hi Team,

How to disable multi threading in redhat linux 7 which is hosted in aws?

I followed the below blog, but no luck.Could you please help with this.

https://www.golinuxhub.com/2018/01/h...ble-hyper.html

Thanks,
Bala
"no luck" doesn't tell us what didn't work for you.
If you're using RHEL, you should use RedHat support for help.

Please expand on "no luck"
 
Old 12-28-2019, 12:22 PM   #4
Bala123
LQ Newbie
 
Registered: Sep 2017
Posts: 17

Original Poster
Rep: Reputation: Disabled
Hi,

I have 16 CPU's with 8 cores running 2 threads each. Now i would like to have my system to have 8 CPU where each core use only 1 thread.

I disabled it, but after rebooting the server, the changes are not reflecting.Need some help in making the changes permanent?

echo 0 > /sys/devices/system/cpu/cpu8/online
echo 0 > /sys/devices/system/cpu/cpu9/online
echo 0 > /sys/devices/system/cpu/cpu10/online
echo 0 > /sys/devices/system/cpu/cpu11/online
echo 0 > /sys/devices/system/cpu/cpu12/online
echo 0 > /sys/devices/system/cpu/cpu13/online
echo 0 > /sys/devices/system/cpu/cpu14/online
echo 0 > /sys/devices/system/cpu/cpu15/online

Thanks,
Bala

Last edited by Bala123; 12-28-2019 at 12:24 PM.
 
Old 12-28-2019, 01:05 PM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
In the link you posted there is a section "Disable HT permanently"
What there do you need help with?
 
1 members found this post helpful.
Old 12-28-2019, 01:17 PM   #6
Bala123
LQ Newbie
 
Registered: Sep 2017
Posts: 17

Original Poster
Rep: Reputation: Disabled
That did not worked actually... Hence started a thread here.
 
Old 12-28-2019, 01:22 PM   #7
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Bala123 View Post
That did not worked actually... Hence started a thread here.
Again, what did not work? What did you actually try?
 
Old 12-28-2019, 01:33 PM   #8
Bala123
LQ Newbie
 
Registered: Sep 2017
Posts: 17

Original Poster
Rep: Reputation: Disabled
I followed exactly what was mentioned in the blog.. Made the changes in grub file and ran grub2-mkconfig command.. After that rebooted the server, whatever changes I made was vanished.. System was using 16 CPUs again
 
Old 12-28-2019, 01:36 PM   #9
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Bala123 View Post
I followed exactly what was mentioned in the blog.. Made the changes in grub file and ran grub2-mkconfig command.. After that rebooted the server, whatever changes I made was vanished.. System was using 16 CPUs again
There is this:
Quote:
IMPORTANT NOTE: In some cases the hyper threading is controlled via the BIOS of the hardware so you must also disable HT in the BIOS, disabling alone from the OS will not work
emphasis added...

I'm guessing you don't have access to the BIOS on that VPS...is that correct?
 
Old 12-28-2019, 01:48 PM   #10
Bala123
LQ Newbie
 
Registered: Sep 2017
Posts: 17

Original Poster
Rep: Reputation: Disabled
Yes, I dont have access nor I don't know how to do it. it is hosted in aws(virtual server).I just have root access

So how to make this change permanently?

Last edited by Bala123; 12-28-2019 at 02:02 PM.
 
Old 12-28-2019, 01:54 PM   #11
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Bala123 View Post
Yes, I dont have access. it is hosted in aws(virtual server).I just have root access

So how to make this change permanently?
If it's controlled in the BIOS, and you don't have access to the BIOS, you can't make it permanent, per the "IMPORTANT NOTE" from those instructions.

Perhaps you need to write a script to implement it at boot time.

But as wondered about in #2, why do you even want to disable it?
 
1 members found this post helpful.
Old 12-28-2019, 02:01 PM   #12
Bala123
LQ Newbie
 
Registered: Sep 2017
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thanks for all ur time to spend on this. If I find a way to disable it permanently, will let u know.. For time being my client want multi threading to be disabled in the server. Will let you know in brief once I get to know abt it.. Thanks again.
 
Old 12-28-2019, 02:36 PM   #13
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,818

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Bala123 View Post
For time being my client want multi threading to be disabled in the server.
Why would they want this? I'm guessing it's the client's reaction to the security problems that have made the headlines where Intel and AMD chips (if I understand the problem) can allow parallel threads to peek into parts of the CPU that other threads are running on and, somehow, obtain data they shouldn't be able to see. I thought Red Hat and others had mitigated that problem with kernel patches.
 
1 members found this post helpful.
Old 12-28-2019, 03:03 PM   #14
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by rnturn View Post
Why would they want this? I'm guessing it's the client's reaction to the security problems that have made the headlines where Intel and AMD chips (if I understand the problem) can allow parallel threads to peek into parts of the CPU that other threads are running on and, somehow, obtain data they shouldn't be able to see. I thought Red Hat and others had mitigated that problem with kernel patches.
Could be, in which case the OP (or the client) should contact Red Hat support, as previously suggested, to determine if the solution they seek is even necessary.
 
Old 01-01-2020, 11:53 PM   #15
Bala123
LQ Newbie
 
Registered: Sep 2017
Posts: 17

Original Poster
Rep: Reputation: Disabled
Hi All,

Performance is better when we disable multi threading,hence client wants to disable it.

Followed the below steps to disable multi-threading in RHEL7.

1. Add the nr_cpus=N parameter to the “GRUB_CMDLINE_LINUX” line in “/etc/sysconfig/grub”
2. Run grub2-mkconfig -o /boot/grub2/grub.cfg
3. Reboot the server.

Thanks,
Bala
 
  


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
LXer: Amazon spins Ubuntu-driven AWS DeepLens cam and an AWS-savvy Amazon FreeRTOS LXer Syndicated Linux News 0 12-04-2017 03:51 PM
LXer: List of 71 AWS services and their use! AWS cloud terminology! LXer Syndicated Linux News 0 03-17-2017 02:35 PM
Move Slackware guest from a Slackware hosted Virtualbox to Windows hosted Virtualbox? damgar Slackware 1 08-07-2012 11:28 PM
multi threading slower than single threading on dual core. why? nebojsa.andjelkovic Programming 13 01-30-2007 09:56 PM
problems about multi-threading and/or multi-processing with tcp network in java ... alred Programming 5 06-23-2006 03:21 PM

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

All times are GMT -5. The time now is 01:51 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