Gkiokan / ps4-remote-pkg-sender

264 stars 23 forks source link

High memory usage and cpu usage #22

Closed janisslsm closed 2 years ago

janisslsm commented 2 years ago

Sometimes the app fails to launch but a process in the background is left which for some reason has high memory usage. I'm on windows 10 x64 and using the portable version v2.4.2 image

I just noticed v2.5.2 beta was released so I will try seeing if I can get the same problem with that

janisslsm commented 2 years ago

I tried v2.5.2 and so far I've managed to get it with CPU this time image

I can't see to get the high memory usage anymore but I am able to get high cpu usage often

Gkiokan commented 2 years ago

Oh yea I forgot that. In some cases Windows leaves the server running instead kill it once the App is closed.
Will fix that so it will force the server to close.

However just have in mind that the App also provides a Server for the ps4 with all that data you have in your PKG list.
If this makes trouble we can dig in deeper to optimize it further.

janisslsm commented 2 years ago

Alright. I just don't get that memory or CPU usage normally unless the app glitches out and doesn't open.

Gkiokan commented 2 years ago

There is one thing to note. If you use the portable version on windows it actually extracts the content to temp folder and reads all the time from it. That may cause some cpu issues as windows is known for his high cpu usage on read processes.

The same happend to me back on my windows times when windows tried to permanently to download updates. Having an SSD kills this issue but still, microsoft is very special in such cases.

Just to verify. Could you try the unpacked version within the *-win.zip file, too?

janisslsm commented 2 years ago

Will give it a try in a bit!

janisslsm commented 2 years ago

Unpacked version doesn't have that issue. It always opens and has no issues

Gkiokan commented 2 years ago

Well then it has to do with the temp handling of windows. I guess you still haven an HDD then?

janisslsm commented 2 years ago

No, I'm on a SSD

Gkiokan commented 2 years ago

Can you compare your cpu usage now? Mac is kinda special with the application folders but here are my usages.

image

janisslsm commented 2 years ago

image It jumps somewhere between 0% to 2.4%

janisslsm commented 2 years ago

I'm sending a package right now and getting 5-10% usage

janisslsm commented 2 years ago

image

Gkiokan commented 2 years ago

That is pretty fair as the server needs to read your PKG file and serve it to the PS4.

Interesting. So the issue for the portable is just the temp handler of windows. I will take a look into that.
I would suggest you to use the unpacked version then if you have still cpu usage problems on the portable one.

I am not sure how to configure windows (as I left windows years ago) to optimize it. But I can remember some optimization stuff back on windows7 where you could setup priority on hdd or ram .... not sure about that but something like that was available on my windows times.

janisslsm commented 2 years ago

Alright. I'll use the unpacked version for now. The portable version works fine but sometimes it fails to open and ends up using lots of CPU. I can kill the process but it gets annoying when it happens often.

Gkiokan commented 2 years ago

Unfortunatelly this is how windows handels portable versions when it puts all the executable data into the memory + temp folder.
I guess portable one is more suites for pc's with a bit more power on the back.

janisslsm commented 2 years ago

What counts as more powerful? I wouldn't say my PC is low end.

Gkiokan commented 2 years ago

My Mac is not an comparable candidate but I have an i7 2,6GHz with 16GB of RAM that works well.
However Windows again is performing different on the same hardware.

I will try to benchmark the portable version once the updates for 2.6 are done and I am testing it on my lenovo i5 ... 5th gen? dunno.

janisslsm commented 2 years ago

Alright. I'm on a Ryzen 5 2600 with 16GB x 2 of RAM (32GB total) so it shouldn't be a bottleneck

Gkiokan commented 2 years ago

You are right. You are on a stable base. cpu comparision

Then it is based on Windows. I will take a look and try my best to get the best out of it for windows.
Most fixes since release was only for windows lol.