Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

80% of cpu #645

Closed
zoic21 opened this issue May 25, 2012 · 127 comments
Closed

80% of cpu #645

zoic21 opened this issue May 25, 2012 · 127 comments

Comments

@zoic21
Copy link

zoic21 commented May 25, 2012

I have two problems with headphones :

  • sometimes headphones use 80% of cpu (2 cores at 2.4ghz) and lot of memory
  • and sometimes headphones auto shutdown I don't know why there is nothing in log

What can I do to help you to solve this.

@rembo10
Copy link
Owner

rembo10 commented May 25, 2012

Its not really doing anything too CPU intensive ever. Mine uses like 2% of
an atom n270

Not sure about the auto shutdown either..... let me think about what might
be happening
On May 25, 2012 5:34 PM, "zoic21" <
reply@reply.github.com>
wrote:

I have two problems with headphones :

  • sometimes headphones use 80% of cpu (2 cores at 2.4ghz) and lot of memory
  • and sometimes headphones auto shutdown I don't know why there is nothing
    in log

What can I do to help you to solve this.


Reply to this email directly or view it on GitHub:
#645

@zoic21
Copy link
Author

zoic21 commented May 25, 2012

Here log when heaphone used 80% of cpu :

25-mai-2012 11:24:41 - INFO :: MainThread : Headphones is already up-to-date.
25-mai-2012 11:24:41 - INFO :: MainThread : Starting Headphones on port: 8181
25-mai-2012 11:48:48 - INFO :: CP Server Thread-6 : Recieved API command: getIndex
25-mai-2012 15:45:53 - INFO :: CP Server Thread-10 : Recieved API command: getIndex
25-mai-2012 15:45:56 - INFO :: CP Server Thread-11 : Recieved API command: getArtist
25-mai-2012 16:24:42 - INFO :: Thread-72 : Headphones is already up-to-date.
25-mai-2012 16:24:52 - INFO :: Thread-71 : Scanning music directory: /home/data/Audio/
25-mai-2012 16:50:10 - INFO :: MainThread : Checking to see if the database has all tables....
25-mai-2012 16:50:10 - DEBUG :: MainThread : Trying to execute: "git rev-parse HEAD" with shell in /home/www/vhosts/headphones.darkserver.fr
25-mai-2012 16:50:10 - DEBUG :: MainThread : Git output: c83477d

25-mai-2012 16:50:11 - INFO :: MainThread : Headphones is already up-to-date.
25-mai-2012 16:50:11 - INFO :: MainThread : Starting Headphones on port: 8181

At 16:50 I restart it.

@rembo10
Copy link
Owner

rembo10 commented May 28, 2012

Okay, so its getting stuck while doing the library scan. It shouldn't be
that CPU intensive. Lemme look over the code
On May 25, 2012 8:30 PM, "zoic21" <
reply@reply.github.com>
wrote:

Here log when heaphone used 80% of cpu :

25-mai-2012 11:24:41 - INFO :: MainThread : Headphones is already
up-to-date.
25-mai-2012 11:24:41 - INFO :: MainThread : Starting Headphones on
port: 8181
25-mai-2012 11:48:48 - INFO :: CP Server Thread-6 : Recieved API
command: getIndex
25-mai-2012 15:45:53 - INFO :: CP Server Thread-10 : Recieved API
command: getIndex
25-mai-2012 15:45:56 - INFO :: CP Server Thread-11 : Recieved API
command: getArtist
25-mai-2012 16:24:42 - INFO :: Thread-72 : Headphones is already
up-to-date.
25-mai-2012 16:24:52 - INFO :: Thread-71 : Scanning music directory:
/home/data/Audio/
25-mai-2012 16:50:10 - INFO :: MainThread : Checking to see if the
database has all tables....
25-mai-2012 16:50:10 - DEBUG :: MainThread : Trying to execute: "git
rev-parse HEAD" with shell in /home/www/vhosts/headphones.darkserver.fr
25-mai-2012 16:50:10 - DEBUG :: MainThread : Git output:
c83477d

25-mai-2012 16:50:11 - INFO :: MainThread : Headphones is already
up-to-date.
25-mai-2012 16:50:11 - INFO :: MainThread : Starting Headphones on
port: 8181

At 16:50 I restart it.


Reply to this email directly or view it on GitHub:
#645 (comment)

@zoic21
Copy link
Author

zoic21 commented Jun 1, 2012

Hi,
Headphones has restarted again, here the last line log :
31-mai-2012 00:06:30 - INFO :: Thread-84 : Headphones is already up-to-date.
31-mai-2012 02:20:36 - INFO :: Thread-71 : Completed scanning of directory: /home/data/Audio/
31-mai-2012 02:20:36 - INFO :: Thread-71 : Checking filepaths to see if we can find any matches
31-mai-2012 04:06:30 - INFO :: Thread-133 : Scanning music directory: /home/data/Audio/
31-mai-2012 06:06:31 - INFO :: Thread-158 : Headphones is already up-to-date.
31-mai-2012 07:20:05 - INFO :: Thread-133 : Completed scanning of directory: /home/data/Audio/
31-mai-2012 07:20:05 - INFO :: Thread-133 : Checking filepaths to see if we can find any matches
31-mai-2012 09:06:48 - INFO :: Thread-195 : Scanning music directory: /home/data/Audio/
31-mai-2012 12:06:31 - INFO :: Thread-232 : Headphones is already up-to-date.
31-mai-2012 12:20:22 - INFO :: Thread-195 : Completed scanning of directory: /home/data/Audio/
31-mai-2012 12:20:22 - INFO :: Thread-195 : Checking filepaths to see if we can find any matches
31-mai-2012 14:06:39 - INFO :: Thread-257 : Scanning music directory: /home/data/Audio/
31-mai-2012 17:19:16 - INFO :: Thread-257 : Completed scanning of directory: /home/data/Audio/
31-mai-2012 17:19:16 - INFO :: Thread-257 : Checking filepaths to see if we can find any matches
31-mai-2012 18:06:31 - INFO :: Thread-307 : Headphones is already up-to-date.
31-mai-2012 19:06:48 - INFO :: Thread-320 : Scanning music directory: /home/data/Audio/
31-mai-2012 22:26:36 - INFO :: Thread-320 : Completed scanning of directory: /home/data/Audio/
31-mai-2012 22:26:36 - INFO :: Thread-320 : Checking filepaths to see if we can find any matches

@rembo10
Copy link
Owner

rembo10 commented Jun 1, 2012

The actual log file might provide more clues

Headphonesdir/logs/headphones.log
On Jun 1, 2012 2:20 PM, "zoic21" <
reply@reply.github.com>
wrote:

Hi,
Headphones has restarted again, here the last line log :
31-mai-2012 00:06:30 - INFO :: Thread-84 : Headphones is already
up-to-date.
31-mai-2012 02:20:36 - INFO :: Thread-71 : Completed scanning of
directory: /home/data/Audio/
31-mai-2012 02:20:36 - INFO :: Thread-71 : Checking filepaths to see if
we can find any matches
31-mai-2012 04:06:30 - INFO :: Thread-133 : Scanning music directory:
/home/data/Audio/
31-mai-2012 06:06:31 - INFO :: Thread-158 : Headphones is already
up-to-date.
31-mai-2012 07:20:05 - INFO :: Thread-133 : Completed scanning of
directory: /home/data/Audio/
31-mai-2012 07:20:05 - INFO :: Thread-133 : Checking filepaths to see
if we can find any matches
31-mai-2012 09:06:48 - INFO :: Thread-195 : Scanning music directory:
/home/data/Audio/
31-mai-2012 12:06:31 - INFO :: Thread-232 : Headphones is already
up-to-date.
31-mai-2012 12:20:22 - INFO :: Thread-195 : Completed scanning of
directory: /home/data/Audio/
31-mai-2012 12:20:22 - INFO :: Thread-195 : Checking filepaths to see
if we can find any matches
31-mai-2012 14:06:39 - INFO :: Thread-257 : Scanning music directory:
/home/data/Audio/
31-mai-2012 17:19:16 - INFO :: Thread-257 : Completed scanning of
directory: /home/data/Audio/
31-mai-2012 17:19:16 - INFO :: Thread-257 : Checking filepaths to see
if we can find any matches
31-mai-2012 18:06:31 - INFO :: Thread-307 : Headphones is already
up-to-date.
31-mai-2012 19:06:48 - INFO :: Thread-320 : Scanning music directory:
/home/data/Audio/
31-mai-2012 22:26:36 - INFO :: Thread-320 : Completed scanning of
directory: /home/data/Audio/
31-mai-2012 22:26:36 - INFO :: Thread-320 : Checking filepaths to see
if we can find any matches


Reply to this email directly or view it on GitHub:
#645 (comment)

@zoic21
Copy link
Author

zoic21 commented Jun 1, 2012

This is headphones.log. Here you can see I restart headphones :

root@_:/home/www/vhosts/_************/logs# vim headphones.log
31-mai-2012 02:20:36 - INFO :: Thread-71 : Checking filepaths to see if we can find any matches
31-mai-2012 04:06:30 - INFO :: Thread-133 : Scanning music directory: /home/data/Audio/
31-mai-2012 06:06:31 - INFO :: Thread-158 : Headphones is already up-to-date.
31-mai-2012 07:20:05 - INFO :: Thread-133 : Completed scanning of directory: /home/data/Audio/
31-mai-2012 07:20:05 - INFO :: Thread-133 : Checking filepaths to see if we can find any matches
31-mai-2012 09:06:48 - INFO :: Thread-195 : Scanning music directory: /home/data/Audio/
31-mai-2012 12:06:31 - INFO :: Thread-232 : Headphones is already up-to-date.
31-mai-2012 12:20:22 - INFO :: Thread-195 : Completed scanning of directory: /home/data/Audio/
31-mai-2012 12:20:22 - INFO :: Thread-195 : Checking filepaths to see if we can find any matches
31-mai-2012 14:06:39 - INFO :: Thread-257 : Scanning music directory: /home/data/Audio/
31-mai-2012 17:19:16 - INFO :: Thread-257 : Completed scanning of directory: /home/data/Audio/
31-mai-2012 17:19:16 - INFO :: Thread-257 : Checking filepaths to see if we can find any matches
31-mai-2012 18:06:31 - INFO :: Thread-307 : Headphones is already up-to-date.
31-mai-2012 19:06:48 - INFO :: Thread-320 : Scanning music directory: /home/data/Audio/
31-mai-2012 22:26:36 - INFO :: Thread-320 : Completed scanning of directory: /home/data/Audio/
31-mai-2012 22:26:36 - INFO :: Thread-320 : Checking filepaths to see if we can find any matches
01-juin-2012 09:53:44 - INFO :: MainThread : Checking to see if the database has all tables....
01-juin-2012 09:53:44 - DEBUG :: MainThread : Trying to execute: "git rev-parse HEAD" with shell in /home/www/vhosts/**
***********************
01-juin-2012 09:53:44 - DEBUG :: MainThread : Git output: f9f129b

01-juin-2012 09:53:45 - INFO :: MainThread : Headphones is already up-to-date.
01-juin-2012 09:53:45 - INFO :: MainThread : Starting Headphones on port: 8181

@zoic21
Copy link
Author

zoic21 commented Jun 6, 2012

The problem with the CPU is back

Top :
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25360 headphon 20 0 2204m 1.0g 2184 S 84 53.4 1771:52 python

The last log entries :
06-juin-2012 11:16:58 - INFO :: Thread-604 : Updating complete for: Fall Out Boy
06-juin-2012 11:16:59 - DEBUG :: Thread-604 : Using the following server values:
MBHost: 178.63.142.150 ; MBPort: 8181 ; Sleep Interval: 0
06-juin-2012 11:17:04 - INFO :: Thread-604 : Now adding/updating: Fastball
06-juin-2012 11:17:05 - DEBUG :: Thread-604 : Using the following server values:
MBHost: 178.63.142.150 ; MBPort: 8181 ; Sleep Interval: 0
06-juin-2012 11:17:09 - INFO :: Thread-604 : Now adding/updating album: All the Pain Money Can Buy
06-juin-2012 11:19:58 - DEBUG :: Thread-604 : Using the following server values:
MBHost: 178.63.142.150 ; MBPort: 8181 ; Sleep Interval: 0
06-juin-2012 11:19:59 - INFO :: Thread-604 : Now adding/updating album: Live from Jupiter Records
06-juin-2012 11:20:20 - DEBUG :: Thread-604 : Using the following server values:
MBHost: 178.63.142.150 ; MBPort: 8181 ; Sleep Interval: 0
06-juin-2012 11:20:43 - INFO :: Thread-604 : Now adding/updating album: Keep Your Wig On

The probleme is here when headphones rescan library. Maybe I make a mistake somewhere in install?

@fullbright
Copy link

Hello,

I also have the same issue. When Headphones auto updates (wanted albums or library), it raise the CPU load to 98% and stays at that level, making everything run very slowly.

I must go to the web interface and click on he restart link, and CPU load get back to ~20% again.

@rembo10
Copy link
Owner

rembo10 commented Jun 21, 2012

It's gotta be getting stuck somewhere, but not producing any error messages. Maybe can you tr running it from the terminal to see if there are any exceptions during the library scan?

On Jun 19, 2012, at 11:02 AM, fullbrightreply@reply.github.com wrote:

Hello,

I also have the same issue. When Headphones auto updates (wanted albums or library), it raise the CPU load to 98% and stays at that level, making everything run very slowly.

I must go to the web interface and click on he restart link, and CPU load get back to ~20% again.


Reply to this email directly or view it on GitHub:
#645 (comment)

@zoic21
Copy link
Author

zoic21 commented Jun 22, 2012

I make your test and I force refresh of music but the CPU and memory is ok so it's not when headphones refresh music...

@fullbright
Copy link

Hello,

Thanks for the tests. I'll do further tests and see where this is from.

Le 22 juin 2012 23:27, "zoic21" <
reply@reply.github.com>
a
écrit :

I make your test and I force refresh of music but the CPU and memory is ok
so it's not when headphones refresh music...


Reply to this email directly or view it on GitHub:
#645 (comment)

@cptjhmiller
Copy link

I am getting this also, 80-85% Yesterday i heard cpu fan go into overdrive, looked at running proccess and headphones was as 165% restarted it and it was good again for a bit but still does go up to 80-85%

I have 4 GB memory and 2 x 3ghz running on Openmediavault(Debian) and music collection is around 66GB

I ran headphones in a terminal and top in another, Updated artists 1-2% (9% max) Scan music directory, bang 83%
There was no output in the terminal apart from what has been posted above to help track down what is causing this to happen.

I love headphones but this is making me think of uninstalling as its causing whole system to slow down.

@zoic21
Copy link
Author

zoic21 commented Jul 18, 2012

I also still the problem pending a resolution of the problem I stopped headphones ...

@cptjhmiller
Copy link

I want to help resolve this so will keep using it for now but without any error report i think it will be hard for anyone to track down what is causing this to happen.

What system are you using to run headphones? Other users with this problem should post what system they are using as it may be a system issue and will also help eliminate probable causes.

@rembo10
Copy link
Owner

rembo10 commented Jul 18, 2012

Are you guys running it from source? I'd like to narrow this down and fix
it asap
On Jul 18, 2012 2:27 PM, "cptjhmiller" <
reply@reply.github.com>
wrote:

I want to help resolve this so will keep using it for now but without any
error report i think it will be hard for anyone to track down what is
causing this to happen.


Reply to this email directly or view it on GitHub:
#645 (comment)

@cptjhmiller
Copy link

I am, git clone then i remove the .git folder to allow updates.

Thanks for having a go at getting this sorted.

@cptjhmiller
Copy link

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2788 root 20 0 383m 113m 4508 S 192 2.9 122:10.55 python

192% thats too high to leave running, will have to disable it for now but will be happy to test any changes you suggest.

@rembo10
Copy link
Owner

rembo10 commented Jul 18, 2012

No that's crazy high. Let me work on something - thanks for the heads up

On Jul 18, 2012, at 4:51 PM, cptjhmillerreply@reply.github.com wrote:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2788 root 20 0 383m 113m 4508 S 192 2.9 122:10.55 python

192% thats too high to leave running, will have to disable it for now but will be happy to test any changes you suggest.


Reply to this email directly or view it on GitHub:
#645 (comment)

@Alfiegerner
Copy link

Same problem, here very high cpu (90% ish) on scanning library. Let me know if you want me to try adding debug etc to test.

@rembo10
Copy link
Owner

rembo10 commented Jul 27, 2012

I took out the "checking empty filepaths" code, since i thought that might be the culprit but its not..... Maybe i can put together a little author script you guys can run that will basically mimic the library scan but with more logging?

@rembo10
Copy link
Owner

rembo10 commented Jul 27, 2012

*python

@Alfiegerner
Copy link

Yep, no problem, happy to run that, or if you'd like me to apply a patch to my install, whatever's easiest for you.

@cptjhmiller
Copy link

Same here, would be happy to help out in what ever way is needed to track down this error/bug

@rembo10
Copy link
Owner

rembo10 commented Jul 29, 2012

Cool, lemme write something up. A script is easier since you won't have to keep restarting headphones with changes

On Jul 29, 2012, at 7:18 PM, cptjhmillerreply@reply.github.com wrote:

Same here, would be happy to help out in what ever way is needed to track down this error/bug


Reply to this email directly or view it on GitHub:
#645 (comment)

@rembo10
Copy link
Owner

rembo10 commented Jul 31, 2012

Sorry guys, posted the debug info in the wrong thread. I wrote up a script that tries to mimic the library scan. It's in the debug branch. To get it, cd into your headphones directory, and run:
git fetch origin
git checkout debug
python debug.py

Depending on the results of that, I'll either tweak the debug script or have a fix ready

@cptjhmiller
Copy link

I am in Turkey atm but will try it when i return home on Friday. I would try it but dont wont to risk crashing my server.

@rembo10
Copy link
Owner

rembo10 commented Jul 31, 2012

A possible fix is in the develop branch

@Alfiegerner
Copy link

No joy I'm afraid.

First I tried the devlop branch. I replicated as before: went to Manage screen, and pressed save on the existing library path, top shows one core maxed out almost immediately.

Next tried debug.py, and it behaves itself pretty well, cpu not going above 20 usage total.

Sorry to be bearer of bad tidings :(

@rembo10
Copy link
Owner

rembo10 commented Aug 2, 2012

Dumb question but did you restart after switching branches?
On Aug 2, 2012 2:03 PM, "Alfiegerner" <
reply@reply.github.com>
wrote:

No joy I'm afraid.

First I tried the devlop branch. I replicated as before: went to Manage
screen, and pressed save on the existing library path, top shows one core
maxed out almost immediately.

Next tried debug.py, and it behaves itself pretty well, cpu not going
above 20 usage total.

Sorry to be bearer of bad tidings :(


Reply to this email directly or view it on GitHub:
#645 (comment)

@nozn
Copy link

nozn commented Jul 23, 2013

Accessing a sqlite db over a network share is a bad idea on so many levels... but yeah WAL doesn't work without shared memory.

Now if you can change the logic so that a full scan doesn't update every single row in the db... the "upserts" in librarysync never have the opportunity to not run a query because the controlValueDict isn't populated from the db data that would be overwritten. So even when nothing changes, an update is always executed that's a good chunk of io that can be eliminated.

Another way to reduce load would be to store a signature of the file along with the track in the db -- location + size + mtime is probably enough -- and don't even bother reading the id3 if the file has been scanned before.

@rembo10
Copy link
Owner

rembo10 commented Jul 23, 2013

Nice one. Will look into it. Cleaning up the code to be more efficient
makes the most sense to me. The reason I was scanning the files every time
was to see if any of the metadata changed, which wouldn't necessarily
change the file size, which is basically the only way I thought to compare.
Haven't looked at this in a while. Fastest would probably to see if I can
grab a last modified date or something.

Anyways - do you have any interest in helping me out on this more actively?
There's a lot of stuff I'm just totally unaware of and it would be a great
help. I want to get this problem sorted once and for all

Thanks!
On Jul 23, 2013 10:19 AM, "normzbig" notifications@github.com wrote:

Accessing a sqlite db over a network share is a bad idea on so many
levels... but yeah WAL doesn't work without shared memory.

Now if you can change the logic so that a full scan doesn't update every
single row in the db... the "upserts" in librarysync never have the
opportunity to not run a query because the controlValueDict isn't
populated from the db data that would be overwritten. So even when nothing
changes, an update is always executed that's a good chunk of io that can be
eliminated.

Another way to reduce load would be to store a signature of the file along
with the track in the db -- location + size + mtime is probably enough --
and don't even bother reading the id3 if the file has been scanned before.


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21393033
.

@nozn
Copy link

nozn commented Jul 23, 2013

I wouldn't mind helping out -- but I've never touched python. Code is code,
and I can read it, but some of it is greek to me -- especially things like
"lamda" :)

Tracking mtime for each file should be safe. I can't imagine why a tagging
tool would take the extra step to keep mtime static when it's updating the
internal metadata. I would make one query before the start of a library
scan to pull in all known files and their last known mtimes, then as you
traverse through the library directories get the stat info for each file
and compare it to value you have in memory. Seems like a pretty simple way
to reduce io to a minimum.

On Tue, Jul 23, 2013 at 12:04 AM, rembo10 notifications@github.com wrote:

Nice one. Will look into it. Cleaning up the code to be more efficient
makes the most sense to me. The reason I was scanning the files every time
was to see if any of the metadata changed, which wouldn't necessarily
change the file size, which is basically the only way I thought to
compare.
Haven't looked at this in a while. Fastest would probably to see if I can
grab a last modified date or something.

Anyways - do you have any interest in helping me out on this more
actively?
There's a lot of stuff I'm just totally unaware of and it would be a great
help. I want to get this problem sorted once and for all

Thanks!
On Jul 23, 2013 10:19 AM, "normzbig" notifications@github.com wrote:

Accessing a sqlite db over a network share is a bad idea on so many
levels... but yeah WAL doesn't work without shared memory.

Now if you can change the logic so that a full scan doesn't update every
single row in the db... the "upserts" in librarysync never have the
opportunity to not run a query because the controlValueDict isn't
populated from the db data that would be overwritten. So even when
nothing
changes, an update is always executed that's a good chunk of io that can
be
eliminated.

Another way to reduce load would be to store a signature of the file
along

with the track in the db -- location + size + mtime is probably enough

and don't even bother reading the id3 if the file has been scanned
before.


Reply to this email directly or view it on GitHub<
https://github.com/rembo10/headphones/issues/645#issuecomment-21393033>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21393393
.

@theguardian
Copy link
Contributor

I'm really happy to see that this issue has been resurrected! I forked headphones in hoping that I could set it up with MySQL instead of SQLite to speed up the update process so my CPU doesn't burn for hours at a time, but after 12 hours of reviewing and mucking with the code I'm convinced of a few things:

1.) MySQL is a nice-to-have, but complicates installation for having to include mysql-python - which can get pretty hairy depending on the user's system. Even if you get past that hurdle, there's a major refactoring of the code to migrate SQLite statements to MySQL statements. ("?" becomes "%s" in queries, mass changes for dictionary support and reverse, etc) It's definitely not trivial. [don't mean to thread-jack, I know there's another thread about potential MySQL support]

2.) I'm in the same boat as normzbig. I'd love to help out, but python is pretty new to me. However, there are definitely ways to reduce database I/O and CPU load within the current code framework. We should get a list of potential opportunities going. Checking files against database contents before scanning is a great idea. Other ideas could include the ability to "pause" albums, so albums released years ago aren't always being updated with every update of "active artists". Or somehow pick the one best "release" of an album before committing to the database, since there are sometimes dozens of album variants on musicbrainz (all being committed).

It probably sounds like pointless busy-work, but if we could establish a flowchart of all filesystem/musicbrainz/headphones.db I/O, I bet we could knock 80% of the read/write cycles out of the equation.

@rembo10
Copy link
Owner

rembo10 commented Jul 23, 2013

Awesome. I just don't have enough experience to be able to figure out
where the bottlenecks are (I mean, I know a lot of the stuff I'm doing
is redundant, but it's hard for me to figure out where to cut out). But
I can do the coding if you guys come up with a list of potential places
where we can cut down. I'll start working on the stuff already
mentioned today. Excited to get this resolved

@rembo10
Copy link
Owner

rembo10 commented Jul 23, 2013

Can someone maybe email me a large database they'd been having trouble with? headphones app at gmail

thanks

@nozn
Copy link

nozn commented Jul 23, 2013

SQLite really should be fine for this purpose. We just need to reduce the
redundancies

rembo10, my db is 75 mb. Not very large, but it's been growing rapidly
since yesterday. The setting to "Automatically Mark All Albums as Wanted"
seems to cause an explosion when the scanner hits a soundtrack or
compilation. Maybe a dozen new artists from each one, which each trigger a
download of all albums (from artists I'd never want more than one song from)

On Tue, Jul 23, 2013 at 12:40 AM, Justin Evans notifications@github.comwrote:

I'm really happy to see that this issue has been resurrected! I forked
headphones in hoping that I could set it up with MySQL instead of SQLite to
speed up the update process so my CPU doesn't burn for hours at a time, but
after 12 hours of reviewing and mucking with the code I'm convinced of a
few things:

1.) MySQL is a nice-to-have, but complicates installation for having to
include mysql-python - which can get pretty hairy depending on the user's
system. Even if you get past that hurdle, there's a major refactoring of
the code to migrate SQLite statements to MySQL statements. ("?" becomes
"%s" in queries, mass changes for dictionary support and reverse, etc) It's
definitely not trivial. [don't mean to thread-jack, I know there's another
thread about potential MySQL support]

2.) I'm in the same boat as normzbig. I'd love to help out, but python is
pretty new to me. However, there are definitely ways to reduce database I/O
and CPU load within the current code framework. We should get a list of
potential opportunities going. Checking files against database contents
before scanning is a great idea. Other ideas could include the ability to
"pause" albums, so albums released years ago aren't always being updated
with every update of "active artists". Or somehow pick the one best
"release" of an album before committing to the database, since there are
sometimes dozens of album variants on musicbrainz (all being committed).

It probably sounds like pointless busy-work, but if we could establish a
flowchart of all filesystem/musicbrainz/headphones.db I/O, I bet we could
knock 80% of the read/write cycles out of the equation.


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21394240
.

@rembo10
Copy link
Owner

rembo10 commented Jul 23, 2013

Oh yeah. I'll get a fix for that - there needs to be more specialized stuff for various artists.

As for the sqlite stuff, do you think it'll be problematic if we just switch to wal behind the scenes? right now journaling is off but in the case that the data dir is on a network share, maybe we can give the option of changing the journaling system in the config?

@nozn
Copy link

nozn commented Jul 23, 2013

I'm trying to understand the use case where someone runs their headphones
service from files stored on a network share. Updating databases over SMB
or NFS will result in corruption sooner or later. And I don't see anything
wrong with requiring that everything in the headphones install dir,
including the db, be a local file. But sure, why couldn't it be an advanced
option for folks who want to take the risk?

On Tue, Jul 23, 2013 at 10:37 AM, rembo10 notifications@github.com wrote:

Oh yeah. I'll get a fix for that - there needs to be more specialized
stuff for various artists.

As for the sqlite stuff, do you think it'll be problematic if we just
switch to wal behind the scenes? right now journaling is off but in the
case that the data dir is on a network share, maybe we can give the option
of changing the journaling system in the config?


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21422958
.

@rembo10
Copy link
Owner

rembo10 commented Jul 23, 2013

Haha i'm just trying to cover my bases
On Jul 23, 2013 9:53 PM, "normzbig" notifications@github.com wrote:

I'm trying to understand the use case where someone runs their headphones
service from files stored on a network share. Updating databases over SMB
or NFS will result in corruption sooner or later. And I don't see anything
wrong with requiring that everything in the headphones install dir,
including the db, be a local file. But sure, why couldn't it be an
advanced
option for folks who want to take the risk?

On Tue, Jul 23, 2013 at 10:37 AM, rembo10 notifications@github.com
wrote:

Oh yeah. I'll get a fix for that - there needs to be more specialized
stuff for various artists.

As for the sqlite stuff, do you think it'll be problematic if we just
switch to wal behind the scenes? right now journaling is off but in the
case that the data dir is on a network share, maybe we can give the
option
of changing the journaling system in the config?


Reply to this email directly or view it on GitHub<
https://github.com/rembo10/headphones/issues/645#issuecomment-21422958>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21426008
.

@nozn
Copy link

nozn commented Jul 23, 2013

Another thing that would go a long way to preventing the system from
getting overloaded is an event queue. Instead of spinning off a new thread
for new scans and user requests, push those kinds of events onto a queue
that processes things one at a time (e.g.
http://docs.python.org/2/library/sched.html ). You're already using a
scheduler for infrequent tasks, but every operation that modifies the db
could be funneled through a queue since there really isn't much that needs
to happen immediately.

The only downside I can think of would be that if the server went down,
every operation in the queue would be lost. But it's easy enough to persist
the queue somewhere, even a separate sqlite db file.

On Tue, Jul 23, 2013 at 11:27 AM, rembo10 notifications@github.com wrote:

Haha i'm just trying to cover my bases
On Jul 23, 2013 9:53 PM, "normzbig" notifications@github.com wrote:

I'm trying to understand the use case where someone runs their
headphones
service from files stored on a network share. Updating databases over
SMB
or NFS will result in corruption sooner or later. And I don't see
anything
wrong with requiring that everything in the headphones install dir,
including the db, be a local file. But sure, why couldn't it be an
advanced
option for folks who want to take the risk?

On Tue, Jul 23, 2013 at 10:37 AM, rembo10 notifications@github.com
wrote:

Oh yeah. I'll get a fix for that - there needs to be more specialized
stuff for various artists.

As for the sqlite stuff, do you think it'll be problematic if we just
switch to wal behind the scenes? right now journaling is off but in
the
case that the data dir is on a network share, maybe we can give the
option
of changing the journaling system in the config?


Reply to this email directly or view it on GitHub<
https://github.com/rembo10/headphones/issues/645#issuecomment-21422958>
.


Reply to this email directly or view it on GitHub<
https://github.com/rembo10/headphones/issues/645#issuecomment-21426008>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21426755
.

@theguardian
Copy link
Contributor

I've managed to successfully run headphones with MySQL instead of SQLite - making the absolute minimum number of code changes across the board. I did this because using phpmyadmin really helps with visualizing the database contents as the program runs to understand what's going on under the hood. I'm importing my library right now, and preliminary finding is that it takes just as long to run through the initial sync as it does with SQLite. The CPU doesn't seem to burn as hot throughout the process, but I could be mis-remembering. The picture included is my CPU load somewhere in the middle of this process.

mysql-initial

I should point out that I don't consider this out of the ordinary, as I expect that importing and matching 20,000 tracks, and downloading all the associated metadata from musicbrainz and last.fm will take some time on first run. Once this is complete, I'll try the "update active artists" command and see what I see.

In a perfect world, a regular update of the library should only take a handful of minutes to complete.

One thing that I did notice is that the "have" table gets emptied every time the library is scanned. As mentioned by normzbig, it's probably a good idea to save the directory tree somewhere after each scan with some sort of global "datetime last scanned" variable - then append/replace the "have" table with all files modified since the last scanned datetime. But even that is peanuts (time+CPU-wise) compared to the fact that all active artists/albums get updated wholesale with each "active artist" update or "library scan". Scanning the library into the "have" table is definitely not the bottleneck; artist/album updating is far more intensive. The latter should be avoided wherever possible.

To me, there are two relatively easy, near-term "bangs for the buck":
1.) "Update Active Artists" is hard-coded to be forced every 24 hours. That process on 600 active artists takes a whole day to complete. Which, in turn, causes the CPU to burn non-stop 24/7. Implementing a user-defined variable to run "update active artists" every week / two weeks / month would be extremely beneficial. (I can finally get rid of my headphones-restart-six-times-a-week cron jobs)
2.) I think that being able to "auto-pause" albums (for existing artists) with a release date older than X (say 3 months - this can probably be user-defined as well) would drastically improve the update process. After initial scan, of course. This could easily turn a 24-hour ordeal into a 15 minute housekeeping process.

@rembo10
Copy link
Owner

rembo10 commented Jul 24, 2013

I think youre right on all points. It's so messy. I'm gonna finish up
working on the torrent fixes then get my hands dirty with this.
On Jul 24, 2013 11:08 AM, "Justin Evans" notifications@github.com wrote:

I've managed to successfully run headphones with MySQL instead of SQLite -
making the absolute minimum number of code changes across the board. I did
this because using phpmyadmin really helps with visualizing the database
contents as the program runs to understand what's going on under the hood.
I'm importing my library right now, and preliminary finding is that it
takes just as long to run through the initial sync as it does with SQLite.
The CPU doesn't seem to burn as hot throughout the process, but I could be
mis-remembering. The picture included is my CPU load somewhere in the
middle of this process.

[image: mysql-initial]https://f.cloud.github.com/assets/2790499/846642/f81d5438-f41b-11e2-96c3-e671e08cace5.jpg

I should point out that I don't consider this out of the ordinary, as I
expect that importing and matching 20,000 tracks, and downloading all the
associated metadata from musicbrainz and last.fm will take some time on
first run. Once this is complete, I'll try the "update active artists"
command and see what I see.

In a perfect world, a regular update of the library should only take a
handful of minutes to complete.

One thing that I did notice is that the "have" table gets emptied every
time the library is scanned. As mentioned by normzbig, it's probably a good
idea to save the directory tree somewhere after each scan with some sort of
global "datetime last scanned" variable - then append/replace the "have"
table with all files modified since the last scanned datetime. But even
that is peanuts (time+CPU-wise) compared to the fact that all active
artists/albums get updated wholesale with each "active artist" update or
"library scan". Scanning the library into the "have" table is definitely
not the bottleneck; artist/album updating is far more intensive. The latter
should be avoided wherever possible.

To me, there are two relatively easy, near-term "bangs for the buck":
1.) "Update Active Artists" is hard-coded to be forced every 24 hours.
That process on 600 active artists takes a whole day to complete. Which, in
turn, causes the CPU to burn non-stop 24/7. Implementing a user-defined
variable to run "update active artists" every week / two weeks / month
would be extremely beneficial. (I can finally get rid of my
headphones-restart-six-times-a-week cron jobs)
2.) I think that being able to "auto-pause" albums (for existing artists)
with a release date older than X (say 3 months - this can probably be
user-defined as well) would drastically improve the update process. After
initial scan, of course. This could easily turn a 24-hour ordeal into a 15
minute housekeeping process.


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21464808
.

@krohrsb
Copy link

krohrsb commented Jul 25, 2013

My headphones only really hammers my CPU when it goes to update my 119 active artists. It pretty much maxes out my cpu for hours (4+). I suppose i should go and disable some artists if i can to lessen the load.

What property determines this update interval? Is it the 'library scan' interval? Should i be seeing this take so long and hurt so much?

Note, i'm running my own musicbrainz mirror on the same machine (its resource consumption is almost minimal).

@nozn
Copy link

nozn commented Jul 26, 2013

I'm thinking that a good way to resolve this issue is to reduce artist
refreshes to an absolute minimum. Rather than allowing a refresh to be
triggered simply because an artist's dir is scanned, why now set an
individual schedule for each one and have it based on the last update. No
sense in hammering a musicbrainz server getting artist and track info for
every artist every day when 99.99+% of all queries are going to return the
same data as yesterday! I mean how often does new music come out? Even top
40 artists spread out their single releases by weeks or months, and timing
between albums go even longer. In some cases we even know when the next
release is scheduled months in advance, so we wouldn't need to look for
anything ahead of that except perhaps checking for a single or two.

If they're releasing new remixes every month, maybe headphones can look for
new material once a week. But if, historically, they've released something
only once a year, or have been inactive for 2 decades, checking once a
month ought to be sufficient. Certainly something that would need tweaking,
and it would probably need a setting to indicate how aggressive headphones
should be in seeking fresh artist info.

I'm sure we could come up with a simple formula that, based on the data
gathered in the initial download from MusicBrainz, would rate how prolific
an artist is and how likely it is that a release could be coming in the
next month. The artist table could have a rating column used to calculate
the next backoff period, the timestamp of the last refresh, and for easy
reference the next scheduled refresh time. Then periodically headphones
would query the artists table looking for only those artists whose next
refresh time has passed.

Thoughts?

On Thu, Jul 25, 2013 at 5:15 PM, Kyle Brown notifications@github.comwrote:

My headphones only really hammers my CPU when it goes to update my 119
active artists. It pretty much maxes out my cpu for hours (4+). I suppose i
should go and disable some artists if i can to lessen the load.

What property determines this update interval? Is it the 'library scan'
interval? Should i be seeing this take so long and hurt so much?

Note, i'm running my own musicbrainz mirror on the same machine (its
resource consumption is almost minimal).


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21588830
.

@rembo10
Copy link
Owner

rembo10 commented Jul 26, 2013

Last I heard was that musicbrainz is going to add in a "last modified"
element for artists. We can then just check that daily or whatever and
reduce the calls by like 95%. Seems like the best option... But I'm gonna
work on cleaning up that code in the meantime to reduce the # of database
commits.
On Jul 26, 2013 9:38 AM, "normzbig" notifications@github.com wrote:

I'm thinking that a good way to resolve this issue is to reduce artist
refreshes to an absolute minimum. Rather than allowing a refresh to be
triggered simply because an artist's dir is scanned, why now set an
individual schedule for each one and have it based on the last update. No
sense in hammering a musicbrainz server getting artist and track info for
every artist every day when 99.99+% of all queries are going to return the
same data as yesterday! I mean how often does new music come out? Even top
40 artists spread out their single releases by weeks or months, and timing
between albums go even longer. In some cases we even know when the next
release is scheduled months in advance, so we wouldn't need to look for
anything ahead of that except perhaps checking for a single or two.

If they're releasing new remixes every month, maybe headphones can look
for
new material once a week. But if, historically, they've released something
only once a year, or have been inactive for 2 decades, checking once a
month ought to be sufficient. Certainly something that would need
tweaking,
and it would probably need a setting to indicate how aggressive headphones
should be in seeking fresh artist info.

I'm sure we could come up with a simple formula that, based on the data
gathered in the initial download from MusicBrainz, would rate how prolific
an artist is and how likely it is that a release could be coming in the
next month. The artist table could have a rating column used to calculate
the next backoff period, the timestamp of the last refresh, and for easy
reference the next scheduled refresh time. Then periodically headphones
would query the artists table looking for only those artists whose next
refresh time has passed.

Thoughts?

On Thu, Jul 25, 2013 at 5:15 PM, Kyle Brown notifications@github.comwrote:

My headphones only really hammers my CPU when it goes to update my 119
active artists. It pretty much maxes out my cpu for hours (4+). I
suppose i
should go and disable some artists if i can to lessen the load.

What property determines this update interval? Is it the 'library scan'
interval? Should i be seeing this take so long and hurt so much?

Note, i'm running my own musicbrainz mirror on the same machine (its
resource consumption is almost minimal).


Reply to this email directly or view it on GitHub<
https://github.com/rembo10/headphones/issues/645#issuecomment-21588830>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21600353
.

@rembo10
Copy link
Owner

rembo10 commented Jul 31, 2013

Can you guys try the latest version? It has the write-ahead logging mode enabled for the db

Thanks

@rembo10
Copy link
Owner

rembo10 commented Jul 31, 2013

This is just a quick fix solution - working on the heavy db stuff in the meantime

@nozn
Copy link

nozn commented Aug 5, 2013

Indexing helps a bit too. I added some query logging and then counted up
the instances of each query and got this:

3785 headphones.db: SELECT TrackID, ReleaseID, AlbumID from alltracks
WHERE TrackID=? AND ReleaseID=?
1597 headphones.db: SELECT TrackTitle from tracks WHERE ArtistID=? AND
Location IS NOT NULL
1597 headphones.db: SELECT TrackTitle from have WHERE ArtistName like ?
1302 headphones.db: SELECT TrackID, ReleaseID, AlbumID from tracks
WHERE TrackID=? AND ReleaseID=?
1302 headphones.db: SELECT TrackID, ReleaseID, AlbumID from tracks
WHERE ReleaseID=? AND TrackTitle=?
1302 headphones.db: SELECT TrackID, ReleaseID, AlbumID from alltracks
WHERE ReleaseID=? AND TrackTitle=?
1302 headphones.db: SELECT TrackID, AlbumTitle from alltracks WHERE
TrackID=? AND AlbumTitle LIKE ?
1184 headphones.db: SELECT TrackID, AlbumTitle from tracks WHERE
TrackID=? AND AlbumTitle LIKE ?
1184 headphones.db: SELECT ArtistName, AlbumTitle, TrackTitle from
alltracks WHERE ArtistName LIKE ? AND AlbumTitle LIKE ? AND TrackTitle LIKE
?
1160 headphones.db: SELECT TrackID from alltracks WHERE TrackID=?
1160 headphones.db: SELECT CleanName from tracks WHERE CleanName LIKE ?
1160 headphones.db: SELECT CleanName from alltracks WHERE CleanName
LIKE ?
1159 headphones.db: SELECT ArtistName, AlbumTitle, TrackTitle from
tracks WHERE ArtistName LIKE ? AND AlbumTitle LIKE ? AND TrackTitle LIKE ?
1124 headphones.db: SELECT TrackID from tracks WHERE TrackID=?
569 headphones.db: SELECT Location, BitRate, Format from have WHERE
TrackID=?
569 headphones.db: SELECT Location, BitRate, Format from have WHERE
CleanName=?
569 headphones.db: SELECT Location, BitRate, Format from have WHERE
ArtistName LIKE ? AND AlbumTitle LIKE ? AND TrackTitle LIKE ?

Then added indexes:

CREATE INDEX alltracks_albumtitle on alltracks( albumtitle collate nocase );
CREATE INDEX alltracks_cleanname on alltracks( cleanname collate nocase );
CREATE INDEX alltracks_tracktitle on alltracks( tracktitle collate nocase );
CREATE INDEX alltracks_releaseid on alltracks( releaseid );
CREATE INDEX alltracks_trackid on alltracks( trackid );

CREATE INDEX tracks_albumtitle on tracks( albumtitle collate nocase );
CREATE INDEX tracks_cleanname on tracks( cleanname collate nocase );
CREATE INDEX tracks_tracktitle on tracks( tracktitle collate nocase );
CREATE INDEX tracks_artistid on tracks( artistid );
CREATE INDEX tracks_releaseid on tracks( releaseid );

CREATE INDEX have_trackid on have( trackid );
CREATE INDEX have_cleanname on have( cleanname collate nocase );
CREATE INDEX have_artist on have( artistname collate nocase );

On Wed, Jul 31, 2013 at 6:54 AM, rembo10 notifications@github.com wrote:

This is just a quick fix solution - working on the heavy db stuff in the
meantime


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21856496
.

@nozn
Copy link

nozn commented Aug 5, 2013

And this one:

CREATE INDEX artists_artistid on artists( artistid );

Which is used by the repetitive query to update havetracks.

On Mon, Aug 5, 2013 at 7:36 AM, Norm Zbig normzbig1@gmail.com wrote:

Indexing helps a bit too. I added some query logging and then counted up
the instances of each query and got this:

3785 headphones.db: SELECT TrackID, ReleaseID, AlbumID from alltracks
WHERE TrackID=? AND ReleaseID=?
1597 headphones.db: SELECT TrackTitle from tracks WHERE ArtistID=? AND
Location IS NOT NULL
1597 headphones.db: SELECT TrackTitle from have WHERE ArtistName like ?
1302 headphones.db: SELECT TrackID, ReleaseID, AlbumID from tracks
WHERE TrackID=? AND ReleaseID=?
1302 headphones.db: SELECT TrackID, ReleaseID, AlbumID from tracks
WHERE ReleaseID=? AND TrackTitle=?
1302 headphones.db: SELECT TrackID, ReleaseID, AlbumID from alltracks
WHERE ReleaseID=? AND TrackTitle=?
1302 headphones.db: SELECT TrackID, AlbumTitle from alltracks WHERE
TrackID=? AND AlbumTitle LIKE ?
1184 headphones.db: SELECT TrackID, AlbumTitle from tracks WHERE
TrackID=? AND AlbumTitle LIKE ?
1184 headphones.db: SELECT ArtistName, AlbumTitle, TrackTitle from
alltracks WHERE ArtistName LIKE ? AND AlbumTitle LIKE ? AND TrackTitle LIKE
?
1160 headphones.db: SELECT TrackID from alltracks WHERE TrackID=?
1160 headphones.db: SELECT CleanName from tracks WHERE CleanName LIKE ?
1160 headphones.db: SELECT CleanName from alltracks WHERE CleanName
LIKE ?
1159 headphones.db: SELECT ArtistName, AlbumTitle, TrackTitle from
tracks WHERE ArtistName LIKE ? AND AlbumTitle LIKE ? AND TrackTitle LIKE ?
1124 headphones.db: SELECT TrackID from tracks WHERE TrackID=?
569 headphones.db: SELECT Location, BitRate, Format from have WHERE
TrackID=?
569 headphones.db: SELECT Location, BitRate, Format from have WHERE
CleanName=?
569 headphones.db: SELECT Location, BitRate, Format from have WHERE
ArtistName LIKE ? AND AlbumTitle LIKE ? AND TrackTitle LIKE ?

Then added indexes:

CREATE INDEX alltracks_albumtitle on alltracks( albumtitle collate nocase
);
CREATE INDEX alltracks_cleanname on alltracks( cleanname collate nocase );
CREATE INDEX alltracks_tracktitle on alltracks( tracktitle collate nocase
);
CREATE INDEX alltracks_releaseid on alltracks( releaseid );
CREATE INDEX alltracks_trackid on alltracks( trackid );

CREATE INDEX tracks_albumtitle on tracks( albumtitle collate nocase );
CREATE INDEX tracks_cleanname on tracks( cleanname collate nocase );
CREATE INDEX tracks_tracktitle on tracks( tracktitle collate nocase );
CREATE INDEX tracks_artistid on tracks( artistid );
CREATE INDEX tracks_releaseid on tracks( releaseid );

CREATE INDEX have_trackid on have( trackid );
CREATE INDEX have_cleanname on have( cleanname collate nocase );
CREATE INDEX have_artist on have( artistname collate nocase );

On Wed, Jul 31, 2013 at 6:54 AM, rembo10 notifications@github.com wrote:

This is just a quick fix solution - working on the heavy db stuff in the
meantime


Reply to this email directly or view it on GitHubhttps://github.com//issues/645#issuecomment-21856496
.

@evtk
Copy link

evtk commented Sep 7, 2013

I'll be watching the development on this issue closely, because right now I have shut down headphones since refreshing the library is taking 100% of my CPU for days.

In the mean time: would a temporarily solution be to set all my artists to 'paused'? I don't mind if I don't get updates on new released albums.

thanks.

@theguardian
Copy link
Contributor

Hi rembo10, I just initiated a pull request to address this problem. I believe I’ve come up with an algorithmic solution to CPU-burn (and length of time) when updating active artists.

Was:
It took ~20 hours with 100% CPU load to update ~700 active artists because the program was constantly “upserting” information it found in MusicBrainz, requiring endless dB commits.

Is:
It now takes ~20 minutes with ~idle CPU load to update ~700 active artists. The trick was to change the program to only make dB commits when it finds deltas from what is provided by MusicBrainz. It also cleans the tables to make sure that there aren’t any extraneous entries left behind. All in all, I think this is a clean solution

Notes:

  • I’ve done a fair amount of regression testing – but not exhaustive, so I’m fairly confident this won’t nuke anybody’s database. However, you should back it up just in case.
  • The first run with this new algorithm will take a bit longer than it will on subsequent runs because it’s cleaning the database to remove extraneous entries (to reflect deletions in MusicBrainz)
  • This change will extremely lighten the load on hammering the MusicBrainz mirror.
  • I only touched mb.py (get_all_releases is now get_new_releases) and importer.py (addArtisttoDB)
  • The logger is moderately verbose because I wanted to know exactly what was going on through each step of the update process.
  • After looking at your code, I truly appreciate (more than ever) your efforts in putting this service together. Thanks for writing such a killer program.

Let’s get this bad boy merged! I’ll take a look at the library scanner next.

@krohrsb
Copy link

krohrsb commented Oct 1, 2013

Thanks @theguardian i've got my own fork and pulled in your changes. I'm in the process of doing an initial refresh now (which you said would take a bit longer). I'll then do another and see how it goes.

@lweijl
Copy link

lweijl commented Oct 31, 2013

What's the status on this issue? Headphones is starting to interfere with other processes (in a sense of using CPU which it shouldn't be using). These processes do not run when the load on the server is bigger then specified.

@theguardian
Copy link
Contributor

There's a current pull request to dramatically improve both the Update Active Artists & Library Sync CPU + Time issues. Rembo says this is the next change he wants to roll-in.

#1259

@ljunkie
Copy link

ljunkie commented Oct 31, 2013

I have been using your repo @theguardian -- it's been nice having my cpu back to do other things :)

@lweijl
Copy link

lweijl commented Nov 4, 2013

Thanks @theguardian (and @rembo10). Saw the ETA of two weeks from @rembo10, so will be waiting patienly for it.

@theguardian
Copy link
Contributor

I think we can close this issue.. I hope!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests