What's the point of the cores check below? And how to deal with big.LITTLE CPUs?
@james-mcsherry arbeitet bereits daran.
Seit 18.4.2024.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
We use this Library in JDK 8 on one dedicated server whose CPU is Intel i5-13500 and this CPU uses big.LITTLE architecture. It has 6 Performance cores(which implements HyperThread Technology and can be thought as two cores) and 8 Efficient cores. That is, the total of logic cores is 6*2 + 8 = 20 and the total of logic cores is 6+8=14.
If we use CPUAffinity to bind CPU core, we will have one exception which tells that the cores do not match: "java.lang.AssertionError: cpuDetails.size= 20 != sockets: 1 * coresPerSocket: 14 * threadsPerCore: 2"
I think it is due to this line: https://github.com/OpenHFT/Java-Thread-Affinity/blame/9a9148f9f5073cb4c8ff4a59804d3f7c74d84ce2/affinity/src/main/java/net/openhft/affinity/impl/VanillaCpuLayout.java#L55
Maybe the threadspercore should not multiple all the cores.
What's the point of this check and how to deal with this exception?
Refers:
Exception in thread "Thread-5" java.lang.NoClassDefFoundError: Could not initialize class net.openhft.affinity.AffinityLock
at .core.utils.AffinityThreadFactory.getAffinityLockSync(AffinityThreadFactory.java:75)
at .core.utils.AffinityThreadFactory.executePinned(AffinityThreadFactory.java:54)
at .core.utils.AffinityThreadFactory.lambda$newThread$0(AffinityThreadFactory.java:48)
at java.lang.Thread.run(Thread.java:748)
Exception in thread "Thread-3" java.lang.AssertionError: cpuDetails.size= 20 != sockets: 1 * coresPerSocket: 14 * threadsPerCore: 2
CpuInfo{socketId=0, coreId=0, threadId=0}
CpuInfo{socketId=0, coreId=0, threadId=1}
CpuInfo{socketId=0, coreId=4, threadId=0}
CpuInfo{socketId=0, coreId=4, threadId=1}
CpuInfo{socketId=0, coreId=8, threadId=0}
CpuInfo{socketId=0, coreId=8, threadId=1}
CpuInfo{socketId=0, coreId=12, threadId=0}
CpuInfo{socketId=0, coreId=12, threadId=1}
CpuInfo{socketId=0, coreId=16, threadId=0}
CpuInfo{socketId=0, coreId=16, threadId=1}
CpuInfo{socketId=0, coreId=20, threadId=0}
CpuInfo{socketId=0, coreId=20, threadId=1}
CpuInfo{socketId=0, coreId=24, threadId=0}
CpuInfo{socketId=0, coreId=25, threadId=0}
CpuInfo{socketId=0, coreId=26, threadId=0}
CpuInfo{socketId=0, coreId=27, threadId=0}
CpuInfo{socketId=0, coreId=28, threadId=0}
CpuInfo{socketId=0, coreId=29, threadId=0}
CpuInfo{socketId=0, coreId=30, threadId=0}
CpuInfo{socketId=0, coreId=31, threadId=0}
at net.openhft.affinity.impl.VanillaCpuLayout.<init>(VanillaCpuLayout.java:63)
at net.openhft.affinity.impl.VanillaCpuLayout.fromCpuInfo(VanillaCpuLayout.java:142)
at net.openhft.affinity.impl.VanillaCpuLayout.fromCpuInfo(VanillaCpuLayout.java:100)
at net.openhft.affinity.impl.VanillaCpuLayout.fromCpuInfo(VanillaCpuLayout.java:95)
at net.openhft.affinity.AffinityLock.<clinit>(AffinityLock.java:56)
lscpu:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 20
On-line CPU(s) list: 0-19
Vendor ID: GenuineIntel
BIOS Vendor ID: Intel(R) Corporation
Model name: 13th Gen Intel(R) Core(TM) i5-13500
BIOS Model name: 13th Gen Intel(R) Core(TM) i5-13500 To Be Filled By O.E.M. CPU @ 2.4GHz
BIOS CPU family: 205
CPU family: 6
Model: 191
Thread(s) per core: 2
Core(s) per socket: 14
Socket(s): 1
Stepping: 2
CPU(s) scaling MHz: 20%
CPU max MHz: 4800.0000
CPU min MHz: 800.0000
BogoMIPS: 4992.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl
xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave a
vx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx
smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi umip pku ospke waitpkg gfni vaes vpclmulqdq tm
e rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities
Virtualization features:
Virtualization: VT-x
Caches (sum of all):
L1d: 544 KiB (14 instances)
L1i: 704 KiB (14 instances)
L2: 11.5 MiB (8 instances)
L3: 24 MiB (1 instance)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-19
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Srbds: Not affected
Tsx async abort: Not affected
- Vorherrschende Sprache
- Java
- Sterne
- 1.9k
- Forks
- 367
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus OpenHFT/Java-Thread-Affinity
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
OpenHFT/Java-Thread-Affinity#203 · 1 Kommentar ·
-
Document releases Offen
OpenHFT/Java-Thread-Affinity#186 · 1 zugewiesene Person ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
OpenHFT/Java-Thread-Affinity#137 ·
-
OpenHFT/Java-Thread-Affinity#117 · 8 Kommentare · 1 zugewiesene Person ·
-
OpenHFT/Java-Thread-Affinity#115 · 1 Kommentar · 1 zugewiesene Person ·
Alle Issues in OpenHFT/Java-Thread-Affinity
Ähnliche Issues
-
certification
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 80/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Offenbug ecr
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Needs: Triage Type: Feature request
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
github/copilot-sdk#2760 ·