hi nick
I found a issue, when the hugepage=1G on my system, the stressapptest will fail to start.
I checked the code for stressapptest and found that it was calculated in OsLayer::FindFreeMemSize() by Assume hugepage=2M。
thanks
Below is a detail log:
#stressapptest -s 86400 -W
2019/03/29-19:18:18(CST) Log: Commandline - ./src/stressapptest -s 86400 -W
2019/03/29-19:18:18(CST) Stats: SAT revision 1.0.9_autoconf, 64 bit binary
2019/03/29-19:18:18(CST) Log: root @ kvm_9_16_47_105 on Fri Mar 29 19:17:45 CST 2019 from open source release
2019/03/29-19:18:18(CST) Log: 1 nodes, 80 cpus.
2019/03/29-19:18:18(CST) Log: Defaulting to 80 copy threads
2019/03/29-19:18:18(CST) Log: Total 772004 MB. Free 677051 MB. Hugepages 100 MB. Targeting 100 MB (0%)
2019/03/29-19:18:18(CST) Log: Prefer using hugepage allocation.
2019/03/29-19:18:18(CST) Log: Using shared hugepage object 0x102a0032 at 0x2aaac0000000.
2019/03/29-19:18:18(CST) Stats: Starting SAT, 100M, 86400 seconds
2019/03/29-19:18:18(CST) Process Error: freepages < neededpages.
2019/03/29-19:18:18(CST) Stats: Total: 100, Needed: 80, Marked free: 40
2019/03/29-19:18:18(CST) Process Error: Initialize Pages failed
2019/03/29-19:18:18(CST) Process Error: Sat::Initialize() failed
2019/03/29-19:18:18(CST)
2019/03/29-19:18:18(CST) Status: FAIL - test encountered procedural errors
2019/03/29-19:18:18(CST)
2019/03/29-19:18:18(CST) Process Error: Fatal issue encountered. See above logs for details.
#cat /proc/meminfo
MemTotal: 790532556 kB
MemFree: 693281824 kB
MemAvailable: 733498712 kB
Buffers: 653100 kB
Cached: 39227068 kB
SwapCached: 0 kB
Active: 29910840 kB
Inactive: 10325392 kB
Active(anon): 371172 kB
Inactive(anon): 25796 kB
Active(file): 29539668 kB
Inactive(file): 10299596 kB
Unevictable: 13840 kB
Mlocked: 13840 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 4652 kB
Writeback: 0 kB
AnonPages: 367888 kB
Mapped: 112556 kB
Shmem: 37040 kB
Slab: 1996912 kB
SReclaimable: 1705424 kB
SUnreclaim: 291488 kB
KernelStack: 17136 kB
PageTables: 11756 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 369051876 kB
Committed_AS: 1341252 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 1973980 kB
VmallocChunk: 33954721788 kB
HardwareCorrupted: 0 kB
AnonHugePages: 151552 kB
HugePages_Total: 50
HugePages_Free: 40
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 1048576 kB ==> hugepage = 1G
DirectMap4k: 391744 kB
DirectMap2M: 7735296 kB
DirectMap1G: 797966336 kB
#lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 80
On-line CPU(s) list: 0-79
Thread(s) per core: 2
Core(s) per socket: 20
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
Stepping: 4
CPU MHz: 2401.000
BogoMIPS: 4806.33
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 1024K
L3 cache: 28160K
NUMA node0 CPU(s): 0-19,40-59
NUMA node1 CPU(s): 20-39,60-79