Slow load from network map ?

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Slow load from network map ?

Postby chmichael » 2008-9-15 @ 17:27

Hello,
I map a network drive on windows, let's say x: -> \\server\share
Then i load dosbox and mount the map drive to a dosbox drive,
eg -> mount x: x:\

Now, everything on the X drive is slow ... even doing a dir causes a small 2 to 3 sec delay ...

Any ideas where to look in the source code to try fix this ?

Thank you
Last edited by chmichael on 2008-9-24 @ 01:00, edited 1 time in total.
chmichael
Newbie
 
Posts: 17
Joined: 2008-4-19 @ 15:53

Re: Slow load from network map ?

Postby DosFreak » 2008-9-15 @ 17:37

IIRC, dates and file sizes are not cached in DOSBox....and you really shouldn't be using DOSBox with mapped drives anyway.

Use a VM if you want to run your old DOS apps with mapped drives.
Game Acronym List
DosBox CVS Builds
DosBox Feature Request Thread
DosBox FAQ
PC Game Compatibility List
"Who's got time to read all the way down to the bottom of an email?"
User avatar
DosFreak
l33t++
 
Posts: 9540
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: Slow load from network map ?

Postby chmichael » 2008-9-15 @ 18:02

The problem is that the application is using VESA modes which none VM i tried worked.
chmichael
Newbie
 
Posts: 17
Joined: 2008-4-19 @ 15:53

Re: Slow load from network map ?

Postby wd » 2008-9-15 @ 18:30

How many files/directory are in the share? Try to reduce the number.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Slow load from network map ?

Postby chmichael » 2008-9-15 @ 18:43

around 1000 ... but can anyone suggest what can i do in code in order to improve this ? eg, with 10 files it's fast ...

Thank you
chmichael
Newbie
 
Posts: 17
Joined: 2008-4-19 @ 15:53

Re: Slow load from network map ?

Postby wd » 2008-9-15 @ 19:01

Well depends, if you got some dos app that needs 1000 files in the subdirectory
you're out of luck with a games-emulator over network obviously. Otherwise
copy the relevant stuff into a subdirectory and mount that.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Slow load from network map ?

Postby chmichael » 2008-9-15 @ 20:39

After digging i found that the bottleneck is on the algorithm of the drive_cache.cpp ...

Anyone made improvements on this ?

Thank you
chmichael
Newbie
 
Posts: 17
Joined: 2008-4-19 @ 15:53

Re: Slow load from network map ?

Postby wd » 2008-9-15 @ 22:02

Nope.
I think Qbix was playing with it, but feel free to post more information about
it (maybe you can identify the routines that are slow, must be something that
actually accesses the remote data, not the caching algorithms themselves).
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Slow load from network map ?

Postby ADDiCT » 2008-9-16 @ 04:18

and you really shouldn't be using DOSBox with mapped drives anyway.
C'mon, it's 2008, you know... (; Having lots of data on network drives (NAS's, File Servers, etc.) isn't that uncommon anymore. I've also noticed that DOSBox is a bit slow on mapped drives, but until now that wasn't a real issue. 1000 files in a directory is not "normal" usage, though - i don't think any game has that many files in a single dir.
User avatar
ADDiCT
Oldbie
 
Posts: 1170
Joined: 2007-2-02 @ 15:07
Location: Retroland

Re: Slow load from network map ?

Postby Qbix » 2008-9-16 @ 06:40

yeah I played with it. The algorithms itself are fast enough, but i think the attempts to get information on each file might be slow
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10448
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Slow load from network map ?

Postby DosFreak » 2008-9-16 @ 06:56

ADDiCT wrote:
and you really shouldn't be using DOSBox with mapped drives anyway.
C'mon, it's 2008, you know... (; Having lots of data on network drives (NAS's, File Servers, etc.) isn't that uncommon anymore. I've also noticed that DOSBox is a bit slow on mapped drives, but until now that wasn't a real issue. 1000 files in a directory is not "normal" usage, though - i don't think any game has that many files in a single dir.



Yeah, it's 2008.....so why are we still using NETBIOS to map drives?

But the main reason not to use them with DOSBox is that the amount of DOS games that need mapped drives can probably be counted on one hand. The only one I'm aware of is nlsnipes.
Game Acronym List
DosBox CVS Builds
DosBox Feature Request Thread
DosBox FAQ
PC Game Compatibility List
"Who's got time to read all the way down to the bottom of an email?"
User avatar
DosFreak
l33t++
 
Posts: 9540
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: Slow load from network map ?

Postby chmichael » 2008-9-16 @ 13:06

Qbix,
Could you please tell me where in the code is the slow part ?

Thank you very much!
chmichael
Newbie
 
Posts: 17
Joined: 2008-4-19 @ 15:53

Re: Slow load from network map ?

Postby chmichael » 2008-9-16 @ 13:15

Well, DosBox isn't made only for GAMES but for applications too. I have a custom Made DOS application which make this an ISSUE! (at least to me) ...

It scan the directory files for information and when the files are located in the network DOSBOX delays but if i move them locally it's Super FAST! (I haven't notice any delay if i move the files to my local hard drive)
(Also i need to access this application on other computers that's why it's on network drive)

As Qbix said there's some bottleneck in the way DosBox Cache Drive get's the file information.

I Hope someone finds a solution ... I'll try too but since i'm not a C++ developer (i developing in Delphi) it's hard because my C++ knowledge is limited. :happyhappy:

Thank you
chmichael
Newbie
 
Posts: 17
Joined: 2008-4-19 @ 15:53

Re: Slow load from network map ?

Postby wd » 2008-9-16 @ 17:07

Well, DosBox isn't made only for GAMES but for applications too.

No it targets at games ONLY so if you got issues with some app you're either
lucky that somebody has fun investing time into it, or you got to do that yourself.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Slow load from network map ?

Postby chmichael » 2008-9-16 @ 18:55

Hello wd,
Well you should change DOSBox website title from: "DOSBox, a x86 emulator with DOS" to "DOSBox, a GAME emulator with DOS".

As far for the time i'm willing to pay anyone who has a solution. Just PM me to discuss.

Thank you
chmichael
Newbie
 
Posts: 17
Joined: 2008-4-19 @ 15:53

Re: Slow load from network map ?

Postby wd » 2008-9-16 @ 19:12

It's not a matter of money but time :)
Anyways feel free to keep posting information if you should figure something out,
just don't expect too much.
If you want to play with it try to compile dosbox from sources, and add some
logging (plain adding LOG_MSG()s with timing information to figure out what
parts might hurt speed). Just ask if something's unclear about compiling/modifying
the sources.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Slow load from network map ?

Postby chmichael » 2008-9-16 @ 23:36

Hello wd,
I already compiled DosBox using Visual C++ 2008 SP1 and i'm trying to see if i can make it faster.

Thank you for your tips!
chmichael
Newbie
 
Posts: 17
Joined: 2008-4-19 @ 15:53

Re: Slow load from network map ?

Postby chmichael » 2008-9-23 @ 23:19

Speed up 1: There are some unnecessary "Log" functions left inside the drive_cache.cpp which aren't comment and produce slow down ...

Actually if i comment all the LOG* functions improves the DosBox Speed!
Maybe it's better to enable logging only on DEBUG mode.

Keep looking ...
chmichael
Newbie
 
Posts: 17
Joined: 2008-4-19 @ 15:53

Re: Slow load from network map ?

Postby Qbix » 2008-9-24 @ 06:09

seriously ? I designed the LOG()() class so that they should be optimized out in release mode. At least that happened last time I checked the compiled code (compiled with mingw though)
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10448
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Slow load from network map ?

Postby wd » 2008-9-24 @ 06:54

You said it only happens on network drives, so the LOGging is irrelevant.

Maybe you can try this: mount the network drive (only!) so the huge file
list is directly accessible, like mount k n:\ when n:\ is your network drive
and n:\ contains 1000+ files. Check the speed for a dir.
Then go to drive_cache.cpp, function CreateEntry() there is an if clause
Code: Select all
   if (stat(buffer,&status)==0)   info->isDir   = (S_ISDIR(status.st_mode)>0);
   else                     info->isDir = false;

which you replace (both lines removed) by an info->isDir = false;
Do the same speed test as above (note that you can't CD into directories
now but that does not matter).
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Next

Return to DOSBox Development

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests