ghenry22 / subsonic-synology

Subsonic setup to run on Synology NAS
94 stars 18 forks source link

Diskstation is unusable because of iowait caused by HSQLDB #28

Open abrakhim opened 5 years ago

abrakhim commented 5 years ago

Hi, my diskstation DS218play with two 7200 rpm spinners nearly came to a halt with iowait between 70-90% at all times after installing subsonic. I had some 500GB of Music on it. When i changed the DB to MariaDB, also running on the diskstation, it all went back to normal. I suggest you mention this somewhere prominent. To use mariadb, simply install mariadb10 and phpmyadmin via package manager, create DB subsonic and change the subsonic.sh file under /usr/syno/synoman/webman/3rdparty/subsonic

I had to add the db-string directly in line 191 ( starts with -Dsubsonic.db ) :

-Dsubsonic.db="jdbc:mysql://localhost:3307/subsonic?user=root&password=YOUR_MARIADB_PASSWORD_HERE&characterEncoding=UTF-8" \

ziss0u commented 5 years ago

Wow. Thank you for this. I could not figure out why my DS216play was having the same issue with 70% of my RAM being used at all times. This is definitely an issue that needs to be resolved to work natively when installing the app.

ziss0u commented 5 years ago

@abrakhim OK, so I'm running into some snags doing what you laid out. I installed mariadb10 and phpmyadmin, but how do I create DB subsonic and change the subsonic.sh file? The subsonic DB is blank when I created it.

ghenry22 commented 5 years ago

HSQLDB is certainly not a high performing DB but as it just stores everything in flat files on the disk it means there is no external dependency. I am not sure how easy (or even if it's possible) to create an interactive installer with choice of DB servers.

Although aside from initially indexing the music collection the load should drop down to pretty much nothing, so that's an odd one.

I'll look at just starting a FAQ page maybe with some steps and information on some of these kind of config options.

glasser commented 5 years ago

Any updates on this? Interested in trying out Subsonic for the first time but don't want to mess up my NAS. I don't know much about spks or whatever so while I can figure out how to install packages and edit files, I don't know how to make sure to do the tweaks above after installing the spk but before it gets started. Or is the idea that you're tweaking the source on your computer, making your own spk, and installing that?

glasser commented 5 years ago

32 might help.