Page 1 of 2
DB size growing

Posted:
Mon Dec 21, 2015 12:55 am
by josch.hh
It seems that the database is not well cleaned after removing a complete folder from the library.
The DB was about 597MB size including the folder i am talking about.
After removing it the DB got somerthing about 590MB.
After adding it again the size is now 625MB an growing....
Seems not ok for me.
Is there an option to clean up the DB files?
Re: DB size growing

Posted:
Wed Dec 23, 2015 3:00 am
by jhb50
I believe the only way is to delete it and let it rebuild.
Re: DB size growing

Posted:
Wed Dec 23, 2015 1:28 pm
by zip
Serviio uses Apache Derby DB. I don't know the inner workings but it's possible it doesn't shrink the data blobs in order to keep consistency and performance.
Re: DB size growing

Posted:
Wed Dec 23, 2015 6:57 pm
by skiaccianos
Btw, zip: I've tested the very latest derby.jar with serviio. It works fine and has same weight.
Inviato dal mio Moto G utilizzando Tapatalk
Re: DB size growing

Posted:
Wed Dec 23, 2015 8:08 pm
by josch.hh
skiaccianos wrote:Btw, zip: I've tested the very latest derby.jar with serviio. It works fine and has same weight.
Inviato dal mio Moto G utilizzando Tapatalk
And is the behaviour concerning the database cleanup for remove folders from serviio better,.... or what is the improvement?
Re: DB size growing

Posted:
Wed Dec 23, 2015 8:15 pm
by josch.hh
zip wrote:Serviio uses Apache Derby DB. I don't know the inner workings but it's possible it doesn't shrink the data blobs in order to keep consistency and performance.
Mmh, so what is the consequence? If one is regularly updating or modifying his media files a recreation of the derby db is needed to avoid that the database gets bigger than the source media files it points to?
Re: DB size growing

Posted:
Thu Dec 24, 2015 1:02 am
by DenyAll
Bearing in mind I know nothing about derby:
This post
http://apache-database.10148.n7.nabble. ... 04961.html (assuming that the response in that forum is accurate) begs the question - does Serviio periodically compress the database programatically? Is it practical to do so (time taken to compress, etc)? If not, perhaps by a third party tool?
Re: DB size growing

Posted:
Thu Dec 24, 2015 8:49 am
by josch.hh
Hi again, dont get me wrong, i really like Serviio, but as the DB is a major part i guess you should be sure about its behaviour in combination with the functionallity of your software.
Dont you think it is worth to take a deeper look from your side... i think the source cocde of serviio is not published so you are the only one to check to collaboration.
What i found was the following:
https://db.apache.org/derby/docs/10.1/adminguide/cadminspace21579.htmlhttp://www-01.ibm.com/support/docview.wss?uid=swg21577292The last link even with some java exmaples.
Re: DB size growing

Posted:
Thu Dec 24, 2015 1:01 pm
by skiaccianos
josch.hh wrote:skiaccianos wrote:Btw, zip: I've tested the very latest derby.jar with serviio. It works fine and has same weight.
Inviato dal mio Moto G utilizzando Tapatalk
And is the behaviour concerning the database cleanup for remove folders from serviio better,.... or what is the improvement?
"... Derby 10.12.1.1 contains many bug, security, and documentation fixes."
If there's a problem, the first thing to do is to get the latest release.

About me, I've never had a so huge an half gb db size: my .serviio/library folder has always been around 10 mb or less.
Re: DB size growing

Posted:
Mon Dec 28, 2015 8:44 am
by josch.hh
skiaccianos wrote:josch.hh wrote:skiaccianos wrote:Btw, zip: I've tested the very latest derby.jar with serviio. It works fine and has same weight.
Inviato dal mio Moto G utilizzando Tapatalk
And is the behaviour concerning the database cleanup for remove folders from serviio better,.... or what is the improvement?
"... Derby 10.12.1.1 contains many bug, security, and documentation fixes."
If there's a problem, the first thing to do is to get the latest release.

About me, I've never had a so huge an half gb db size: my .serviio/library folder has always been around 10 mb or less.
Concerning my DB size: It contains about 500 Movies and maybe 8000 mp3 and about 2000 pictures
... i dont think is this really much
Minidlna consumed only 20% of the db files size and art cache compared with serviio.
Re: DB size growing

Posted:
Fri Jan 01, 2016 2:58 pm
by zip
minidlna also doesn't store all the descriptive metadata, like summary, actors, 2 sizes of thumbnails, etc.
Re: DB size growing

Posted:
Fri Jan 01, 2016 3:43 pm
by josch.hh
ok, but i dont think that this results in an x times bigger DB
Re: DB size growing

Posted:
Fri Jan 01, 2016 8:29 pm
by zip
It could. And obviously they both use different DB engines, so you cannot really compare them anyway.
Re: DB size growing

Posted:
Sat Jan 02, 2016 1:54 am
by jhb50
What did we conclude here about cleaning old stuff out of the db?
My concern is my on-line streams for which the stream urls change regularly, as opposed to files which are static.
Am I correct that "the only way is to delete it and let it rebuild."??
Re: DB size growing

Posted:
Sat Jan 02, 2016 7:21 pm
by zip
Online streams are not stored into the DB (Derby), but use a caching mechanism (Apache JCS). No idea how the space in the persistent cache is reclaimed... but i guess you already have better way to test it than me (I hardly use any online sources personally).
Re: DB size growing

Posted:
Sat Jan 02, 2016 8:19 pm
by jhb50
zip wrote:Online streams are not stored into the DB (Derby), but use a caching mechanism (Apache JCS). No idea how the space in the persistent cache is reclaimed... but i guess you already have better way to test it than me (I hardly use any online sources personally).
So online metadata is stored in C:\Program Files\Serviio\library\cache\online_technical_metadata.data (Mine is only 5MB) and the thumbs in and the thumbnails in C:\Program Files\Serviio\library\cache\thumbnails.data (Mine is 99MB). Files metadata is in C:\Program Files\Serviio\library\db (Mine is 282MB)
Re: DB size growing

Posted:
Sat Jan 02, 2016 8:43 pm
by josch.hh
jhb50 wrote:zip wrote:Online streams are not stored into the DB (Derby), but use a caching mechanism (Apache JCS). No idea how the space in the persistent cache is reclaimed... but i guess you already have better way to test it than me (I hardly use any online sources personally).
So online metadata is stored in C:\Program Files\Serviio\library\cache\online_technical_metadata.data (Mine is only 5MB) and the thumbs in and the thumbnails in C:\Program Files\Serviio\library\cache\thumbnails.data (Mine is 99MB). Files metadata is in C:\Program Files\Serviio\library\db (Mine is 282MB)
How many files of which kind are in your db?
Re: DB size growing

Posted:
Sat Jan 02, 2016 9:20 pm
by jhb50
josch.hh wrote:jhb50 wrote:zip wrote:Online streams are not stored into the DB (Derby), but use a caching mechanism (Apache JCS). No idea how the space in the persistent cache is reclaimed... but i guess you already have better way to test it than me (I hardly use any online sources personally).
So online metadata is stored in C:\Program Files\Serviio\library\cache\online_technical_metadata.data (Mine is only 5MB) and the thumbs in and the thumbnails in C:\Program Files\Serviio\library\cache\thumbnails.data (Mine is 99MB). Files metadata is in C:\Program Files\Serviio\library\db (Mine is 282MB)
How many files of which kind are in your db?
Is there an easy way to get this number?
Re: DB size growing

Posted:
Sat Jan 02, 2016 9:28 pm
by zip
jhb50 wrote:Is there an easy way to get this number?
You can see the numbers (images / audio / videos) in the new 1.6 console homepage.
Re: DB size growing

Posted:
Sat Jan 02, 2016 11:13 pm
by josch.hh
zip wrote:jhb50 wrote:Is there an easy way to get this number?
You can see the numbers (images / audio / videos) in the new 1.6 console homepage.
nice, so when can we expect this new version ?
