Speedup Samba shares

Here for general support for E series TVs, request and problem solve area.

zoelechat
SamyGO Moderator
Posts: 8616
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Speedup Samba shares

Post by zoelechat »

Since I use SamyGO to access my Samba shares directly from TV, it always have been slow, especially on first browse of virtual device (~40 seconds for ~1000 shared files on 3 computers, increasing proportionally to number). Even next browses are "loading..." (with black screen) for ~15 seconds before displaying anything.

Today, just to make my device list on TV more friendly, I wanted to change virtual device name...
So, I've edited vusb.init script and changed product name from "SamyGo Virt." to "Network".

I don't know why but now, browsing of virtual device is nearly instantaneous! First browse takes ~5 seconds and next ones ~2 seconds. Mostly faster than a physical drive.

I've tried various product names, still as fast. Just revert to "SamyGo Virt." and it is slow again!

I wonder what's wrong with "SamyGO Virt." product name and what can be the explanation!?
Anyway, if this can be useful to anybody annoyed by slowness of access to samba shares, in case I was not the only one concerned... :)
I do NOT receive any PM. Please use forum.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Speedup Samba shares

Post by juusso »

I try to imagine what did you do for sure. Could you please give your init script?
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
zoelechat
SamyGO Moderator
Posts: 8616
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Speedup Samba shares

Post by zoelechat »

I've just changed product name which is written to usblog in vusb.init script...

-Open for editing 02_04_vusb.init and find the line (line 79 here):

Code: Select all

$(echo -e "[${dev}]\nVendor : SamyGO Virt.\nProduct : SamyGO Virt.\n\
-Change product name, for example:
"Product : SamyGO Virt." to-> "Product : Network"

-That's all!

I've tried various values such as "Virtual USB", "R?seau"... Anyone makes access/browsing of virtual device ~5 times faster compared to original "SamyGO Virt.".
I presume that the trick doesn't speedup only Samba but whole virtual USB in general (no more black screen/loading...). I can't confirm it since I use only Samba shares...
I do NOT receive any PM. Please use forum.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Speedup Samba shares

Post by juusso »

Okey, so simple... let`s wait for other reports.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
User avatar
fluffi444
SamyGO Project Donor
Posts: 569
Joined: Fri Apr 05, 2013 9:55 pm
Location: Germany

Re: Speedup Samba shares

Post by fluffi444 »

Sounds strange! I have no solution but maybe and point to look at...

Very early in my SamyGo life I wanted to change the Name "SamyGO Virt." (shown in Devices) and changed all SamyGO Virt. in vusb.init to "SamyGO USB"
But this didn't help... After some search I changed the "SamyGO Virt." in "g_file_storage.ko" also (mnt\lib\modules\2.6.35.13\kernel\drivers\usb\gadget) Line 365.
This was the key...

Maybe this differens in g_file_storage.ko and vusb.init does the trick...
You could try to change in g_file_storage.ko to "Network", too - Only overwrite it - do not add more spaces or so... Just to see what happens....
TV: UE40ES7000 @ UE40ES8090 - T-ECPDEUC-2022.0 // SamyGO
CI+: Unicam EVO 4 with HD+ (HD02) @ Pacific 4.60
NET: Samba: PC
Lordbyte
Official SamyGO Developer
Posts: 1472
Joined: Sun Aug 18, 2013 11:07 pm

Re: Speedup Samba shares

Post by Lordbyte »

This stuff, - and stuff like it .. should be gathered into a knowledge-database .. or wiki of some sort.

These questions and answers are valuable to users next year also, but the knowledge "drown" on forum
over time as threads progress, and good answers are over time hidden among hundreds of less interesting
posts in a thread due to age.

Everybody please go "hell yea - good idea" :D
I provide NO assistance by PM, unless absolutely necessary. Please ask questions in dedicated topics.
zoelechat
SamyGO Moderator
Posts: 8616
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Speedup Samba shares

Post by zoelechat »

fluffi444 wrote:Very early in my SamyGo life I wanted to change the Name "SamyGO Virt." (shown in Devices) and changed all SamyGO Virt. in vusb.init to "SamyGO USB"
But this didn't help... After some search I changed the "SamyGO Virt." in "g_file_storage.ko" also (mnt\lib\modules\2.6.35.13\kernel\drivers\usb\gadget) Line 365.
This was the key...
Funny that for me just changing product name in vusb.init is enough...
More funny, I've no g_file_storage.ko module at all, I've even no /usb folder in /kernel/drivers nor any of the requested modules in vusb.init script:

Code: Select all

insmod: can't read '/mnt/lib/modules/2.6.35.13/kernel/drivers/usb/gadget/dummy_hcd.ko': No such file or directory
insmod: can't read '/mnt/lib/modules/2.6.35.13/kernel/drivers/mstar/usb/gadget/dummy_hcd.ko': No such file or directory
insmod: can't read '/mnt/lib/modules/2.6.35.13/kernel/drivers/usb/gadget/g_file_storage.ko': No such file or directory
insmod: can't read '/mnt/lib/modules/2.6.35.13/kernel/drivers/mstar/usb/gadget/g_file_storage.ko': No such file or directory
It seems the big first half of vusb.init script does not concern me, so I've disabled most of it and saved 5 seconds on startup including "sleep 2, sleep 3" (of course virtual usb still works :) )

Then, trying to understand, I've set other product names:
-"SamyGO Virt" (without dot) -> no slowness, so Samsung is not slowing virtual USB by detecting "SamyGO" word :mrgreen:
-"Net Work." -> still as fast, space in the middle or dot at the end cause no problems

Seeing that after doing 30000+ files sharing try, my virtual USB titled "Network" is now slower by 2-3 seconds on "black screen/loading..." even reverting to previous number of shared files, my conclusion for now is that there must be some sort of cache for a specific product name that become saturated.
So, setting a "fresh" product name accelerate considerably things. But maybe I'm wrong... :)

edit: @Lordbyte
Not sure but I may be the only one concerned. Again, my TV seems a bit exotic ;)
I do NOT receive any PM. Please use forum.
zoelechat
SamyGO Moderator
Posts: 8616
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Speedup Samba shares

Post by zoelechat »

Based on my hypothesis that a fresh product name is needed, I've introduced a piece of code in vusb.init to add an incrementing counter as suffix of it:

Code: Select all

[...]
CountFile="/mtd_rwcommon/vusb_suffix"
[ ! -f $CountFile ] && echo 1 > $CountFile
N=$(cat $CountFile)
let N=N+1
echo $N > $CountFile

$(echo -e "[${dev}]\nVendor : SamyGO Virt.\nProduct : SamyGo($N)\n\
[...]
Clipboard01.jpg
Now, I also know how many times I've powered on my TV :mrgreen:
You do not have the required permissions to view the files attached to this post.
I do NOT receive any PM. Please use forum.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Speedup Samba shares

Post by juusso »

Weird, but nice if it works. I tried on D series, even hex-moding g_file_storage.ko. Same speed, same "Loading" time.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
zoelechat
SamyGO Moderator
Posts: 8616
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Speedup Samba shares

Post by zoelechat »

As far as I understand, vusb.init script uses an alternate method when no g_file_storage.ko module is found (that's the case on my TV, I don't know why I don't have it)
Only this alternate method seems to cause shares becoming slower with time. So, people having g_file_storage.ko module loaded are probably not concerned.

For now, my kludge works flawlessly and really fast, even if it's overkill to change product name on each TV start. :D
It should be needed only from time to time when it becomes slower...
I do NOT receive any PM. Please use forum.

Post Reply

Return to “[E] Support”