High CPU usage

166 views
Skip to first unread message

Bobby Ess

unread,
Jun 12, 2025, 4:39:14 PM6/12/25
to [PiDP-11]
I apologize in advance for the lengthy post but I want to ensure I provide as much detail as possible.

The short version is that the pidp8i process is consuming ~ 152% of CPU. I'm not sure when this started but there have been no changes to the stock install for several months. I recently opened an SSH session and noticed considerable lag on keyboard input. Upon further investigation I noticed the high CPU usage by the pidp8i process.

Not being able to find anything in the logs concerning errors or other anomalies, I decided to perform a fresh install.

I have a Pi 2 Model B with a 32gb MicroSD card. Using the Pi Imager, I flashed the SD card with the current Pi image, applied all updates and rebooted. I had the unit hardwired ethernet, an HDMI cable for video out, and a USB keyboard and mouse plugged in. After reboot, the pidp8i process settled in nicely at 4.6% (see attached screenshot).

Screenshot 2025-06-11 at 4.09.08 PM.png

I then shut the unit down, disconnected all cables including the network cable, and relocated the unit to a cabinet I use for displaying vintage technology pieces. I attached power and switched the unit on. The pidp8i process was again at ~150%.

I have since done another fresh install, taking one step at a time to find out what the possible culprit could be. On this attempt, I had all cables attached including the network cable and after rebooting, applying all updates, I get the same result. 

Thinking perhaps there was something in the Pi updates that could be throttling the unit, I flashed the card again and did not apply the updates. Same resuilt. See second screenshot.

I don't understand why the first install 'worked' in the sense that the CPU usage was minimal. A duplicate installation process still resulted in the high CPU usage.

Any and all suggestions would be appreciated.

Screenshot 2025-06-12 at 12.06.07 PM.png

Neal G.

unread,
Jun 12, 2025, 6:23:02 PM6/12/25
to [PiDP-11]
Bob, 
I notice vnc is running in the first screenshot but not the second. I can't imagine why this would affect pidp8-sim, but it is a difference to consider.
It might be useful to run ptrace attacing it to the pidp8-sim process. It might point to the routine in the process that is keeping it busy. 
Did you query the PiDP-8 forum?

Just some ideas.
- Neal G.


On Thursday, June 12, 2025 at 3:39:14 PM UTC-5 bob...@gmail.com wrote:
...

sunnybo...@gmail.com

unread,
Jun 12, 2025, 7:51:30 PM6/12/25
to [PiDP-11]
I just recently resurrected my Pi 3 to use as a PiDP11 as well as a Pi 2B+ for the same. A couple of things I noted is that using the Pi imager, it recommended the 32bit Raspian for the Pi 2B+ and recommended the 64bit Raspian for the Pi 3. I went with the recommendation. After booting Raspian, I installed PiDP11 software using the latest manual from Oscar. No issues except I created a user instead of the default "pi" user and that caused a few issues (reported and fixed in another PiDP11 thread) because install.sh has some places hard coded for "/home/pi" instead of whatever user you might have created. Notably the desktop icons were missing but I got that working with help from those here on the forum.

Anyway, I prefer BSD 2.11 on both, and noticed both had the same CPU (about 65%). The 2B+ as expected ran a lot slower than the 3. 

I repurposed the Pi 3 when my MiSTer MT32-Pi hat arrived, so it's now a MIDI synth.

But the 2b+ still is running BSD 2.11 as a PiDP11. I checked today and it's cpu maxes at 70% but that's all. My setup is similar to yours in terms of new setup, new install, 32gig SD card. 

Where I differ is I always run "headless" using VNC, so no keyboard and no HDMI connection at all. I also have an Edimax WIFI dongle plugged in to provide WIFI (the 3 had it built on the motherboard but the 2 never did). I also had to turn off power saving for WIFI but it's been working for several weeks now without any issues, and CPU never grows much above 68%.

Sytse van Slooten

unread,
Jun 12, 2025, 8:22:04 PM6/12/25
to Bobby Ess, [PiDP-11]
simh will use all available cpu capacity that it can for the simulation of the target - unless it has been offered a reason not to.

the only things that will stop it from doing so are
1) if the target OS uses some kind of wait instruction in the target CPU, and that instruction is actually simulated to relinquish the tread of execution of the simulator. simh does so for PDP-11, I'm not sure that something similar exists for PDP-8
2) if you've set up simh to run the target slower than the maximum given the host cpu speed - ie, throttling.

In order, I'd look at throttling, and then at OS-specific things.

On 12 Jun 2025, at 22:39, Bobby Ess <bob...@gmail.com> wrote:

I apologize in advance for the lengthy post but I want to ensure I provide as much detail as possible.

The short version is that the pidp8i process is consuming ~ 152% of CPU. I'm not sure when this started but there have been no changes to the stock install for several months. I recently opened an SSH session and noticed considerable lag on keyboard input. Upon further investigation I noticed the high CPU usage by the pidp8i process.

Not being able to find anything in the logs concerning errors or other anomalies, I decided to perform a fresh install.

I have a Pi 2 Model B with a 32gb MicroSD card. Using the Pi Imager, I flashed the SD card with the current Pi image, applied all updates and rebooted. I had the unit hardwired ethernet, an HDMI cable for video out, and a USB keyboard and mouse plugged in. After reboot, the pidp8i process settled in nicely at 4.6% (see attached screenshot).

<Screenshot 2025-06-11 at 4.09.08 PM.png>

I then shut the unit down, disconnected all cables including the network cable, and relocated the unit to a cabinet I use for displaying vintage technology pieces. I attached power and switched the unit on. The pidp8i process was again at ~150%.

I have since done another fresh install, taking one step at a time to find out what the possible culprit could be. On this attempt, I had all cables attached including the network cable and after rebooting, applying all updates, I get the same result. 

Thinking perhaps there was something in the Pi updates that could be throttling the unit, I flashed the card again and did not apply the updates. Same resuilt. See second screenshot.

I don't understand why the first install 'worked' in the sense that the CPU usage was minimal. A duplicate installation process still resulted in the high CPU usage.

Any and all suggestions would be appreciated.

<Screenshot 2025-06-12 at 12.06.07 PM.png>

--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pidp-11/9cd1372e-f210-4db0-a62a-64f91b958023n%40googlegroups.com.
<Screenshot 2025-06-12 at 12.06.07 PM.png><Screenshot 2025-06-11 at 4.09.08 PM.png>

Henry Bent

unread,
Jun 12, 2025, 8:26:39 PM6/12/25
to Sytse van Slooten, Bobby Ess, [PiDP-11]
Even without "set cpu idle" (which does exist for the PDP-8) nothing should be consuming CPU over 100%.  This has to be something about the interaction between SIMH and the physical lights and switches.

-Henry

Sytse van Slooten

unread,
Jun 12, 2025, 8:42:04 PM6/12/25
to Henry Bent, Bobby Ess, [PiDP-11]
except the lights and switches run from a different process?

if those got into an abnormal state, yes, maybe there could be a scenario.
But that’s not what I understood.

seems way more likely that simh is just simh-ing it’s heart out.
>> <https://groups.google.com/d/msgid/pidp-11/9cd1372e-f210-4db0-a62a-64f91b958023n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> <Screenshot 2025-06-12 at 12.06.07 PM.png><Screenshot 2025-06-11 at
>> 4.09.08 PM.png>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups
>> "[PiDP-11]" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an
>> email to pidp-11+u...@googlegroups.com.
>> To view this discussion visit
>> https://groups.google.com/d/msgid/pidp-11/46E605D1-7A71-4D81-BE5C-F32E8BF9CB6E%40sytse.net
>> <https://groups.google.com/d/msgid/pidp-11/46E605D1-7A71-4D81-BE5C-F32E8BF9CB6E%40sytse.net?utm_medium=email&utm_source=footer>
>> .
>>
>


Johnny Billquist

unread,
Jun 12, 2025, 8:54:25 PM6/12/25
to pid...@googlegroups.com
The PDP-8 do not have anything equivalent to the WAIT instruction.
simh could possibly detect tight loops, and do something smart there,
but otherwise it's basically just running full steam at all times.

OS/8 for example, is usually sitting in a tight loop just waiting for
key presses. OS/8 do not use interrupts anyway, so it's polling I/O.

Johnny
>> <mailto:pidp-11+u...@googlegroups.com>.
>> To view this discussion visit https://groups.google.com/d/msgid/
>> pidp-11/9cd1372e-f210-4db0-a62a-64f91b958023n%40googlegroups.com
>> <https://groups.google.com/d/msgid/pidp-11/9cd1372e-f210-4db0-
>> a62a-64f91b958023n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> <Screenshot 2025-06-12 at 12.06.07 PM.png><Screenshot 2025-06-11 at
>> 4.09.08 PM.png>
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> pidp-11/46E605D1-7A71-4D81-BE5C-F32E8BF9CB6E%40sytse.net <https://
> groups.google.com/d/msgid/pidp-11/46E605D1-7A71-4D81-BE5C-
> F32E8BF9CB6E%40sytse.net?utm_medium=email&utm_source=footer>.

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol

Henry Bent

unread,
Jun 12, 2025, 9:02:15 PM6/12/25
to Sytse van Slooten, Bobby Ess, [PiDP-11]
A normal SIMH is essentially a single-threaded process.  That PDP-8 running full steam without any sort of idle detection will run the cpu at 100%, so that could be that portion of our culprit.  But what is the other 50-something percent?  It has to be something pertaining to features that were added on to the pidp8.  There's no way that async I/O on a PDP-8 is going to ever chew up 50% CPU, even on a low powered ARM.

-Henry

Johnny Billquist

unread,
Jun 12, 2025, 9:23:16 PM6/12/25
to pid...@googlegroups.com
Front panel processing might very well gobble up a lot of CPU time.

Johny
> <mailto:pidp-11%2Bunsu...@googlegroups.com>.
> >> To view this discussion visit
> >> https://groups.google.com/d/msgid/pidp-11/9cd1372e-f210-4db0-
> a62a-64f91b958023n%40googlegroups.com <https://groups.google.com/d/
> msgid/pidp-11/9cd1372e-f210-4db0-a62a-64f91b958023n%40googlegroups.com>
> >> <https://groups.google.com/d/msgid/pidp-11/9cd1372e-f210-4db0-
> a62a-64f91b958023n%40googlegroups.com?
> utm_medium=email&utm_source=footer <https://groups.google.com/d/
> msgid/pidp-11/9cd1372e-f210-4db0-
> a62a-64f91b958023n%40googlegroups.com?
> utm_medium=email&utm_source=footer>>
> >> .
> >> <Screenshot 2025-06-12 at 12.06.07 PM.png><Screenshot 2025-06-11 at
> >> 4.09.08 PM.png>
> >>
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups
> >> "[PiDP-11]" group.
> >> To unsubscribe from this group and stop receiving emails from
> it, send
> >> an
> >> email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11%2Bunsu...@googlegroups.com>.
> >> To view this discussion visit
> >> https://groups.google.com/d/msgid/pidp-11/46E605D1-7A71-4D81-
> BE5C-F32E8BF9CB6E%40sytse.net <https://groups.google.com/d/msgid/
> pidp-11/46E605D1-7A71-4D81-BE5C-F32E8BF9CB6E%40sytse.net>
> >> <https://groups.google.com/d/msgid/pidp-11/46E605D1-7A71-4D81-
> BE5C-F32E8BF9CB6E%40sytse.net?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pidp-11/46E605D1-7A71-4D81-BE5C-
> F32E8BF9CB6E%40sytse.net?utm_medium=email&utm_source=footer>>
> >> .
> >>
> >
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pidp-11/
> CAEdTPBeghNJJ%3D8PkY3ww512%3DDcx3cKPzunfj3t%2BBiokRiL_x6w%40mail.gmail.com <https://groups.google.com/d/msgid/pidp-11/CAEdTPBeghNJJ%3D8PkY3ww512%3DDcx3cKPzunfj3t%2BBiokRiL_x6w%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Henry Bent

unread,
Jun 12, 2025, 9:40:55 PM6/12/25
to Bobby Ess, Sytse van Slooten, Bobby Ess, pid...@googlegroups.com
Can we get the SIMH ini file that's being used for the PDP-8 software in question?

-Henry

On Thu, 12 Jun 2025 at 21:22, Bobby Ess <bobb...@me.com> wrote:
Thanks for everyone’s responses so far. 

The main issue I’m trying to resolve is this: why did a fresh install of the Pi OS and the pidp8i software result in only a 4.6% CPU initially (and sustained for the duration of the session, some forty minutes or so) and the same install after reboot using wireless jump it to 150%, and a repeat of the fresh install on wired Ethernet giving different results than the first fresh install?

Thanks again. 

On Jun 12, 2025, at 8:02 PM, Henry Bent <henry....@gmail.com> wrote:



Bobby Ess

unread,
Jun 13, 2025, 11:35:02 AM6/13/25
to [PiDP-11]
I don't find a simh.ini file -does it go by another name?

Henry Bent

unread,
Jun 13, 2025, 1:45:52 PM6/13/25
to Bobby Ess, [PiDP-11]
It could also be named to match the binary - <binaryname>.ini

-Henry

Bobby Ess

unread,
Jun 13, 2025, 3:22:04 PM6/13/25
to [PiDP-11]
Thanks, Neal. I'll give that a shot. 

Bobby Ess

unread,
Jun 13, 2025, 3:25:27 PM6/13/25
to [PiDP-11]
That was the ticket. When I disabled VNC via raspi-config, CPU for pidp8i dropped to 4.8%. Interestingly, when I re-enabled VNC, CPU stayed stable at 4.8%. Hmm.

On Thursday, June 12, 2025 at 5:23:02 PM UTC-5 Neal G. wrote:

Bobby Ess

unread,
Jun 13, 2025, 3:58:42 PM6/13/25
to [PiDP-11]
Check that. The gremlin is back.

Henry Bent

unread,
Jun 13, 2025, 6:56:30 PM6/13/25
to Bobby Ess, [PiDP-11]
Okay, so that binary has some sort of interaction with X11 perhaps? Time to, as I said, think about how SIMH has been modified.

-Henry

--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.

Mark Williams

unread,
Jun 16, 2025, 1:36:24 AM6/16/25
to [PiDP-11], Mark Williams
Is the source code available for simh? (specifically that tailored for PiPDP11)
cheers,
Mark

Johnny Billquist

unread,
Jun 16, 2025, 6:40:40 AM6/16/25
to pid...@googlegroups.com
Yes. It's in the image for the RPi.

Johnny

On 2025-06-16 07:36, Mark Williams wrote:
> Is the source code available for simh? (specifically that tailoredfor
> PiPDP11)
> cheers,
> Mark
>
> On Sat, Jun 14, 2025 at 8:56 AM Henry Bent <henry....@gmail.com
> <mailto:henry....@gmail.com>> wrote:
>
> Okay, so that binary has some sort of interaction with X11 perhaps?
> Time to, as I said, think about how SIMH has been modified.
>
> -Henry
>
> On Fri, Jun 13, 2025, 15:58 Bobby Ess <bob...@gmail.com
> <mailto:bob...@gmail.com>> wrote:
>
> Check that. The gremlin is back.
>
>
>
> On Friday, June 13, 2025 at 2:25:27 PM UTC-5 Bobby Ess wrote:
>
> That was the ticket. When I disabled VNC via raspi-config,
> CPU for pidp8i dropped to 4.8%. Interestingly, when I re-
> enabled VNC, CPU stayed stable at 4.8%. Hmm.
>
> On Thursday, June 12, 2025 at 5:23:02 PM UTC-5 NealG. wrote:
>
> Bob,
> I notice vnc is running in the first screenshot but not
> the second. I can't imagine why this would affect pidp8-
> sim, but it is a difference to consider.
> It might be useful to run ptrace attacing it to the
> pidp8-sim process. It might point to the routine in the
> process that is keeping it busy.
> Did you query the PiDP-8 forum?
>
> Just some ideas.
> - Neal G.
>
>
> On Thursday, June 12, 2025 at 3:39:14 PM UTC-5
> bob...@gmail.com wrote:
>
> ...
>
>
> I don't understand why the first install 'worked' in
> the sense that the CPU usage was minimal. A
> duplicate installation process still resulted in the
> high CPU usage.
>
> Any and all suggestions would be appreciated.
>
> --
> You received this message because you are subscribed to the
> Google Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> pidp-11/69dccdb8-96b0-4df6-a1f3-a3b8d5b21671n%40googlegroups.com
> <https://groups.google.com/d/msgid/pidp-11/69dccdb8-96b0-4df6-
> a1f3-a3b8d5b21671n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> pidp-11/
> CAEdTPBd27VD8ab32emyK%2BmkqWAWVwzKMzuYEdBkLNuH%2B6uMHYw%40mail.gmail.com <https://groups.google.com/d/msgid/pidp-11/CAEdTPBd27VD8ab32emyK%2BmkqWAWVwzKMzuYEdBkLNuH%2B6uMHYw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pidp-11/
> CAFt1CHGnw-SWgGQvFag1jvxn9Ps4LMyT6w9ROsfDyqiwmZzOKg%40mail.gmail.com
> <https://groups.google.com/d/msgid/pidp-11/CAFt1CHGnw-
> SWgGQvFag1jvxn9Ps4LMyT6w9ROsfDyqiwmZzOKg%40mail.gmail.com?

Clem Cole

unread,
Jun 16, 2025, 11:40:01 AM6/16/25
to Mark Williams, [PiDP-11]
Go to the opensimh.org website and you will find all of the simulators that Oscar bases his work. He adds an all addition (realcons) for the blinkenlights to capture and display everything which runs as external process that uses the GPIO of the RPI.  Note OpenSIMH has many more systems than Oscar has front ends and there run any most modern systems.  The versions running on Linux on the RPI is just a small subset.  In fact, many of us recommend that you learn to use the systems running on your native PC before you add in the RPI and extra indirection/confusion that is can cause if you are you unfamiliar will those operating environments.   It's far easier to run and language the on a Mac than on the PI to begin with.   But suit yourself.

Clem

Reply all
Reply to author
Forward
0 new messages