cifs share mount / cifsmanager delays

Ask questions about DraStic or discuss compatibility issues here.
TkSilver
Posts:576
Joined:Wed Mar 25, 2015 3:30 am
Re: cifs share mount / cifsmanager delays

Post by TkSilver » Sat May 09, 2015 3:57 pm

Q8-V08 wrote:I only have a ancient winxp pentium 4 with intergrated gpu so I probably couldn't run it anyway.
That said my router supports 802.11ac 433Mbps surely that's enough to fully saturate it's usb 2.0 port?
are you saying i'd need a usb 3.0 router with 802.11ac 1300Mbps wireless?
Daggerfall came out before your computer so it will run, but it is beside the point.

You could have the fastest router running the fastest drive over a sata connection and it would not matter at all. What matters is that when you use a networked drive you will introduce lag. Example:

Normal drive operation:
PROGRAM needs file 1 so it calls drive C: and asks for the file.
Drive C: looks up the file's location and then sends the file to the PROGRAM.

Networked drive operation:
PROGRAM needs file 1 so it calls drive N:[mounted network drive] and asks for the file.
Drive manager software looks up network location of drive N: and wirelessly contacts Router 1 to read file 1 from drive N:.
Router 1 needs file 1 so it calls drive U:[USB drive] and asks for the file.
Drive U: looks up the file's location and then sends the file to Router 1.
Router 1 looks up Device 1 amd sends the file over wireless to it.
Drive manager takes file 1 sent from router 1 and makes it available to Drive N:
Drive N: looks up the file's location and then sends the file to the PROGRAM.

That is a very very very simplified explination of the differences between a connected storage solution and a network attached storage solution. Where a normal drive would have a response time in nano seconds the extra software and hardware in the chain means that network drives would have ms response times under the best of times. In a system like android where it uses a just in time compiler due to running on arm processors the situation ia only made more pronounced.

It does not matter how fast you can send data it matters how fast you can access the data.

Exophase
Posts:1716
Joined:Mon Aug 05, 2013 9:08 pm

Re: cifs share mount / cifsmanager delays

Post by Exophase » Sat May 09, 2015 4:19 pm

Exactly as TkSilver said, it really comes down to how latency sensitive something is.

DS games are probably pretty latency sensitive with the gamecard because on a real DS it doesn't have that much latency and there isn't that much RAM to more aggressively preload. So a lot of the time when a game wants new data it's going to want it now. While video streaming is easy to design to be very latency insensitive - see how well it works even over internet connections that have 50+ms of latency.

DraStic loads uncompressed ROMs with mmap, what this means is that the OS will only go and fetch parts of the ROM from storage as they're accessed. So the only prefetching that exists here is what the OS decides to be a good idea (and I don't know what that is), which might not be helpful for how DS games access the data.

If there's any real demand for it we could add an option to try to preload the file into RAM (MAP_POPULATE), assuming that does what I think it does in Android. That would eat all of the cost of loading the ROM upfront instead of gradually during gameplay.

Q8-V08
Posts:22
Joined:Sat Apr 12, 2014 6:29 am

Re: cifs share mount / cifsmanager delays

Post by Q8-V08 » Sun May 10, 2015 6:58 am

I've noticed when the usb 2.0 router share is enabled it ups the -dBm from -45 to 50-60 on my router, i've heard of
usb 3.0 interfering with the 2.4Ghz band but nothing about usb 2.0 with the 5Ghz band.
Is there any app I can use to measure latency between my tablet and router?, something like ping requests.
Edit: nvm I found Ping Free in the play store, what would be a suitable measurement to enter

Number of pings:
Time between pings: lowest setting is 200ms
Packet size:

I tried zipping Bookworm DS without any compression but when I goto play it now complains about it being encrypted, the unzipped .nds runs fine though.

TkSilver
Posts:576
Joined:Wed Mar 25, 2015 3:30 am

Re: cifs share mount / cifsmanager delays

Post by TkSilver » Sun May 10, 2015 6:26 pm

Q8-V08 wrote:Number of pings:
Time between pings: lowest setting is 200ms
Packet size:

I tried zipping Bookworm DS without any compression but when I goto play it now complains about it being encrypted, the unzipped .nds runs fine though.
200ms is part of why you are experiencing load delays. Access to even class 4 micro sd cards is mesured in 0.1-3.0 ms avg 1-2ms and sd card access is slower then internal access. That is a 100x performance hit even if android was setup to take the best advantage of networked storage.

As for the zipped rom a few questions. Does drastic read that zipped rom when it is stored internally? With the compression option on and off? If not, what program are you using to compress it and what options(like read only)?

Q8-V08
Posts:22
Joined:Sat Apr 12, 2014 6:29 am

Re: cifs share mount / cifsmanager delays

Post by Q8-V08 » Sun May 10, 2015 8:33 pm

I used
RAR by win.rar GmbH
made a .zip file with no compression, same result on internal storage, rar and rar4.x both work though :-)
The game icon is completely broken up on the .zip file, whilst .rar and rar4.x show it perfect.
7zip worked too without issue using 7Zipper but again .zip was broken this time showing the drastic ds icon, instead game icon.
Last edited by Q8-V08 on Sun May 10, 2015 8:56 pm, edited 2 times in total.

Lordus
Posts:517
Joined:Mon Aug 05, 2013 9:05 pm

Re: cifs share mount / cifsmanager delays

Post by Lordus » Sun May 10, 2015 8:53 pm

There's a bug at the moment with ZIP files that are not compressed.

Q8-V08
Posts:22
Joined:Sat Apr 12, 2014 6:29 am

Re: cifs share mount / cifsmanager delays

Post by Q8-V08 » Sun May 10, 2015 8:56 pm

It also creates saves based on the archive name instead of the .nds name, noticed this when trying to resume with differently named archives but containing the same named .nds, can I suggest naming saves with the proper gameid straight from the .nds header instead.

Exophase
Posts:1716
Joined:Mon Aug 05, 2013 9:08 pm

Re: cifs share mount / cifsmanager delays

Post by Exophase » Sun May 10, 2015 11:20 pm

Q8-V08 wrote:It also creates saves based on the archive name instead of the .nds name, noticed this when trying to resume with differently named archives but containing the same named .nds, can I suggest naming saves with the proper gameid straight from the .nds header instead.
Can you give a good reason why you think the convention should be changed? That would cause a lot of problems for all the existing files out there.

Basing it on the file name at least gives the user some ability to create different configurations for the same game, even if it means reproducing the file (but this could be mostly mitigated using symlinks). Basing it on the game ID and/or title would require changing that to something else, which would require a lot more work that's inaccessible to most and cause other problems like messing up the save database keying. The way it's done is also how most other emulators I've seen work.

Basing it on the name of the .nds is not as bad, but still requires more work to change it (needing an archive manager or to decompress and recompress the game), and it adds complexity in the way this is handled for benefit that still isn't really clear to me. It's easy enough to just name the archive the same as the .nds file inside.

TkSilver
Posts:576
Joined:Wed Mar 25, 2015 3:30 am

Re: cifs share mount / cifsmanager delays

Post by TkSilver » Sun May 10, 2015 11:54 pm

Q8-V08 wrote:I used
RAR by win.rar GmbH
made a .zip file with no compression, same result on internal storage, rar and rar4.x both work though :-)
The game icon is completely broken up on the .zip file, whilst .rar and rar4.x show it perfect.
7zip worked too without issue using 7Zipper but again .zip was broken this time showing the drastic ds icon, instead game icon.
Excellent if you found a format that worked. Just try it on the cifs drive and hope it still works and you have your solution.

Q8-V08
Posts:22
Joined:Sat Apr 12, 2014 6:29 am

Re: cifs share mount / cifsmanager delays

Post by Q8-V08 » Mon May 11, 2015 5:41 am

Yep works really well.
Benchmarking my storage revealed worse than exspected results though, idk why write speed is so low for my internal storage.
Image

Post Reply