#Blind user, trying to find out what is wrong with setup, causing Unity Editor to run poorly

160 messages · Page 1 of 1 (latest)

tacit sentinel
#

@tawdry schooner here is a support thread i made for you

tawdry schooner
#

thanks ❤️

tacit sentinel
#

@tawdry schooner no problem

tawdry schooner
#

Unfortunately I can't reveal specifics of the game I'm working on due to an NDA, but.... the game itself runs fine. It's so weird

#

Given the constant random "Importing..." dialogs as I work on the game, and the fact that most of the freezing happens when it's reading/writing assets, I wanna say it's a disk IO issue

#

at first I thought I was just running out of available RAM because it felt like that kind of intermittent freezing you get when you don't have swap space

#

...I set this system up with a 2GB swap partition though so it's at the very least not that

#

I even went overkill and dd if=/dev/zero of=/swapfile bs=1G count=96 and set THAT up as even MORE swap space

#

so... I'm faitly certain none of the freezing is caused by running out of memory

#

I'm just trying to think of what else it could be

#

I also notice that Rider has a bit more trouble searching the project for files than it does on Windows, but it's not like Rider is freezing

tawdry schooner
#

Now running the zen kernel to see if it does anything helpful for Unity

#

Nope. Even just creating a directory inside Unity was enough to make it hang for a while

#

It's not the game itself that's the issue

#

it's navigating the Unity Editor

#

The game itself isn't even running most of the time

#

rtx 3060ti

#

proprietary drivers and xorg

#

KDE because it's the only desktop environment my blindness lets me use

#

REALLY wish I was on gnome but that also breaks Unity even more

#

very, very severe vision problems

#

I was born with a rare form of retinitis pigmentosa, I've since been treated as of March of this year

#

but

#

my best eye is still very bad, visual acuity of 20/500

#

and my right eye is even worse, and I have dead cells in some memrane I forgot the name of that sits between the pupil and retina so

#

I basically can only read with one eye

#

and there's just a hell of a lot of problems with my sight in general that I just kinda have to live with

#

The worst of it though, and the part that limits me using a PC, is the nystagmus...my eyes constantly shake involuntarilyand I have to concentrate extremely hard to keep them still

#

I'm just thinking that maybe I'm missing some crucial system setup optimization because....well I don't have access to the Arch Wiki until well into me having my system installed

#

and even then it takes hours to read some of the articles because I'm doing it through TTS

#

What I know is that it's a constant problem

#

from the moment I start the editor

#

as soon as I start doing anything that involves hitting the filesystem for any reason

#

it chugs

#

once I'm in Restitched and actually doing things in-game though, it's fine

#

The game itself doesn't hit the disk a lot

#

I switched to the zen kernel to see if it would improve latency/performance so I'm using nvidia-dkms

#

Also the game's on unity 2021.3.23f1 LTS, and upgrading engine versions isn't an option since I'd need to get the entire team to upgrade with me

#

Nope, that's not my RAM 😛

#

that's the size of my swap space

#

well, I have two swap spaces and that's the size of one of them

#

physical RAM: 64 GB (4x16GB DDR4 3200MHz)
swap 1: 2GB
swap 2: 96 GB

#

swap 2 was created as a troubleshooting step

#

Hardware-wise there's no reason I should be having any performance issues in anything I do

#

I'ma have to disagree with you on that one...every system that can have swap space should have swap space

#

the kernel's memory manager relies on it being there

#

and in fact I've observed performance issues related specifically to NOT having any swap space

#

hmm, yeah, switching kernels made no difference

#

but, eh, being on the zen kernel shouldn't hurt anything and it's what I usually use anyway

#

I just...for whatever reason didn't this time around

#

I am heavily questioning the "don't use swap space"

#

I may not know a lot about the kernel (who does)

#

but I do know its memory manager kinda

#

needs swap space

#

Yeah, but I was having these exact same performance issues when only having 2GB of swap

elder mason
#

But swap is not generally about getting emergency memory

tawdry schooner
#

Yeah but what a lot of people forget is that it's not just running out of RAM that causes issues

#

it's running out of contiguous free space

elder mason
#

It is mainly for swapping out anonymous pages

tawdry schooner
#

if an app tries to allocate 2 GB of memory and there's only room for 1.9 GB worth of contiguous free space, and there's no swap space, the kernel will freak out

#

and even with 64 GB of RAM in my system I've run into that

#

it causes the exact same sort of slowdowns and freezing I'm having in Unity, but...all over the system

#

The question is, should I be matching the amount of RAM I have?

elder mason
tawdry schooner
#

I wouldn't know

#

I just figured that more is better as long as you're willing to sacrifice disk space for it, and that if the system needs it, it'll use it

elder mason
#

Yes, since kernel 4.0+, a larger swap should not cause overzealous swapping on a modern kernel.

tawdry schooner
#

particularly on an SSD where you're not waiting for a disk to physically move to where your swap space is

elder mason
#

atop can log which applications are swapping pages.

tawdry schooner
#

right?

elder mason
tawdry schooner
#

But it's not now, correct?

#

yay -S unityhub

#

Anyway, both swap spaces have been turned off and I'm resizing the 96 GB one down to 64 GB, matching my system RAM

#

It has not done anything to improve Unity

#

Only difference now is I have a 2GB partition that needs to be deleted

#

and can't be

#

yes

#

Restitched has been in development for half a decade and it's an entire team working on it. We can't affrd to scrap the work because of my personal system having problems

#

Any of my own personal projects either use Unreal or a custom engine

#

Unreal for large projects

#

custom engine for boredom stuff

#

because Unreal is what I'm familiar navigating through while blind

#

I'm not learning anything else, Unity or Unreal are what I'll use if I need to use something existing

#

I am the lead dev :)

#

Restitched is the first (and will likely be the only) 3D game I ever develop

#

when it comes to personal stuff, I stick to 2D and even then

#

my current personal project could literally be written as a linux distro

#

doing anything visual is...challenging for me

#

so I stick to games that can be made entirely text-based or through UI

#

Restitched is an exception because it's my dream game, I grew up with LBP and it's what got me into gamedev, and we have dedicated artists to do the stuff I can't

#

And the reason I'm on Linux is because Windows causes its own problems for me accessibility-wise

#

Sometimes dealing with operating systems makes me want to just give up game development altogether because I just

#

can't get things that work the way I need them to

#

The beauty of open-source means that you can write things yourself and contribute back to upstream. But I'm not an operating system developer. I'm not a desktop environment developer. I can barely even read to begin with.

#

Which is why I'm not ready to give up on this Unity perf issue just yet

#

given that the freezing happens mostly when modifying assets/browsing the assets browser

#

I really wanna believe that it's related to disk throughput, filesystem overhead, or potentially even memory management

#

I don't know where to begin with troubleshooting though

#

Nothing on the arch wiki specific to Unity related to what I'm running into

tawdry schooner
#

@tacit sentinel @elder mason Some updates:

#

disabling access time on both my NVMe partitions in /etc/fstab improved overall system performance slightly, particularly loading into Rider and Unity seems noticeably faster

#

I also added some kernel parameters that seemed to improve things slightly

#

vm.vfs_cache_pressure=50 tsc=reliable clocksource=tsc

elder mason
elfin patrolBOT
#

acidiclight received a thank you cookie!

tawdry schooner
#

It did not outright fix the issue I'm having

#

just...improved things slightly

#

Unity's still hanging a lot

#

One REALLY noticeable improvement though is, when the unity editor first starts up, there's a good few seconds where it just renders x11 garbage into the window

#

that's now gone

#

that being said, an issue I've noticed is

#

I don't reboot my system often so didn't notice it until I started rebooting to apply new kernel params

#

every few boots....my computer forgets how to uh

#

how to boot

#

like, I get to grub, and I get far into the boot process, and then it just stops

#

and there's some unreadable message that keeps getting printed every time I hit enter

#

I can't read it because it's a 4K screen and the font is way too small

#

what I wouldn't do to tell the kernel and grub to render the efi framebuffer at 640x480

#

so I can

#

USE IT

#

Because if I could read what that error/message is when it happens, I could troubleshoot it

#

either way I'm through 1/4th of a marijuana-infused grape drink

#

so

#

you shouldn't operate heavy machinery while under the influence of weed, and I consider /etc/default/grub and the kernel parameter list to BE heavy machinery

#

I'ma stop for the night

zenith hatch
tawdry schooner
#

Ext4

zenith hatch
#

hmm it shouldn't cause problems

#

you can use dmesg or journalctl to see if there's some helpful error while running unity, post it here as a file, something like this:
journalctl | tail -20 > log.txt

tawdry schooner
#

I'll have to try in the morning

#

Though I wonder if it might be more efficient to have someone ssh into my system or something and they can watch the logs with functioning eyes while I do things that cause unity to hang

tawdry schooner
#

Alrighty. The saga continues

tawdry schooner
#

at least I can't correlate anything with the Unity hanging

zenith hatch
tawdry schooner
#

it's not that it doesn't show anything, I just don't know what to look for

#

and due to my blindness I can't really...skim

zenith hatch
#

like journalctl | tail -100 > log.txt

tawdry schooner
#

Yeah but how do I know it has anything useful in it without just sending the file and praying

#

Maybe there's something useful in here but I'm not sure

tawdry schooner
#

@zenith hatch Stunning revelation!!

#

Turns out

#

the Unity Editor runs

#

perfectly fine

#

IF I DON'T HAVE THE RIDER DEBUGGER attached

#

Is there anything in the log above that would suggest anything that'd affect the debugger's performance?

zenith hatch
#

some process is getting stuck

#

c.i.e.p.BaseOSProcessHandler - Process hasn't generated any output for a long time.

#

I don't know what unity is using

#

have you or any of your coworkers modified something in the debugger?

#

maybe a plugin is missing or something

tawdry schooner
#

I'm the only person on the team who uses Linux and I haven't fucked with anything in Rider

tawdry schooner
zenith hatch
tawdry schooner
#

Well I appreciate ya trying