MightyPirates / OpenComputers

Home of the OpenComputers mod for Minecraft.
https://oc.cil.li
Other
1.59k stars 431 forks source link

Extremely low performance in plan9k #3537

Closed fixinit75 closed 2 years ago

fixinit75 commented 2 years ago

When I try to use any application, the interface works very slow. The same application works in OpenOS just fine. Edit.lua and shell are extremely laggy as well. Here's the video demonstraion:

https://user-images.githubusercontent.com/78933401/179356253-eb0bbf51-5345-48f4-b57c-928ca254de8d.mp4

And now in OpenOS:

https://user-images.githubusercontent.com/78933401/179356365-b06e78a5-77ef-4c2c-84b7-70171a2fa586.mp4

brisingraerowing commented 2 years ago

Plan9k hasn't been updated for 6 years, and appears to be effectively abandoned.

fixinit75 commented 2 years ago

I can't switch to OpenOS as Plan9k has separated kernel space and user space, it's unsafe to use programs like reactor control interface in OpenOS, where kernel space is not separated, so I really need Plan9k to work faster. I've tried to figure out what's wrong myself, but I don't see any issues with the code, and I am not actually a good lua coder, so I can't do anything with it.

brisingraerowing commented 2 years ago

What hardware did you put into the computer? (In Game)

fixinit75 commented 2 years ago

This particular one has 2 1.5 level RAM sticks, 1 hdd, a 1st level cpu and a 3rd level video card. Also tested on the server with 3rd level everything except for RAM. There are 4 sticks of the magical memory from... computronics I think. But I see no difference in performance. Can record video with this server

th3impasta commented 2 years ago

i recommend just maxing out every part, and maybe asking the server owner for the config file for oc and computronics so you can see the stats of parts

fixinit75 commented 2 years ago

Everything is already maxed out, but this doesn't really help. Since I am server owner, I have access to the config file, but I can say that it's unchanged.

th3impasta commented 2 years ago

ok. can u send me link to the program making the lag aswell as the mod list (and if possible i would like to join your server)

th3impasta commented 2 years ago

also, can you tell me what Plan9K distro u are using

th3impasta commented 2 years ago

also, are you running off an hdd or a floppy

fixinit75 commented 2 years ago

I am running from an hdd, using Plan9k full distro installed from a flopy. The attached screenshot shows the list of mods I use. And sadly, no opportunity to join my server as I had to relocate it to the home PC, where I have an additional NAT set up by my ISP after my router.

fixinit75 commented 2 years ago

Forgot about the screenshot XD image

fixinit75 commented 2 years ago

And here is the reactor code: https://pastebin.com/nAHaGmm6

brisingraerowing commented 2 years ago

Try using one of the recent dev builds from the Actions tab (make sure it's for 1.12.2)

fixinit75 commented 2 years ago

Only found one made 2 months ago It's OpenComputers-MC1.12.2-0.0.0+b823414 Will try it now

Update: image

brisingraerowing commented 2 years ago

Hm. The version replacement stuff seems to be broken. Well then. @asiekierka is the 0.0.0 intended?

asiekierka commented 2 years ago

I wouldn't say it is, no...

payonel commented 2 years ago

@fixinit75 plan9k has some extremely clever pipe code that manages all io in the system. but it is also extremely inefficient for a lua runtime to handle. There won't be any fixes/improvements to plan9k

If you need safeguards on your scripts, use pcall/xpcall -- if you're using scripts that break the system env, you can sandbox your env.