Thread: Linux memory help View Single Post
 2021-09-24, 03:53 #1 Prime95 P90 years forever!     Aug 2002 Yeehaw, FL 3·13·197 Posts Linux memory help I'm running prime95 on a very basic Linux install. Ubuntu 14 or 16, no GUI, nothing much running but prime95. I'm trying to understand the random "Killed" problem during stage 2. Machine has 8GB memory, 5.5GB for mprime. Top shows this: Code: Tasks: 118 total, 1 running, 117 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.0 us, 0.2 sy, 99.7 ni, 0.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 7860544 total, 169252 free, 7455956 used, 235336 buff/cache KiB Swap: 0 total, 0 free, 0 used. 93612 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 23137 george 30 10 6803204 6.004g 3828 S 398.3 80.1 2662:36 mprime307 Question 1: It seems I have no swapfile (makes sense as there is no hard disk, only an NFS mount). So why does VIRT (virtual memory?) show 6.8GB and RES (resident memory?) show 6GB. Question 2: The above works OK. But if I let mprime use 6GB, VIRT goes up to almost 7GB and RES goes up to about 6.1GB. This configuration usually works. With OutputIterations set pretty low, I get output at a fairly constant 129 sec. Sometimes though mprime gets slow (200+ sec.). To me this looks like thrashing, but how can that be without a swapfile? Perhaps a system process running and the memory marked cache is converted to free memory which then gets reloaded after the system process completes? Question 3: Mprime (and prime95) does not let the user input too large a value for memory to use. We do not want naive users (like me??) inputting a value that is apt to cause thrashing. One can always edit local.txt to put in larger values. The current formula allows up to 90% of system memory (7.2GB in my case -- clearly too much). What would be a better formula? Perhaps reserving 10% of system memory or 2.5GB whichever is larger??? Suggestions welcome. P.S. The above was in 30.7 which has a bug where it sometimes allocates more memory than necessary. The working set obeys the memory limit but peak memory usage is higher than it needs to be. I'm working on a fix and can update these "top" numbers when fixed. Last fiddled with by Prime95 on 2021-09-24 at 03:56