Storage I/O (Input Output) Issues? Freezing for 2-5 seconds
-
Hello all,
I've been trying to diagnose an issue for a while. My RetroPie setup would occasionally pause/lag/freeze for 2-5 seconds when scrolling through menus. It was never terrible, but I couldn't figure out why it would happen randomly.
Old school games.. SNES, NES, GB, MAME, etc.. all work fine. When I run any newer 3D games I have some issues though.
Just so you know what I'm working with:
- Raspberry Pi 3
- SanDisk Ultra 64GB microSDXC UHS-I Card
- https://www.amazon.com/gp/product/B010Q588D4/
- CanaKit 5V 2.5A Raspberry Pi 3 Power Supply
- https://www.amazon.com/gp/product/B00MARDJZ4/
Anyways, whenever I run a PSP game through lr-ppsspp or a PSX game through lr-pcsx-rearmed I get momentary freezes during videos. Nothing that I would think is too intense.
I've talked on reddit a bit about the problem.
https://www.reddit.com/r/raspberry_pi/comments/4poikc/raspberry_pi_3_pausingfreezing_for_23_second/I've discovered that the input output seems to have an issue. I'm trying to resolve it now.
Using the top command you can see the "wa" (waiting for I/O) is very high.
http://i.imgur.com/eo61Xyk.pngSomeone in the raspbian IRC channel suggested using the iotop command. I captured this when the box paused for a few seconds during an intro video:
http://i.imgur.com/zj9j068.pngRight before freezing, the average read speed seems to be about 150-350 K/s. I don't believe that would impact the card I have.
Any thoughts on helping me resolve this?
Thanks!
-Oen
-
Well I'm not going to try and sound like an expert here but keep this in mind:
if the pausing happens during browsing it would seem data access is a problem.
SNES/NES/ETC games get loaded into RAM (afaik) and after the initial loading the pauses should be minimal to non-existant.
With PSX/PSP the data is read from the source at a regular interval which seems to be the main problem.
Asides from formatting your SD, do you have any comparable sources at your disposal? A smaller SD (Class 10 minimum) to compare results to eliminate any other hardware problems (mostly Power Supply)?
-
First, thanks for the response!
I've tried another Raspberry Pi 3 with the same image and had the same results, but it was ordered at the same time. Maybe a bad batch?
I've tried a USB cell phone charger I used with my RPi 2, never received any power warnings, same result.
I assumed this ruled out the Pi and the power supply.
My SD card appears fine during a read/write test. Unless these numbers should be much higher?
524288000 bytes (524 MB) copied, 60.3312 s, 8.7 MB/s
524288000 bytes (524 MB) copied, 37.8325 s, 13.9 MB/sI think a SD card I tried running RetroPie 3.7, that was on BerryBoot, ran better. I do not have that with me currently for testing unfortunately. The parts I'm testing with now I thought originally were having issues with BerryBoot. You can't apply the newest firmware, so I assumed that was causing some issues with the RPi3.
I have formatted the card a few times, with just the RetroPie 3.8.1 and 4.0 Beta 2 (no BerryBoot). Even with fresh install it still has issues.
It seems like three I/O processes are triggering at about the same time, which are shown in the screenshots, cause it to hiccup. Though honestly I'm shooting in the dark, and this is the most recent discovery I've made researching my ongoing issue.
Tomorrow I'll build a RPi2 and a RPi3, and test both again. Could it be bad PSX firmware? That wouldn't impact PSP though, right? :/
-
Well the "stuttering" with PSP games has been mentioned in other posts and is a "known issue", also how to possibly fix it.
I have all my roms on a rather cheap 32gb USB stick, including PS1 titles and they run fine, so something else is going on.
Sorry I cannot help you further.
-
the stuttering issue in psp is fixed. update ppsspp from binaries. if that doesn't work, update it from source.
-
also, don't use lr-ppsspp, use the standalone version. standalone is default for a reason!
-
the standalone version is not default - the libretro core is (due automatic controller mapping). The stuttering should be improved in the lr-ppsspp also (but it's an older codebase and isn't as compatible)
-
@BuZz oh, whoops! the lr- version will have the freezing issue then. that core seems fairly dead - no updates since 2015. that said, standalone isn't amazing on the pi3 (other than not freezing!)
-
@dankcushions I updated our fork of the libretro version with the fix after I updated ppsspp recently
-
@ShootHere said in Storage I/O (Input Output) Issues? Freezing for 2-5 seconds:
I have all my roms on a rather cheap 32gb USB stick, including PS1 titles and they run fine, so something else is going on.
Should I put all my PS1 and PSP games on a USB drive them to keep this from happening?
@BuZz said in Storage I/O (Input Output) Issues? Freezing for 2-5 seconds:
@dankcushions I updated our fork of the libretro version with the fix after I updated ppsspp recently
If I am using 4.0 Beta 2 (which is currently loaded), should that have the fix? Or should I update now from binary or source?
Thank you again everyone for the responses!
Edit: Two things to add. Maybe it could help identify if there is an issue.
The PSX game is Final Fantasy IX CD 1 version 1.1, launching from a .CUE with a .BIN file. The PSP game is Kingdom Hearts Birth By Sleep, it's an .ISO. Both have issues just playing back their video intros, which why I thought there might be a bigger issue.
-
Small update.
Installing ppsspp from binary, after updating the retropie-setup script, led it to freeze right after the title screen, when it shows the various companies involved. I updated lr-ppsspp from the binary source, and still experienced the same stuttering.
-
This post is deleted! -
@Oen Well as far as USB sticks go I think SD might be faster. It is fine for PS1 which sort of expects data to get supplied at a lower rate but PSP might want the best speed possible which would be SD or eternal HDD/SSD.
I remember trying to launch a game or two off a USB stick and just they wouldn't even launch (did not extensively try this so it might have been the games themselves) hahaha.
Luckily USB sticks are rather cheap (even the better ones) so trying that might be an easy and cheap experiment. Even if just for parking all other roms on there (which saves quite a few GBs!)
-
I'm back with results.
First one thing to note. I am using analog audio out for these tests.
Here is the short version:
Do not buy a SDSQUNC-064G-GN6MA.For my testing today I used all new parts, fresh out of the boxes.
-
I setup a RPi3 with a 64GB SDXC card (SDSQUNC-064G-GN6MA). It ran PSX with a bunch of stuttering.
-
Then I ran a RPi2 setup with a 32GB SDHC card (SDSQUNC-032G-GN6MA). It had 1 hiccup for half a second, but otherwise nice and smooth.
My initial reaction was it must be a RPi3 issue, as this new one with a new card (same model) had the same issues. Then I decided to test the RPi3 with the 32GB SDHC card. It was just as smooth as the RPi2, with the one hiccup around the same point.
All I can figure is that the SDSQUNC-064G-GN6MA can not perform read/writes sequentially or maybe as fast as the SDSQUNC-032G-GN6MA model. Honestly I had no issues with any of the 2D games, as they were loaded in RAM as mentioned above. I have to decide if it is worth replacing those cards. The issue I see, with less room, I won't be putting my PSX games on the SD card. Between the multiple consoles and arcade games, it is pretty maxed out.
Thank you everyone for the suggestions. If you have any further suggestions for testing, or drivers I should update that might resolve this. Please let me know!
Otherwise, do not buy the SDSQUNC-064G-GN6MA model card. Two of them failed to work properly with two different Raspberry Pi 3's.
Edit: I will test the RPi2 with the 64 SDXC card, just to try to further determine if it is a driver issue or something with the RPi3 and that card, or just the card won't perform.
Also I will upload videos so you can see the issues I've been dealing with.
-
-
Here are the videos of my results from earlier:
This is running the Final Fantasy IX v1.1. Fresh install of 4.0 beta 2 from retropie.org.uk, with no additional updates applied.
-
Sorry for posting again. One last quick update.
Wanting to suffer a little more, I tried the RPi2 with the 64GB SDXC card. I received the same issues I've seen with the RPi3 and that card model. It was roughly the same results as shown in the second video above (lots of stuttering).
So once again...
Do not buy a SDSQUNC-064G-GN6MA
Thanks again for all the help guys, sorry it was just a hardware issue on my end.
-
if you still want large storage, you might want to try USB sticks. i get fine I/O performance on psx/ppsspp on an old USB stick
-
Yep! Just tested with a small 2GB USB drive, and it worked fine. Now I have to pick up a large USB drive. :)
I guess my suggestion to others would be to buy a smaller SD card, and put most of the ROMs/ISOs on the USB drive.
-
@Oen Glad to see you fixed your issue. Such things can be maddening to figure out, especially if you spent quite a bit of money on buying "good materials".
I personally use a very cheap SANDISK 32GB (it cost me like €8) and just dumped all my roms on there. I have not tried PSP myself but PS1 and below run just fine.Hope you get to enjoy your classics now! You can even consider trying the enhanced resolution options for PS1. makes some games look amazing and I notice barely any slowdown.
-
I do have one more question. Is there a list of which emulators load the game into RAM, and which load on the fly from the storage media? That way I know what needs to be on the USB drive.
Thanks!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.