Bug 296768 - when creating thumbnails, digiKam uses 80% CPU - quadcore 3800, 9GB RAM
Summary: when creating thumbnails, digiKam uses 80% CPU - quadcore 3800, 9GB RAM
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Thumbs-Engine (show other bugs)
Version: 2.5.0
Platform: Ubuntu Other
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-25 18:40 UTC by Axel Krebs
Modified: 2018-08-23 08:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Krebs 2012-03-25 18:40:53 UTC
User-Agent:       
Build Identifier: 

when creating my thumbnail database, digikam sucks about 80% power on a fast quadcore (9 GB RAM)- why?

This seems to be heavily wrong- can someone help to turn my machine operatable again??

Reproducible: Always

Steps to Reproduce:
1. just start Extras -> "alle Vorschaubilder neu erzeugen"
2.
3.


Expected Results:  
should run even in backround with loading under 10-20 %!

If someone need further info, please let me know.

I take this for a sevre malfunction, as it limits regular operation on a strong machine unacceptable!
Comment 1 Francesco Riosa 2012-03-25 21:16:47 UTC
A modern linux should be very responsive with only 80% load, what it can make it slow is exceed memory and so start using swap or disk usage.
Anyway try:
ionice 3 nice digikam
to make it use only spare cpu and disk to see if help
Comment 2 caulier.gilles 2012-03-25 21:20:36 UTC
For me, this is not reproducible here (i5 computer). Cleaning all thumbnails DB, and rebuild it (250 Gb of images) do not break computer like this. It still suitable as well.

Gilles Caulier
Comment 3 Marcel Wiesweg 2012-03-26 19:39:22 UTC
I would see it as a bug if digikam only uses 20% for a CPU-intensive task - that means it does not use the available hardware.
Now thumbnail regeneration is older code, multithreaded but not prepared for multicore. In fact, there is only one thread. (code can be optimized by removing the need to generate a pixmap - this is only a toy for the progress dialog - and using the prepare... method).

So while I would like to see the thumbnail creation make use of all you four core, it cannot at the moment, and a load of 80% means load on all four cores. Which tool did you use to measure per-process or per-thread CPU use?
Comment 4 Axel Krebs 2012-03-26 20:02:57 UTC
Under Kubuntu 11.10, I use system Monitor, showing only "CPU". It
appears to be an average value of the overall load.

If possible, I´d linke to provide more detailed information- just don´t
know, how.

Axel

Am 26.03.2012 21:39, schrieb Marcel Wiesweg:
> https://bugs.kde.org/show_bug.cgi?id=296768
> 
> --- Comment #3 from Marcel Wiesweg <marcel.wiesweg@gmx.de> ---
> I would see it as a bug if digikam only uses 20% for a CPU-intensive task -
> that means it does not use the available hardware.
> Now thumbnail regeneration is older code, multithreaded but not prepared for
> multicore. In fact, there is only one thread. (code can be optimized by
> removing the need to generate a pixmap - this is only a toy for the progress
> dialog - and using the prepare... method).
> 
> So while I would like to see the thumbnail creation make use of all you four
> core, it cannot at the moment, and a load of 80% means load on all four cores.
> Which tool did you use to measure per-process or per-thread CPU use?
>
Comment 5 Axel Krebs 2012-03-26 20:05:27 UTC
Dilles:

what specific info do you need for reproducing?

By the way: what is "suitable" for your understanding? if you make one
single click and you have to wait for seconds before reaction- if any?


Axel

Am 25.03.2012 23:20, schrieb Gilles Caulier:
> https://bugs.kde.org/show_bug.cgi?id=296768
> 
> Gilles Caulier <caulier.gilles@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |caulier.gilles@gmail.com
> 
> --- Comment #2 from Gilles Caulier <caulier.gilles@gmail.com> ---
> For me, this is not reproducible here (i5 computer). Cleaning all thumbnails
> DB, and rebuild it (250 Gb of images) do not break computer like this. It still
> suitable as well.
> 
> Gilles Caulier
>
Comment 6 Axel Krebs 2012-03-26 20:06:30 UTC
Francesco,

what is "ionice 3 nice digikam"?

I have no idea. So sorry.


Axel
Am 25.03.2012 23:16, schrieb Francesco Riosa:
> https://bugs.kde.org/show_bug.cgi?id=296768
> 
> Francesco Riosa <francesco+kde@pnpitalia.it> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |NEEDSINFO
>                  CC|                            |francesco+kde@pnpitalia.it
>          Resolution|---                         |WAITINGFORINFO
> 
> --- Comment #1 from Francesco Riosa <francesco+kde@pnpitalia.it> ---
> A modern linux should be very responsive with only 80% load, what it can make
> it slow is exceed memory and so start using swap or disk usage.
> Anyway try:
> ionice 3 nice digikam
> to make it use only spare cpu and disk to see if help
>
Comment 7 Francesco Riosa 2012-03-26 20:20:08 UTC
(In reply to comment #6)
> Francesco,
> what is "ionice 3 nice digikam"?
> I have no idea. So sorry.

ionice - set or get process I/O scheduling class and priority
  (make the acces to the disk of a particular program wait for other processes finish their work)
nice - run a program with modified scheduling priority
  (make the usage of the cpu of a particular program wait for other processes to do their work)
basically composing the command like that digikam will be the last to use disk and cpu
you may need to install them and to launch digikam from the command line (a shell)

Axel, this very much seem a system problem, more than a digikam problem.
you may be more lucky in the ubuntu forums, possibly
http://ubuntuforums.org/forumdisplay.php?f=331

try asking there specifying the kubuntu version, the file system used for /home, maybe the digikam version, and other programs which are running at the same time
Comment 8 caulier.gilles 2018-08-23 08:45:52 UTC
Not reproducible with 6.0.0