Re: hw.ncpu=1, hw.ncpuonline=1, hw.ncpufound=4
Thank you I was not aware of the security issues of hw.smt. Fortunately, things are fast enough without it, and I'm setting up a true multicore AMD system soon. On my hypothesis about CPU usage competition, I was using "interrupt" in the sense that doesn't involve computers. For example, suppose that I first run something that outputs its processing as it processes, like nmh scan(1) or playing music with mpv(1). Second, in the middle, I run something that uses the filesystem a lot, like a borg(1) backup. The first thing's output will stop for a moment while the second thing runs. Best salutations, Ipsen
Re: hw.ncpu=1, hw.ncpuonline=1, hw.ncpufound=4
On Mon, May 27, 2019 at 6:18 PM Ipsen S Ripsbusker < ips...@ripsbusker.no.eu.org> wrote: > Aaron Mason writes: > > Looks to me like you're not running bsd.mp. A dmesg would clear this > up. > > Indeed I was not running bsd.mp. I switched to bsd.mp, and then 2 of 4 > CPUs were online. Then I set "sysctl hw.smt = 1" to get all 4 online. > This is a side-point, but you do understand that those extra 2 aren't full CPUs, they're just the cardboard mockups that Intel sold you, and that if you run any untrusted code (including javascript in a web-browser) that those fake CPUs leak data across process boundaries, right? > Otto Moerbeek writes: > > On Sun, Apr 07, 2019 at 01:54:35PM +, Ipsen S Ripsbusker wrote: > > > ... > > > Also, now that I have realized this, I have a theory about a related > > > issue, and I would like to know how I can debug it. I am using softraid > > > CRYPTO, and I have found that accessing the disk with one process will > > > interrupt the other processes accessing the disk. Now I wonder this > > > happens because the sole core must switch encryption/decription > > > processes for the different files. How could I determine whether this > is > > > indeed happening? > Can you explain in more detail what you were observing when you said "found that accessing the disk with one process will interrupt the other processes accessing the disk"? The word 'interrupt' is overloaded in computing and what you saw may be a real problem with device support, or it may be completely innocuous, something which you should be ignoring. Philip Guenther
Re: hw.ncpu=1, hw.ncpuonline=1, hw.ncpufound=4
Aaron Mason writes: > Looks to me like you're not running bsd.mp. A dmesg would clear this up. Indeed I was not running bsd.mp. I switched to bsd.mp, and then 2 of 4 CPUs were online. Then I set "sysctl hw.smt = 1" to get all 4 online. Otto Moerbeek writes: > On Sun, Apr 07, 2019 at 01:54:35PM +, Ipsen S Ripsbusker wrote: > > ... > > Also, now that I have realized this, I have a theory about a related > > issue, and I would like to know how I can debug it. I am using softraid > > CRYPTO, and I have found that accessing the disk with one process will > > interrupt the other processes accessing the disk. Now I wonder this > > happens because the sole core must switch encryption/decription > > processes for the different files. How could I determine whether this is > > indeed happening? > > ... > > This type of question *requires* a dmesg. > > -Otto The interruptions continued after I started using 2 CPUs, and they seem to have stopped now that I have 4 CPUs. I am still curious for real debugging though. Thanks $ dmesg OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 16845565952 (16065MB) avail mem = 16325763072 (15569MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xbae9c000 (69 entries) bios0: vendor LENOVO version "G4ETA7WW (2.67 )" date 08/24/2016 bios0: LENOVO 2392ASU acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP SLIC TCPA SSDT SSDT SSDT HPET APIC MCFG ECDT FPDT ASF! UEFI UEFI MSDM SSDT SSDT UEFI DBG2 acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP3(S4) XHCI(S3) EHC1(S3) EHC2(S3) HDEF(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, 2893.95 MHz, 06-3a-09 cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN cpu0: 256KB 64b/line 8-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, 2893.43 MHz, 06-3a-09 cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 1, core 0, package 0 cpu2 at mainbus0: apid 2 (application processor) cpu2: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, 2893.43 MHz, 06-3a-09 cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN cpu2: 256KB 64b/line 8-way L2 cache cpu2: smt 0, core 1, package 0 cpu3 at mainbus0: apid 3 (application processor) cpu3: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, 2893.43 MHz, 06-3a-09 cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN cpu3: 256KB 64b/line 8-way L2 cache cpu3: smt 1, core 1, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins acpimcfg0 at acpi0 acpimcfg0: addr 0xf800, bus 0-63 acpiec0 at acpi0 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (PEG_) acpiprt2 at acpi0: bus 2 (EXP1) acpiprt3 at acpi0: bus 3 (EXP2) acpiprt4 at acpi0: bus 4 (EXP3) acpicpu0 at acpi0: C2(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: C2(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS acpicpu2 at acpi0: C2(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS acpicpu3 at acpi0: C2(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1, EHC2 acpitz0 at acpi0: critical temperature is 103 degC acpibtn0 at acpi0: LID_ acpibtn1 at acpi0: SLPB acpicmos0 at acpi0 tpm0 at acpi0: TPM_ addr 0xfed4/0x5000:
Re: hw.ncpu=1, hw.ncpuonline=1, hw.ncpufound=4
Looks to me like you're not running bsd.mp. A dmesg would clear this up. On Mon, Apr 8, 2019 at 2:19 AM Otto Moerbeek wrote: > > On Sun, Apr 07, 2019 at 01:54:35PM +, Ipsen S Ripsbusker wrote: > > > My hw.ncpu and hw.ncpuonline are less than my hw.ncpufound. > > I tried setting hw.smt, but that alone was apparently not enough. > > What should I do if I want to use all 4 CPUs? > > > > Also, now that I have realized this, I have a theory about a related > > issue, and I would like to know how I can debug it. I am using softraid > > CRYPTO, and I have found that accessing the disk with one process will > > interrupt the other processes accessing the disk. Now I wonder this > > happens because the sole core must switch encryption/decription > > processes for the different files. How could I determine whether this is > > indeed happening? > > > > More hardware information follows. It is a ThinkPad T530 with > > two SSDs and two corresponding softraid CRYPTO disks. > > This type of question *requires* a dmesg. > > -Otto > > > > > $ sysctl hw > > hw.machine=amd64 > > hw.model=Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz > > hw.ncpu=1 > > hw.byteorder=1234 > > hw.pagesize=4096 > > hw.disknames=sd0:c4ae9aa6707fe6a0,sd1:10319ae393cc594d,sd2:72b7961f3a883f2a,sd3:9067e68ce463822c > > hw.diskcount=4 > > hw.sensors.cpu0.temp0=44.00 degC > > hw.sensors.acpitz0.temp0=47.00 degC (zone temperature) > > hw.sensors.acpibtn0.indicator0=On (lid open) > > hw.sensors.acpibat0.volt0=11.10 VDC (voltage) > > hw.sensors.acpibat0.volt1=12.11 VDC (current voltage) > > hw.sensors.acpibat0.power0=0.00 W (rate) > > hw.sensors.acpibat0.watthour0=28.20 Wh (last full capacity) > > hw.sensors.acpibat0.watthour1=1.41 Wh (warning capacity) > > hw.sensors.acpibat0.watthour2=0.20 Wh (low capacity) > > hw.sensors.acpibat0.watthour3=28.20 Wh (remaining capacity), OK > > hw.sensors.acpibat0.watthour4=73.26 Wh (design capacity) > > hw.sensors.acpibat0.raw0=0 (battery full), OK > > hw.sensors.acpiac0.indicator0=On (power supply) > > hw.sensors.acpithinkpad0.temp0=47.00 degC > > hw.sensors.acpithinkpad0.temp1=47.00 degC > > hw.sensors.acpithinkpad0.temp2=47.00 degC > > hw.sensors.acpithinkpad0.temp3=47.00 degC > > hw.sensors.acpithinkpad0.temp4=47.00 degC > > hw.sensors.acpithinkpad0.temp5=47.00 degC > > hw.sensors.acpithinkpad0.temp6=47.00 degC > > hw.sensors.acpithinkpad0.temp7=47.00 degC > > hw.sensors.acpithinkpad0.fan0=2121 RPM > > hw.sensors.acpithinkpad0.indicator0=Off (port replicator), UNKNOWN > > hw.sensors.softraid0.drive0=online (sd3), OK > > hw.cpuspeed=2901 > > hw.setperf=100 > > hw.vendor=LENOVO > > hw.product=2392ASU > > hw.version=ThinkPad T530 > > hw.serialno=PK2X772 > > hw.uuid=81c1c6e7-7653-cb11-b4d1-97bd37f8963e > > hw.physmem=16845565952 > > hw.usermem=16811044864 > > hw.ncpufound=4 > > hw.allowpowerdown=1 > > hw.perfpolicy=auto > > hw.smt=1 > > hw.ncpuonline=1 > > > -- Aaron Mason - Programmer, open source addict I've taken my software vows - for beta or for worse
Re: hw.ncpu=1, hw.ncpuonline=1, hw.ncpufound=4
On Sun, Apr 07, 2019 at 01:54:35PM +, Ipsen S Ripsbusker wrote: > My hw.ncpu and hw.ncpuonline are less than my hw.ncpufound. > I tried setting hw.smt, but that alone was apparently not enough. > What should I do if I want to use all 4 CPUs? > > Also, now that I have realized this, I have a theory about a related > issue, and I would like to know how I can debug it. I am using softraid > CRYPTO, and I have found that accessing the disk with one process will > interrupt the other processes accessing the disk. Now I wonder this > happens because the sole core must switch encryption/decription > processes for the different files. How could I determine whether this is > indeed happening? > > More hardware information follows. It is a ThinkPad T530 with > two SSDs and two corresponding softraid CRYPTO disks. This type of question *requires* a dmesg. -Otto > > $ sysctl hw > hw.machine=amd64 > hw.model=Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz > hw.ncpu=1 > hw.byteorder=1234 > hw.pagesize=4096 > hw.disknames=sd0:c4ae9aa6707fe6a0,sd1:10319ae393cc594d,sd2:72b7961f3a883f2a,sd3:9067e68ce463822c > hw.diskcount=4 > hw.sensors.cpu0.temp0=44.00 degC > hw.sensors.acpitz0.temp0=47.00 degC (zone temperature) > hw.sensors.acpibtn0.indicator0=On (lid open) > hw.sensors.acpibat0.volt0=11.10 VDC (voltage) > hw.sensors.acpibat0.volt1=12.11 VDC (current voltage) > hw.sensors.acpibat0.power0=0.00 W (rate) > hw.sensors.acpibat0.watthour0=28.20 Wh (last full capacity) > hw.sensors.acpibat0.watthour1=1.41 Wh (warning capacity) > hw.sensors.acpibat0.watthour2=0.20 Wh (low capacity) > hw.sensors.acpibat0.watthour3=28.20 Wh (remaining capacity), OK > hw.sensors.acpibat0.watthour4=73.26 Wh (design capacity) > hw.sensors.acpibat0.raw0=0 (battery full), OK > hw.sensors.acpiac0.indicator0=On (power supply) > hw.sensors.acpithinkpad0.temp0=47.00 degC > hw.sensors.acpithinkpad0.temp1=47.00 degC > hw.sensors.acpithinkpad0.temp2=47.00 degC > hw.sensors.acpithinkpad0.temp3=47.00 degC > hw.sensors.acpithinkpad0.temp4=47.00 degC > hw.sensors.acpithinkpad0.temp5=47.00 degC > hw.sensors.acpithinkpad0.temp6=47.00 degC > hw.sensors.acpithinkpad0.temp7=47.00 degC > hw.sensors.acpithinkpad0.fan0=2121 RPM > hw.sensors.acpithinkpad0.indicator0=Off (port replicator), UNKNOWN > hw.sensors.softraid0.drive0=online (sd3), OK > hw.cpuspeed=2901 > hw.setperf=100 > hw.vendor=LENOVO > hw.product=2392ASU > hw.version=ThinkPad T530 > hw.serialno=PK2X772 > hw.uuid=81c1c6e7-7653-cb11-b4d1-97bd37f8963e > hw.physmem=16845565952 > hw.usermem=16811044864 > hw.ncpufound=4 > hw.allowpowerdown=1 > hw.perfpolicy=auto > hw.smt=1 > hw.ncpuonline=1 >
hw.ncpu=1, hw.ncpuonline=1, hw.ncpufound=4
My hw.ncpu and hw.ncpuonline are less than my hw.ncpufound. I tried setting hw.smt, but that alone was apparently not enough. What should I do if I want to use all 4 CPUs? Also, now that I have realized this, I have a theory about a related issue, and I would like to know how I can debug it. I am using softraid CRYPTO, and I have found that accessing the disk with one process will interrupt the other processes accessing the disk. Now I wonder this happens because the sole core must switch encryption/decription processes for the different files. How could I determine whether this is indeed happening? More hardware information follows. It is a ThinkPad T530 with two SSDs and two corresponding softraid CRYPTO disks. $ sysctl hw hw.machine=amd64 hw.model=Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz hw.ncpu=1 hw.byteorder=1234 hw.pagesize=4096 hw.disknames=sd0:c4ae9aa6707fe6a0,sd1:10319ae393cc594d,sd2:72b7961f3a883f2a,sd3:9067e68ce463822c hw.diskcount=4 hw.sensors.cpu0.temp0=44.00 degC hw.sensors.acpitz0.temp0=47.00 degC (zone temperature) hw.sensors.acpibtn0.indicator0=On (lid open) hw.sensors.acpibat0.volt0=11.10 VDC (voltage) hw.sensors.acpibat0.volt1=12.11 VDC (current voltage) hw.sensors.acpibat0.power0=0.00 W (rate) hw.sensors.acpibat0.watthour0=28.20 Wh (last full capacity) hw.sensors.acpibat0.watthour1=1.41 Wh (warning capacity) hw.sensors.acpibat0.watthour2=0.20 Wh (low capacity) hw.sensors.acpibat0.watthour3=28.20 Wh (remaining capacity), OK hw.sensors.acpibat0.watthour4=73.26 Wh (design capacity) hw.sensors.acpibat0.raw0=0 (battery full), OK hw.sensors.acpiac0.indicator0=On (power supply) hw.sensors.acpithinkpad0.temp0=47.00 degC hw.sensors.acpithinkpad0.temp1=47.00 degC hw.sensors.acpithinkpad0.temp2=47.00 degC hw.sensors.acpithinkpad0.temp3=47.00 degC hw.sensors.acpithinkpad0.temp4=47.00 degC hw.sensors.acpithinkpad0.temp5=47.00 degC hw.sensors.acpithinkpad0.temp6=47.00 degC hw.sensors.acpithinkpad0.temp7=47.00 degC hw.sensors.acpithinkpad0.fan0=2121 RPM hw.sensors.acpithinkpad0.indicator0=Off (port replicator), UNKNOWN hw.sensors.softraid0.drive0=online (sd3), OK hw.cpuspeed=2901 hw.setperf=100 hw.vendor=LENOVO hw.product=2392ASU hw.version=ThinkPad T530 hw.serialno=PK2X772 hw.uuid=81c1c6e7-7653-cb11-b4d1-97bd37f8963e hw.physmem=16845565952 hw.usermem=16811044864 hw.ncpufound=4 hw.allowpowerdown=1 hw.perfpolicy=auto hw.smt=1 hw.ncpuonline=1