mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2002-10-31, 08:12   #1
bmg9611
 
Oct 2002

38 Posts
Default Affinity on Linux

Is there an ini switch to set affinity for the linux version of mprime?

Thanks,
bmg9611
bmg9611 is offline   Reply With Quote
Old 2002-11-01, 00:58   #2
garo
 
garo's Avatar
 
Aug 2002
Termonfeckin, IE

24×173 Posts
Default

AFAIK there is no way to set affinity in linux OSes for multi-CPU computers. Linux is very good at loadsharing so you should not need to worry about it. Now if you are interested in tweaking priorities.. tat's a different matter.
Garo
garo is offline   Reply With Quote
Old 2002-11-01, 19:42   #3
bmg9611
 
Oct 2002

3 Posts
Default

Hyper-Threading poses a problem since each logical CPU may or may not have full resource capablity. Easiest to understand in an example:

Dual CPU system, each with HT. So /proc/cpuinfo shows 4 processors which may map to:
cpu0 = CPU0-T0 (physical cpu 0, thread 0)
cpu1 = CPU0-T1 (etc)
cpu2 = CPU1-T0
cpu3 = CPU1-T1

I ususally put one instance of mprime per physical proc, so for this system I would have two.

I'm finding that the scheduler will put one instance on cpu2 and the other on cpu3 (or cpu0 and cpu1) thus causing mprime performance to suffer.

There are a few solutions:
1) turn off hyper threading
2) affinitize the mprime processes
3) patch the kernel to better understand loading under HT

I guess I'm left with #1 for now.

bmg9611
bmg9611 is offline   Reply With Quote
Old 2002-11-02, 01:36   #4
garo
 
garo's Avatar
 
Aug 2002
Termonfeckin, IE

24×173 Posts
Default

ah I see! I did not realize that. I would say that the Linux hyperthreading needs to be fixed :D
garo is offline   Reply With Quote
Old 2002-11-04, 21:01   #5
QuintLeo
 
QuintLeo's Avatar
 
Oct 2002
Lost in the hills of Iowa

26·7 Posts
Default

Linux works much BETTER at SMP than Win-stuff does - it doesn't *need* that "affinity" garbage to keep the machine usable when running low-priority CPU-intensive stuff on a multi-CPU machine.

As far as hyper-threading goes - *nobody* outside of Intel and a couple of specific applications supports it well yet - and it appears that for some programs it's going to be a performance LOSER no matter what you do. Not a "LINUX" issue so much as a "new stuff that isn't *officially supported yet* issue".


Remember - Intel has *NOT* yet released a CPU *and chipset* with Hyperthreading enabled yet, except possibly in the Xeon line - the P-IV 3.06 will be the first on the desktop, if not the first *period*, to have official Hyperthreading support - and it's not due out for a couple weeks.
QuintLeo is offline   Reply With Quote
Old 2002-11-04, 21:26   #6
bmg9611
 
Oct 2002

3 Posts
Default I beg to differ

I would argue with you on both accounts:
1) Affinity does matter and has little to do with how good the OS is
2) Intel has had hyperthreaded products in the market for some time.

Affinitizing a process to a particular processor helps with cache coherency. A process that gets periodically migrated from one processor to another costs performance in terms of cache misses, etc. over one stapled to a particular processor. Its also clear that if Linux supported affinity like many other unix flavors, then my problem would be gone. Granted Linux is better than Windows in that it doesn't migrate processes so often (if at all).

The latest Intel Xeon parts have had hyperthreading since the line moved to the P4 core. The Intel e7500 chipset supports HT and is available from numerous mb vendors (SuperMicro server boards are popular). Pentium 4 processors are supposed to have HT enabled in the upcoming 3GHz release. You don't need an app to support HT - it just looks like you have two processors. Performance can hurt, however, if the two instruction streams are trying to use the same chip resources - like two fp intensive apps. With that, you're better off with a DP setup.
bmg9611 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Patch] CPU affinity prompt problem in mprime Linux / OS X build Explorer09 Software 1 2017-03-01 02:34
Set affinity does not work g33py Software 3 2016-07-27 05:26
Processor Affinity R.D. Silverman Programming 19 2015-04-24 22:46
mprime (Linux) doesn't do "affinity" correctly... chalsall Software 16 2014-01-03 15:55
Affinity setting in local.ini PageFault Software 1 2006-09-13 16:39

All times are UTC. The time now is 02:59.


Thu Oct 5 02:59:07 UTC 2023 up 22 days, 41 mins, 0 users, load averages: 1.00, 0.95, 0.92

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔