This forum has been archived. All content is frozen. Please use KDE Discuss instead.

ways to improve speed Amarok??

Tags: None
(comma "," separated)
Bloemetjesgordijn
Registered Member
Posts
34
Karma
0

ways to improve speed Amarok??

Mon Jan 04, 2010 10:29 pm
Hi,

First off all let me thank you for your efforts on Amarok2, its a great tool / application.

With my current setup I have the feeling that the database has difficulty in handling my collection (over 120.000 songs :p) It feels somewhat .....slow & sluggish.

My question is:
- can I assign additional memory to the database to speed things up?? (If so how can I do that??)
- will an external MySQL database (on the same computer) be faster than an internal Amarok db??

Thx in advance and a happy new year


Setup details:
CPU Quad core AMD Phenom
RAM 4G
KUbuntu 9.10
Amarok 2.2.1
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: ways to improve speed Amarok??

Tue Jan 05, 2010 5:38 am
Bloemetjesgordijn wrote:My question is:
- can I assign additional memory to the database to speed things up?? (If so how can I do that??)

MySQL might have some configuration parameters, you could try to play around with those. Personally I don't really know much about this, but some googling might give you results.

Bloemetjesgordijn wrote:- will an external MySQL database (on the same computer) be faster than an internal Amarok db??

Not normally, no. Both databases are actually MySQL, only that the default is "MySQL Embedded". It's technically the exact same code though, so it should be identical in performance.

However, if your computer really is CPU bound or so (very unlikely with a quad core), then you could try to use an external MySQL. You could also try to run that on the same computer, just for testing.

Generally, MySQL shouldn't have issues with handling 120,000 tracks. It's huge collection, but MySQL is very fast. Maybe also try to upgrade to a newer MySQL version, I have 5.1.x running nicely here.

Just don't make the mistake to load all of these tracks into the same playlist. This could lead to some performance issues :)


--
Mark Kretschmann - Amarok Developer
Bloemetjesgordijn
Registered Member
Posts
34
Karma
0

Re: ways to improve speed Amarok??

Tue Jan 05, 2010 8:46 am
markey wrote:
Bloemetjesgordijn wrote:My question is:
- can I assign additional memory to the database to speed things up?? (If so how can I do that??)

MySQL might have some configuration parameters, you could try to play around with those. Personally I don't really know much about this, but some googling might give you results.


I will roam the internet to find some tweaks. But is it even possible to tweak the embedded MySQL version, as it is embedded in Amarok?

markey wrote:
Bloemetjesgordijn wrote:- will an external MySQL database (on the same computer) be faster than an internal Amarok db??

Not normally, no. Both databases are actually MySQL, only that the default is "MySQL Embedded". It's technically the exact same code though, so it should be identical in performance.

However, if your computer really is CPU bound or so (very unlikely with a quad core), then you could try to use an external MySQL. You could also try to run that on the same computer, just for testing.


OK, thx, for testing purposes I will setup an external database. And see what happens.

markey wrote:Just don't make the mistake to load all of these tracks into the same playlist. This could lead to some performance issues :)

I know, I made the mistake once. :<

Last question,
I am collecting albums and not songs. Therefore I have the same songs on multiple albums (on purpose). Somewhere in Amarok there is an button / option 'remove duplicates'. Is there a way to remove this option (just to be on the safe side).

Kind regards

Bloemetjesgordijn
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: ways to improve speed Amarok??

Tue Jan 05, 2010 9:00 am
Bloemetjesgordijn wrote:I am collecting albums and not songs. Therefore I have the same songs on multiple albums (on purpose). Somewhere in Amarok there is an button / option 'remove duplicates'. Is there a way to remove this option (just to be on the safe side).

No, you can't remove that, but there also is no need to. That's because, all it does is removing duplicates from the current playlist.

Simply clicking Undo once reverts it all :)


--
Mark Kretschmann - Amarok Developer
User avatar
google01103
Manager
Posts
6668
Karma
25

Re: ways to improve speed Amarok??

Tue Jan 05, 2010 12:32 pm
@Bloemetjesgordijn - you don't state the arch of your Kubuntu, if it's 32bit then upping to 64bit might increase database performance


OpenSuse Leap 42.1 x64, Plasma 5.x

Bloemetjesgordijn
Registered Member
Posts
34
Karma
0

Re: ways to improve speed Amarok??

Tue Jan 05, 2010 2:09 pm
google01103 wrote:@Bloemetjesgordijn - you don't state the arch of your Kubuntu, if it's 32bit then upping to 64bit might increase database performance


Thx but it is already 64 bits
Lukas
Registered Member
Posts
427
Karma
0

Re: ways to improve speed Amarok??

Tue Jan 05, 2010 7:03 pm
You can add more memory to external mysql by editing my.cnf (in suse it is in /etc/my.cnf)
Giving more ram could improve performance, especially if all mostly used indexes doesn't fit into allocated ram.

Also, i'm 100% not sure,but it looks like Amarok uses LIKE '%term%' syntax to filter results. This way indexes is not likely to be used, thus cosing full rescans of entire table each time.

How much does your Db weights in mb (excluding jamendo and magnitude tables)?
Bloemetjesgordijn
Registered Member
Posts
34
Karma
0
Lukas wrote:You can add more memory to external mysql by editing my.cnf (in suse it is in /etc/my.cnf)
Giving more ram could improve performance, especially if all mostly used indexes doesn't fit into allocated ram.


Thx, it isnt in Ubuntu. But I will google.
Update 1: Done its in /etc/mysql/my.cnf
I changed:
key_buffer from 16M to 512M
(in a forum I found: "key_buffer_size: This describes the memory available to store the index keys. The default is 8 MB but you can set it to 25% of the RAM.)...I can up it to 1G but first see if this helps

Lukas wrote: Also, i'm 100% not sure,but it looks like Amarok uses LIKE '%term%' syntax to filter results. This way indexes is not likely to be used, thus cosing full rescans of entire table each time.

Sorry mate I but lost you there... I am not a technical person o)

Lukas wrote: How much does your Db weights in mb (excluding jamendo and magnitude tables)?

Amarok is currently rescanning and building my external database.
So I dont know yet. However .... I don't know how to determine the size of the Db. Can you give me a few pointers. I have googled but all I found was way to technical. (It is a small miracle that I got this far)

Update 2: Amarok is ready scanning and building the new external database...and it feels somewhat more responsive. I am not sure whether its the external database or the add. assigned memory to the database (I think the latter).

Thx all
Lukas
Registered Member
Posts
427
Karma
0

Re: ways to improve speed Amarok??

Mon Jan 11, 2010 7:32 pm
Could you send me a dump of your mysql database?
Bloemetjesgordijn
Registered Member
Posts
34
Karma
0

Re: ways to improve speed Amarok??

Fri Jan 15, 2010 8:55 am
Lukas wrote:Could you send me a dump of your mysql database?


Sure, how can I do this???

I am not an expert, so I need some guidance here.

Thx for your support
Lukas
Registered Member
Posts
427
Karma
0

Re: ways to improve speed Amarok??

Fri Jan 15, 2010 1:22 pm
If I understood you right, you use external mysql server.

To dump (export a copy) you have to execute (as a single line, as a normal user)

mysqldump -u USER -p --result-file=FILE --ignore-table=DATABASE.jamendo_tracks DATBASE


USER your mysql user used by amarok
FILE where to export it
DATABASE database used by amarok
password, if you don't have set up one, remove -p, otherwise type in, when asked.

When dump is done, you can upload it to any file sharing server, or send by email to me (1lukas1 gmail com).

Be warned, this file can be a bit large, mine with ~7k tracks was ~16mb large :)
Bloemetjesgordijn
Registered Member
Posts
34
Karma
0

Re: ways to improve speed Amarok??

Fri Jan 15, 2010 8:41 pm
Hi Lukas,

Herewith my datadump

http://rapidshare.com/files/335864331/d ... ar.gz.html

MD5: C224CE6731E28028A54AC1F13C94F1E1

uncompressed: 39MB :<

Thx for you help


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], ourcraft