xbmc on Atv2 is extremely slow after configuring MySQL
#16
Ok removed the substitution for the thumbs, still no go.

I folloewd your toturial Ozymandyaz.

created a new user in myphp (synology) with username: xbmc, password xbmc
Granted all access..

here is my log, there is something wrong with the db!
http://pastebin.com/efbYtmhh
Reply
#17
Ok, I see the issue, there are empty databases named xbmc_video and xbmc_music. In the past you needed to create those, but now it screws up XBMC... Go into phpmyadmin and delete those databases. You only want the ones that end with numbers to remain, I.e. xbmc_video60 and xbmc_music19.

I only have my iPhone right now but if you get stuck I can post a video later Smile this happened to me a few times too... I think it's common enough that I should post an update about it...
Reply
#18
^^ what OZYMandyaz said - there are a lot of old instructions (e.g. Lifehacker) that are out of date and have you performing steps that aren't necessary, like creating the databases in MySQL.

reason I'm replying, is that I did notice from your log that you're running RC2. Any reason why you're not upgrading to Eden final? Note that if you're looking to share your library, they will all need to be on the same XBMC release. I'm not saying this will fix your issue with performance (but, hey, it might). Just seems to make sense to upgrade from the release candidate to Eden final.
Reply
#19
ok indeed i followed some time ago another tutorial saying i had to create those databases...
i'll try to delete them... and keep you informed.

Wel the reason i don't update to the latest is that everything works fine, no buffering at all,...
and i have read some post saying there is buffering with the latest...
so i'm often think : if it ain"t broken don't fix it!

At the moment i only have 1 xbmc running, but i'm preparing for ATV3, so..... ;-)
Reply
#20
I have two ATV1 (Crystalbuntu) boxes, two ATV2s (one on 4.3 and one on 4.4) and a few Windows boxes all running the Eden final release =) Go for the upgrade!

And... up till a few months ago my guides also had the wrong info about creating the initial databases =(
Reply
#21
ok it seems to work for mysql, now i'm going to try the path substitution.
but how can use path substitution with NFS and the rest (database and movies) in SMB?
@Ozymandyaz ?
Reply
#22
having problems finding/editing this file. anyone have detailed instructions on a synology dms 4
Reply
#23
(2012-04-13, 18:35)jpcolin Wrote: ok it seems to work for mysql, now i'm going to try the path substitution.
but how can use path substitution with NFS and the rest (database and movies) in SMB?
@Ozymandyaz ?



Hi jpcolin -

Its really easy actually, the path substitution is only used for the thumbs so it in no way interferes with anything else. You set it up like this in the advanced settings:

Code:
<pathsubstitution>
    <substitute>
      <from>special://masterprofile/Thumbnails/</from>
      <to>nfs://192.168.1.90/volume1/XBMC/Thumbnails_XBMC1/</to>
    </substitute>
</pathsubstitution>

The <to> section is the only line that ever changes since you will need to choose the protocol and path to your thumbs. If you want SMB, use "smb://<PATH>" for NFS it's "nfs://<PATH>" etc... In your sources you choose what protocol you want for the actual media files, but they do not need to be the same as the protocol used for the path substitution =)

Now... You just need to make sure you can make your NFS server work =)



Reply
#24
(2012-04-14, 19:48)Ozymandyaz Wrote:
(2012-04-13, 18:35)jpcolin Wrote: ok it seems to work for mysql, now i'm going to try the path substitution.
but how can use path substitution with NFS and the rest (database and movies) in SMB?
@Ozymandyaz ?



Hi jpcolin -

Its really easy actually, the path substitution is only used for the thumbs so it in no way interferes with anything else. You set it up like this in the advanced settings:

Code:
<pathsubstitution>
    <substitute>
      <from>special://masterprofile/Thumbnails/</from>
      <to>nfs://192.168.1.90/volume1/XBMC/Thumbnails_XBMC1/</to>
    </substitute>
</pathsubstitution>

The <to> section is the only line that ever changes since you will need to choose the protocol and path to your thumbs. If you want SMB, use "smb://<PATH>" for NFS it's "nfs://<PATH>" etc... In your sources you choose what protocol you want for the actual media files, but they do not need to be the same as the protocol used for the path substitution =)

Now... You just need to make sure you can make your NFS server work =)

Actually that is what I meant, it is not just replacing smb by nfs in the pathsubstitution line, what else do I have to do? Some config in my SynologyHuh? Any guide?

Reply
#25
(2012-04-14, 15:05)mcfreiz Wrote: having problems finding/editing this file. anyone have detailed instructions on a synology dms 4

Hi mcfreiz -

It's no surprise that you cant find the file... Since it doesn't exist =)

Turns out that the my.cnf file is totally optional and you will need to create your own on the Synology. Fortunately, its super easy to do, here is how:

First, enable terminal in the Synology control panel 'Control Panel -> Terminal' by checking the 'Enable SSH Service' tick box.

Now, get an application like putty so that you can SSH to the Synology.

Start Putty and connect to the NAS. Login as root and use the same password that you set-up for your admin account (its actually the root account.)

Once in, type the following commands:

Code:
cp /usr/syno/mysql/share/mysql/my-small.cnf /etc/my.cnf
vi /etc/my.cnf

This will copy a sample cnf file to the proper location and then open it in the vi text editor.

Use the arrow keys to move down about a page and a half until you see the [mysqld] section. Get the cursor on the line that says "thread_stack = 128" and type the "i" key to enter the edit mode in VI.

Hit enter to make a new line and use an arrow key to get to that line. In the blank line add the text:
skip-name-resolve

Hit escape to exit edit mode, then type:
Code:
:wq
(that is colon, w, q, and then hit enter. The colon will start the command mode and wq will write and quit VI. Hitting enter will run the command and quit VI.

If you make a mistake and VI gets weird on you, hit escape, then :q! (colon, q, exclamation point, and Enter) This will exit VI without saving. VI can be quirky for the uninitiated...

Then you need to restart MySQL, type the following:

Code:
/usr/syno/etc/rc.d/S21mysql.sh restart

If you messed up, you will probably see an error while re-starting and MySQL will just ignore the cnf file =)

Reply
#26
(2012-04-14, 19:56)jpcolin Wrote: Actually that is what I meant, it is not just replacing smb by nfs in the pathsubstitution line, what else do I have to do? Some config in my SynologyHuh? Any guide?

HA NP! Here is the official XBMC Wiki entry for NFS, scroll to the bottom for Synology specific instructions. I actually have no idea if this is all necessary just for Thumbs, but I did it and it worked for me =)

http://wiki.xbmc.org/index.php?title=NFS
Reply
#27
(2012-04-13, 14:39)Ozymandyaz Wrote: Ok, I see the issue, there are empty databases named xbmc_video and xbmc_music. In the past you needed to create those, but now it screws up XBMC... Go into phpmyadmin and delete those databases. You only want the ones that end with numbers to remain, I.e. xbmc_video60 and xbmc_music19.

ive had this running for a few years now with the mySQL db on a ubuntu-server and 2 xbmc's using nfs for the media + rSync for the cache. upgrading to eden was not clean... because the mySQL user didn't have access to create new databases, but once i got that sorted it migrated everything. ( dharma > rc2 > eden )

i have skip-name-resolve in my.cnf
i have entries in my /etc/hosts file on the server and clients
both installs browse the library just fine.
but updating is PAINFUL

rc2 made video58 and eden made video60
... i just dropped the 2 old ones,
but these didn't seem to be getting in my way.

xbmc still HANGS when i update the library (from either machine)
for 30 sec ... then it starts crawling through my directories

... clearly something is wrong with trying to update, but i don't get it
does anyone have a clue what's going on here Huh

box1; is ubuntu lucid minimal + xbmc eden
box2; is mint lisa (ubuntu onoric / kde) + xbmc eden

( this has been happening for a while, - dharma & eden-
... but i've been ignoring it, but its starting to gett on my nerves Confused )



rPi 2&3 | android phones | fireHD8 | linux | win10 + NFS NAS w/ mySQL + props to...
libreElecyatse, titan, AELflexGet, context.manageTags (a zosky original)
Reply
#28
log file? (first link in my signature)
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#29
(2012-04-14, 20:06)Ozymandyaz Wrote:
(2012-04-14, 15:05)mcfreiz Wrote: having problems finding/editing this file. anyone have detailed instructions on a synology dms 4

Hi mcfreiz -

It's no surprise that you cant find the file... Since it doesn't exist =)

Turns out that the my.cnf file is totally optional and you will need to create your own on the Synology. Fortunately, its super easy to do, here is how:

First, enable terminal in the Synology control panel 'Control Panel -> Terminal' by checking the 'Enable SSH Service' tick box.

Now, get an application like putty so that you can SSH to the Synology.

Start Putty and connect to the NAS. Login as root and use the same password that you set-up for your admin account (its actually the root account.)

Once in, type the following commands:

Code:
cp /usr/syno/mysql/share/mysql/my-small.cnf /etc/my.cnf
vi /etc/my.cnf

This will copy a sample cnf file to the proper location and then open it in the vi text editor.

Use the arrow keys to move down about a page and a half until you see the [mysqld] section. Get the cursor on the line that says "thread_stack = 128" and type the "i" key to enter the edit mode in VI.

Hit enter to make a new line and use an arrow key to get to that line. In the blank line add the text:
skip-name-resolve

Hit escape to exit edit mode, then type:
Code:
:wq
(that is colon, w, q, and then hit enter. The colon will start the command mode and wq will write and quit VI. Hitting enter will run the command and quit VI.

If you make a mistake and VI gets weird on you, hit escape, then :q! (colon, q, exclamation point, and Enter) This will exit VI without saving. VI can be quirky for the uninitiated...

Then you need to restart MySQL, type the following:

Code:
/usr/syno/etc/rc.d/S21mysql.sh restart

If you messed up, you will probably see an error while re-starting and MySQL will just ignore the cnf file =)
you are my hero .. was about to give up and go back to running MySql from my destop because it was so slow loading the each page on ATV2. I am using SMB not NFS for thumbnails and it is now loading perfectly with this change ... THANK YOU SOO MUCH Big Grin
Reply
#30
Hi all -

Anyone using a Synology NAS ought to also follow these instructions to make it so that the Synology can handle large databases... This was a big issue for me but was easily fixed:

http://forum.xbmc.org/showthread.php?tid=172788

Here is the text:

So... I seem to have fixed this issue by increasing the Thread_Stack from 128k to 256k in the MySQL my.conf file.

This was suggested by someone else having library issues with music and also using a Synology NAS. Looks to me like the default Synology settings are a little too conservative to run a big XBMC Library. Most things work, but I am guessing there is some recursive logic at the end of a clean up that updates episode counts and that can fail making the library basically functional, but not totally up to date.

Changing the settings made the library work going forward, but things that were already wrong continued to be wrong. That is to say, if an episode count was wrong, adding a show would increment it up and deleting a show would now increment it down, but it would always be off by however much it was in error prior to the fix... I fully resolved the issue by creating a new database and starting over. Now show counts are correct and I no longer have the MySQL error in the logs. AND... I think things are much faster...

So if you have a Synology NAS, you may want to to look at the /etc/my.conf file and change the value for Thread_Stack to 256k

You need to enable telnet and then SSH into the NAS using the login ROOT and whatever you set for your admin password. Only root can edit the file and save it. VI is the only installed text editor... so good luck!
Reply

Logout Mark Read Team Forum Stats Members Help
xbmc on Atv2 is extremely slow after configuring MySQL0