MySQL idle bandwidth usage
#1
@ home I host my own MySQL server to sync all my kodi instances.

Ontop of that I have a RPi2 that I setup to VPN into my home, I take that with me when I go away for work (I use a tablet data plan for internet)

The issue I notice is when I configure the remote box to use my home MySQL instance the idle bandwidth of remote box is ~1GB/day, then I remove the mysql info (in advancedsettings) the idle usage is a few MBs/day?

I’m not talking about watching anything, this is just the idle communication kodi has with its MySQL instance. I know I’m using kodi/SQL in a way that was not intended, but I’m wondering is there any configuration or control that I can applied to reduce that amount of idle bandwidth chatter?

1GB is a chuck of info, I’m guessing it has something to do with the poster images and such?

Thanks,
Reply
#2
Interesting. Does your MySQL log on the server show anything useful?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
Also, images aren't stored in the database. The URL s of images are stored there. The client downloads the image from the URL, and caches it. In short images won't cause a gig of data a day. (Not between MySQL and the client anyway).
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#4
(2016-10-12, 22:29)nickr Wrote: Interesting. Does your MySQL log on the server show anything useful?

I'm combing through pages and pages and cant see anything out of the ordinary, just countless queries.

(2016-10-13, 01:23)nickr Wrote: Also, images aren't stored in the database. The URL s of images are stored there. The client downloads the image from the URL, and caches it. In short images won't cause a gig of data a day. (Not between MySQL and the client anyway).

I'm not sure what to make of it then? the entire video database is only 180MB, if its not poster art what on earth could be soaking up that much bandwidth? I was thinking maybe when connected to the SQL server it could trigger the box to start downloading poster art from tv/movedb which would explain the idle usage, but i don't think that's the case because even if plugged in for days it never stops ~1GB/day, plus when i check the bandwidth from the mySQL side the bytes sent seems very high, on par with 1GB/day. But that's a very rough calculation as the mySQL bytes sent number is limited and i'm ball-parking when the last time i reset the server.

Any ideas? i just cant think of a way an idle box could use 1GB of data on a 180MB database?

I'm going to also try and scrape locally (not using mySQL) and then see what the idle bandwidth reported by the VPN server is, that may point to an external poster art culprit?

Thanks,
Reply
#5
Create a full Debug Log and post it after a day running. Enable relevant components.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
Rather than just dumping the entire log I tailed it and took note when i saw a jump in data usage from the VPN side.

The box is sitting idle on the home screen (with rotating background fan art enabled). I can see the fan art rotation in the log:
Code:
14:44:47 T:2923856960   DEBUG: DoWork - took 210 ms to load special://masterprofile/Thumbnails/5/5d4feb0c.jpg
That does not effect the bandwidth usage.

however every so often ill see this come up in the log:
Code:
14:44:53 T:2907079744   DEBUG: RunQuery took 4140 ms for 2308 items query: select * from movie_view  WHERE ((movie_view.playCount IS NULL OR movie_view.playCount < 1))
14:45:00 T:2907079744   DEBUG: RunQuery took 4703 ms for 12841 items query: select * from episode_view  WHERE ((episode_view.playCount IS NULL OR episode_view.playCount < 1))
14:45:03 T:2907079744   DEBUG: GetSongsByWhere query = SELECT songview.* FROM songview  WHERE ((CAST(songview.iTimesPlayed as DECIMAL(5,1)) < 1))
14:45:03 T:2907079744   DEBUG: GetAlbumsByWhere query: SELECT albumview.* FROM albumview  WHERE albumview.strReleaseType = 'album'
14:45:03 T:2907079744   DEBUG: GetAlbumsByWhere - query took 24 ms
14:45:04 T:2907079744   DEBUG: RunQuery took 13 ms for 0 items query: select * from musicvideo_view  WHERE ((musicvideo_view.playCount IS NULL OR musicvideo_view.playCount < 1))

Nothing was touched, this was run all on its own and resulted in about 22mb of data usage.

about 20 minutes later it comes up again:
Code:
15:05:08 T:2907079744   DEBUG: RunQuery took 3968 ms for 2308 items query: select * from movie_view  WHERE ((movie_view.playCount IS NULL OR movie_view.playCount < 1))
15:05:10 T:2898691136   DEBUG: DoWork - took 238 ms to load special://masterprofile/Thumbnails/7/7082404e.jpg
15:05:14 T:2907079744   DEBUG: RunQuery took 4342 ms for 12841 items query: select * from episode_view  WHERE ((episode_view.playCount IS NULL OR episode_view.playCount < 1))
15:05:17 T:2907079744   DEBUG: GetSongsByWhere query = SELECT songview.* FROM songview  WHERE ((CAST(songview.iTimesPlayed as DECIMAL(5,1)) < 1))
15:05:18 T:2907079744   DEBUG: GetAlbumsByWhere query: SELECT albumview.* FROM albumview  WHERE albumview.strReleaseType = 'album'
15:05:18 T:2907079744   DEBUG: GetAlbumsByWhere - query took 15 ms
15:05:18 T:2907079744   DEBUG: RunQuery took 12 ms for 0 items query: select * from musicvideo_view  WHERE ((musicvideo_view.playCount IS NULL OR musicvideo_view.playCount < 1))

I thought maybe it could be the Aeon Nox skin so i switched to confluence and saw the same behavior?

that's definitely the smoking gun, but what could be causing it? any ideas?

Thanks,
Reply
#7
So using a clean install i think i have narrowed the issue to an addon being used by AeonNox.

The reason i say addon is because when i switched to confluence the behavior was still there. Only on a clean install using confluence did the problem not resurface.

Im going to keep testing and see if i cant narrow it down further.
Reply
#8
This is a popular topic this week - some skins install addons that run in the background, even after you switch back to another skin.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#9
The VPN do makes a lot of traffic Wink
It is not only MySQL involved here
Reply
#10
(2016-10-15, 22:06)rogern Wrote: The VPN do makes a lot of traffic Wink
It is not only MySQL involved here

Positive its communication to mySQL, if i run a fresh install with no AeonNox my VPN traffic is ~20mb. If i run Nox with using a local library and VPNed i get ~20MB traffic.

I am making small progress, if i remove "service.library.data.provider" the problem goes away but i think that's just killing a higher level service... whats using it every 20 min is what i need to hunt down
Reply
#11
[SOLVED]

http://forum.kodi.tv/showthread.php?tid=...pid2438684
Reply

Logout Mark Read Team Forum Stats Members Help
MySQL idle bandwidth usage0