Forum
[PROBLEM] Increase network buffer - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Kodi (/forum-18.html)
+--- Thread: [PROBLEM] Increase network buffer (/thread-158.html)

Pages: 1 2


RE: Increase network buffer - gizag - 7th Jan, 2013 11:26 PM

Koenkk wouldn't your solution not harm the SD card after extensive usage ? I'd say it would end up rewriting the SD cards so many times thus slowly degrading it?
I'm with raspberry_pd on this with the 512 versions, best to use all the ram when possible since it's there and not being used Smile

Btw: some buffer issues could be solved when using NFS instead of samba Smile If you're nas box is *nix based you should be able to set up NFS, it's a bit faster and less CPU hungry.


RE: Increase network buffer - Koenkk - 8th Jan, 2013 01:31 AM

15728640 should be a good logical value then. Can people please test this and post their findings? As 2000000+ is too much for a 256mb pi.


RE: Increase network buffer - CurlyMo - 8th Jan, 2013 02:57 AM

As i posted on git before (https://github.com/xbianonpi/xbian/issues/181#issuecomment-11728841) i think the ideal value would be: 20971520.


RE: Increase network buffer - Pihkal - 15th Jan, 2013 03:41 AM

@Koenkk:

20971520 crashed xbmc while streaming with the icefilm-addon.
But i'm using a 128/128 split,so it's not that unexpected.
Code:
[ 1138.221435] Out of memory: Kill process 2332 (xbmc.bin) score 628 or sacrifice child
[ 1138.221451] Killed process 2332 (xbmc.bin) total-vm:369280kB, anon-rss:76688kB, file-rss:568kB

Changing the split back to 156/100 and re-trying...

This also crashed xbmc,this time while streaming 1080p content from youtube.
Same "out of memory" message in dmesg.

Now trying Koenkk's suggested value.


RE: Increase network buffer - Koenkk - 15th Jan, 2013 03:49 AM

@Pihkal can you try 15728640 with 128/128?


RE: Increase network buffer - Pihkal - 15th Jan, 2013 04:28 AM

Same thing.

Time to give you guys some background info on how i'm conducting these tests:

1. Xbian version 1.0a4 with the latest git changes and firmware.
2. Open ssh connection and run htop.
3. Open this video in youtube,pause it until it stops caching,around 30MB.
4. Resume playback,with codec-info on,this works for a short time,then it becomes unresponsive and the video starts to stutter really bad.
5. Crash

Also worth mentioning is that xbian runs of a usb drive and i have swap on by default.
I just turn it off (swapoff -a) for these tests.

Apparently i got some minor config errors after reboot...

Now trying WITH swap on,this doesn't crash but uses quitte a lot of swap-space,between 30 and 50 MB.


RE: Increase network buffer - Koenkk - 15th Jan, 2013 08:10 AM

@Pihkal and with 10485760 ?


RE: Increase network buffer - Pihkal - 15th Jan, 2013 11:49 PM

@Koenkk: still the same.
For some reason it keeps overflowing the memory and it seems to ignore the buffersize,it keeps buffering around 30MB.
During playback it continues buffering until it completely fills the ram and crashes XBMC.
I'm now going to try it with default XBMC buffer settings and see what happens cause i think this is not normal behaviour.

Edit:

Even with only 5MB buffer set in advancedsettings.xml it keeps on buffering 30MB,it does this not only in youtube but also when streaming from my upnp server.
Perhaps this is a bug in the latest XMBC-version,or something is wrong with my install?
I honestly don't know.
Can you try and see if you get the same results?

Snippet from my log file,showing it reads in the cache size from the file:

Code:
14:55:06 T:3041980416  NOTICE: Loaded settings file from special://profile/advancedsettings.xml
14:55:06 T:3041980416  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <network>
                                                <cachemembuffersize>5242880</cachemembuffersize>
                                              </network>
                                              <fanartres>540</fanartres>
                                              <thumbres>256</thumbres>
                                              <cputempcommand>echo &quot;$(/opt/vc/bin/vcgencmd measure_temp | cut -d&quot;=&quot; -f 2 | cut -d&quot;&apos;&quot; -f 1 | cut -d&quot;.&quot; -f 1) C&quot;</cputempcommand>
                                              <lookandfeel>
                                                <webserver>true</webserver>
                                              </lookandfeel>
                                              <bginfoloadermaxthreads>2</bginfoloadermaxthreads>
                                              <video>
                                                <adjustrefreshrate>
                                                  <override>
                                                    <fps>23.976</fps>
                                                    <refresh>24.0</refresh>
                                                  </override>
                                                </adjustrefreshrate>
                                              </video>
                                            </advancedsettings>
14:55:06 T:3041980416  NOTICE: Getting hardware information now...

Edit (again):

Just did a clean install of Xbian 1.0a4,all settings are standard,no lirc or anything,just changed the regional settings,calibrated my screen and installed youtube.
Did the same testing procedure as before,the cache now is 36MB but it doesn't crash XBMC.
The free ram averages around 12MB.
It appears to be a problem of the RC3 XBMC version.


RE: Increase network buffer - Koenkk - 30th Jan, 2013 02:11 AM

@Phikal can you now try 20971520 ?