Netstack to smbfs
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Cool_amigaN
    Posts: 761 from 2011/11/30
    Here's a thing that has bugged me since a long time and still persists on 3.16: I have a Seagate Central NAS connected to MorphOS through a script that does the smbfs (with cache=12288, idk if this is relevant). It works great and very reliable. However, say I browse into a folder of 30 video files worth of 9GB. Browsing in browser mode (show all files) is fine, takes up 1-2 seconds for the files to appear, cpu reaches about 10% and then immediately drops off. Switch to Lister mode and NETSTACK appears as top task and consumes 30% steady. No matter how much time I leave the folder open, NETSTACK still consumes crucial cpu cycles, crippling the system. If I close the offending drawer connected to the NAS, NETSTACK disappears right away as expected. Is this normal? Can anybody confirm if that's the case with browser/lister modes connected to network devices or it's just me?
    Amiga gaming Tribute: Watch, rate, comment :)
  • »11.03.22 - 22:23
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3108 from 2003/3/5
    From: Canada
    Check if thumbnail generation isn't enabled for the lister mode. That'd make Ambient load a bit of every video file there to generate an icon.
  • »12.03.22 - 15:37
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Cool_amigaN
    Posts: 761 from 2011/11/30
    Nope Thumbnail takes about 10 secs, cpu spikes at 60% and then drops off.

    I 've found the culprit though, it was retrieving version string (literally) indefinitely.

    Once I 've removed the column from Lister mode, it works /wo NETSTACK hanging.

    I also checked by right click an individual video file -> properties -> check version -> goes on searching and NETSTACK goes at 30% and stays there forever.

    My PMAC network interface tops at 6MB/s (LAN), which I think is a fair speed.

    Think this should get somehow improved. If version string cannot be found at x secs, it should just quit the command or don't check for version string in certain file formats.

    Same behaviour goes for MD5 btw now that I checked it as well.

    What do you think?

    [ Edited by Cool_amigaN 12.03.2022 - 21:00 ]
    Amiga gaming Tribute: Watch, rate, comment :)
  • »12.03.22 - 17:58
    Profile Visit Website
  • MorphOS Developer
    Piru
    Posts: 587 from 2003/2/24
    From: finland, the l...
    It is not taking forever, just a long time.

    I'm afraid there is no "magic" way to fix issues such as this. If the filesystem is slow it will be slow to perform certain kind of operations, no matter what. Adding timeouts for single items won't really fix the issue since you can still have many items (say n files with timeout of 5 seconds each -> it will still be busy for a long time with slow filesystems).

    Of course it would be possible to add option to Ambient to skip thumbnail, version scanning and md5sum functionality completely for smbfs mounts. It'd be blazing fast then, albeit with lacking functionality.

    [ Edited by Piru 12.03.2022 - 23:38 ]
  • »12.03.22 - 20:29
    Profile