# 100% CPU utilization?



## Gene_mtl (Mar 16, 2012)

I just exported my first batch of images from LR4.  I export as 8-bit TIFFs for further play in my photo editing software (PSPv9).  I noticed that all 4 of my CPUs (Quad core) were being pegged at 100% utilization. Is this normal? Is there any way to limit the number of processors being used by Lightroom. This hogging of CPUs affects other programs I have running concurrently.  Never had this issue with LR2.

TIA,


----------



## clee01l (Mar 16, 2012)

Gene, this is (or can be) normal, especially with only 4GB RAM and a large batch of images to process, LR is multi threaded and wil utilize every core available and create threads until the thread limit is exhausted. This is not so much a LR shortcoming as it is a shortcoming of the Windows OS.  LR2 was 32-bit and probably core limited.

Why are you not using the Edit-in functionality to call PSP?  And you do mean PaintShopPro version 9, right?.  The Latest version is 14 BTW.  In my experience PSP has been a memory sieve, since it was bought by Corel in 2004.  I can't even begin to imagine how this 32 bit app might perform on Win7-64.


----------



## Gene_mtl (Mar 16, 2012)

Cletus:  PSPv9 = Paintshop Pro version 9 - the last version from Jasc.  I have never been happy with any of the Corel versions, thus I never upgraded after buying PSP X (Corel's first version), trying it and removing it from my computer. PSPv9 works fine on Win7 Pro 64 bit. Run in Win7 as XP compatible. (The OS automatically disables the Aero scheme to run it)  Had issues in LR2 with Edit-in with the Tiff PSPv9 returned was missing EXIF data. Cropping (which sucks big time in Lightroom) and JPG optimization are two significant (for me) reasons why I continue using PSPv9.  Plus the Digital Camera Noise (DCNR) removal tool is superior to just about any other noise removal tool I've used.

Don't quite understand your comment about this being typical with only 4 GB RAM.  RAM utilization never exceeded 50%.  (Tried upgrading to 8GB RAM recently and the memory was defective.  So am waiting delivery of replacement RAM)

FWIW, CPU utilization was never an issue in LR2.  

Anyways, thanks for the explanation.


----------



## Hal P Anderson (Mar 16, 2012)

Gene,

Are you actually seeing effects on other programs? I would have figured that LR would be better behaved than that. It's possible to max out all the cores but surrender them to any other process that needs CPU, and not all that hard to do.

You could try setting affinity for Lightroom in the task manager. Limit LR to two or three cores. I don't know if that is a permanent solution or if you'd have to take that step every time you know you'll run into the problem.

Hal


----------



## clee01l (Mar 16, 2012)

I think the solution until more RAM is available is to use Edit-In in smaller batches.  I had a dual core 3GB Win7-32 laptop and could easily peg the CPU with large export volumes in LR2.  I never exported large batch  JPEGs with the Laptop using LR3, but I never experienced any issues with Win7-64 quad core 8GB on my Desktop on LR2 or 3


----------



## Gene_mtl (Mar 16, 2012)

Hal P Anderson said:


> Are you actually seeing effects on other programs? I would have figured that LR would be better behaved than that. It's possible to max out all the cores but surrender them to any other process that needs CPU, and not all that hard to do.
> 
> You could try setting affinity for Lightroom in the task manager. Limit LR to two or three cores. I don't know if that is a permanent solution or if you'd have to take that step every time you know you'll run into the problem.


Thanks Hal.  Re: affecting other programs - yes. For example WinAmp (latest version) gets a bit start & stop-ish. Am not clear on where I would limit the number of cores used by Lightroom.  Any suggestion on where to look is appreciated.  As I mentioned in an earlier post, I never had this issue with LR2.



clee01l said:


> I think the solution until more RAM is available is to use Edit-In in smaller batches.  I had a dual core 3GB Win7-32 laptop and could easily peg the CPU with large export volumes in LR2.  I never exported large batch  JPEGs with the Laptop using LR3, but I never experienced any issues with Win7-64 quad core 8GB on my Desktop on LR2 or 3



Cletus: I am not doing an Edit-in, but rather Export as TIFF.  CPU usage on all 4 cores goes from 0 - 100% back to zero on each core, each time LR exports an image. The resource monitor shows CPU usages, as 0, 10, 20, 30 ... 80, 90 100, 0, then starts the cycle again.  Will be interesting if the issue goes away when I get that extra 4 GB RAM.  Again thanks.


----------



## clee01l (Mar 16, 2012)

Gene_mtl said:


> ...Cletus: I am not doing an Edit-in, but rather Export as TIFF.


 I think if you use Edit-in as is LR's intention, and use smaller batches, your CPU load will go down. That is all I am suggesting.


----------



## Gene_mtl (Mar 16, 2012)

Cletus: When I export, I am done with LR. Don't understand why I need to have them returned to LR.  Why would I want both the Cr2 & xmp file as well as a tiff stored in LR?  Sorry if I am being dense.


----------



## Jim Wilde (Mar 17, 2012)

From my point of view, I want to have the 'final version' of my images to hand in Lightroom. If I've processed my CR2s as best as I can in LR, then find I need to tweak a bit more in PS, I want the Tiff file back in LR stacked with the original.....as the original CR2 in this case is no longer the 'final version', the Tiff is. Then I can add the Tiff to my Publish Services in place of the CR2, so the 'final version' is what gets published.

If I do it your way, not only have I lost the ability to use the Publish Service, I have no way of knowing that a file in LR is in fact NOT 'final', and even worse the real 'final' now has to be managed independently of LR....which doesn't make sense to me. Obviously, your mileage does vary....

But getting back to your original point about CPU utilisation during Export. For a start, you need to know that Export is a heavy user of CPU cycles....if I try an export on my ancient creaking laptop, the CPU is completely flat-lined at 100% for the 20+seconds it takes to export one of my 21mp files. My desktop, OTOH, was configured with Lightroom in mind almost 2 years ago, and to date I've not been able to flat-line it across all 8 threads. Last year I did some export timing tests, and this produced a Task Manager readout like this:




All cores busy, but still capacity there. Conclusion at the time was that my I/O system was the bottleneck, not being able to feed data quickly enough to max out the CPUs. Average export time in this particular example was 3.25 seconds per file.

Fast forward to LR4, and a similar export run produced this:



Still not red-lined, but certainly more CPU activity than with LR3. Well, the disk system is the same as last year, so conclusion is that an export under LR4 takes more effort....whether that's a result of the different PV or code inadequacies will no doubt become apparent later. Average export time per file increased to 4.1 seconds.

Borrom line is that I would expect your CPU activity to be at or near 100% during export, that's the nature of the beast at the moment. If you want to peg LR to 2 or 3 cores, simply start Task Manager while LR is running, click on the Processes tab, right-clcik on lightroom.exe and select "Set Affinity". Proceed as required to pin LR to specific cores. Note this only works on a per session basis.


----------



## Hal P Anderson (Mar 17, 2012)

Gene,

With LR running, open Windows Task Manager, go to the Processes page, right-click on Lightroom.exe and choose Set Affinity:



You'll get a dialogue box something like this:



Turn off a couple of cpu's to free them up for other apps. I tested this, and it isn't sticky between runs, so you'll have to do it each time that it's important to you.

Hal


----------



## Gene_mtl (Mar 17, 2012)

TNG said:


> Bottom line is that I would expect your CPU activity to be at or near 100% during export, that's the nature of the beast at the moment. If you want to peg LR to 2 or 3 cores, simply start Task Manager while LR is running, click on the Processes tab, right-click on lightroom.exe and select "Set Affinity". Proceed as required to pin LR to specific cores. Note this only works on a per session basis.



Thanks, Jim, for the info on how to manipulate the task manager to restrict LR4 to less then my 4 cores.  I treat the cr2 files as my negatives, and they are kept on my main HDD with exact copies kept on a secondary HDD as well as DVDs.  Outputted files (including any tweaks) are also kept on main HDD, secondary HDD, DVDs as well as online. Have never been able to obtain in LR the results I can achieve outside, thus would never publish from it. When the day comes that I do learn enough to actually produce a version I do like, then maybe I'll change my workflow.

Many thanks to Hal, Cletus & Jim for helping this newbie.  I really appreciate you guys sharing.


----------



## Gene_mtl (Mar 17, 2012)

Hal P Anderson said:


> With LR running, open Windows Task Manager, go to the Processes page, right-click on Lightroom.exe and choose Set Affinity:
> 
> Turn off a couple of cpu's to free them up for other apps. I tested this, and it isn't sticky between runs, so you'll have to do it each time that it's important to you.



Was in reply mode when you posted this. Thanks again for the help.


----------



## ukbrown (Mar 17, 2012)

Best idea IMHO is to set an export running and go and have a cuppa and some nice dunking biscuits.  

Halving the CPU's=takes twice as long to export

Putting in more RAM should drive CPU higher not lower.  The more you can feed your CPU with Data the more work they can do.  If you only had 1GB of RAM there would be a lot of disk activity which is slow and your CPU would be waiting for the data to be fetched.

Your system like mine which is a only a quad core is constrained by the number of CPU's, lightroom is very efficent at running on multiple CPU's.

If you had a 5 litre v8 would you turn it into a 2.5 litre v4


----------



## Gene_mtl (Mar 17, 2012)

ukbrown said:


> Best idea IMHO is to set an export running and go and have a cuppa and some nice dunking biscuits.
> 
> Halving the CPU's=takes twice as long to export



Agree.  I was just surprised by how differently version 4 behaved compared to version 2.




> If you had a 5 litre v8 would you turn it into a 2.5 litre v4



Might to save money on Gas. <Grin>  Thanks for commenting.


----------



## Jim Wilde (Mar 17, 2012)

Gene_mtl said:


> Agree.  I was just surprised by how differently version 4 behaved compared to version 2.



One of the problems is the double jump from LR2 to LR4. Going from LR2 to LR3 there was a definite performance impact (presumably the change from PV2003 to PV2010), and that story (for the moment) has repeated itself going from LR3 (PV2010) to LR4 (PV2012). 

Users such as myself only see the latest 'hit', whereas you've got the double whammy, so things are likely to seem worse for you than they do for me. 

Doesn't help much, does it?


----------



## Gene_mtl (Mar 17, 2012)

TNG said:


> Doesn't help much, does it?



Actually it helps a lot, especially because of my double jump. It is nice to know it is not always me screwing things up. <Smile>


----------



## bobthecameraman (Mar 16, 2013)

Hi!  Please see the attached picture.  This works like a charm for me!  The computer now works as smooth as butter during EXPORT.  PROCESSOR use doesn't go over about 52% now.  Grant it, I haven't tied other operations in Lightroom yet, but I don't think I will have a problem.


----------



## ukbrown (Apr 7, 2013)

LR takes longer to export ??.  Bit swings and roundabouts for me.  I just used to go and make a cup of tea _


----------



## Allan Olesen (Apr 7, 2013)

First of all: It is not an error that Lightroom uses a lot of CPU. I would be much worse if Lightroom were not able to utilize the CPU fully so we had to buy a more powerful computer to finish a task in the same amount of time. But yes, it can be annoying when a background task steals CPU from a foreground task.

Anyway, not allowing Lightroom to use all cores is a very bad idea. That way one is certain that the export is taking longer, even if no other programs are running. 

It is much better to give the Lightroom process a lower priority in Task Manager (just above the Affinity menu item in the screen dumps above). 

That way Lightroom can use all the remaining CPU power when other programs have used what they need. I often do this myself when doing Lightroom imports or exports in the background, and it really increases the responsiveness of other programs while only increasing the time of that Lightroom task with a few percent.

I am too lazy to make an official feature request for this, but I think that Adobe should implement an automatic lower priority to threads for background tasks like import, export and preview generation.


----------



## ukbrown (Apr 7, 2013)

Would you play a game and lower the priority of the app so you could word process at the same time, not a good example I know.

I just cannot see the point of changing the priority, except maybe when exporting, but I'd still go and make a cup of tea and just let it finish, in the quickest time possible!!!!

As for lowering the priority of import, do I really want to have to wait longer before I can edit, I think not.

A faster PC is the way to go


----------



## Allan Olesen (Apr 7, 2013)

In other words: You are going to do something else while you wait for Lightroom to finish. In your specific case, "something else" does not involve your computer. I don't consider that action pointless.

I am also going to do something else while I wait for Lightroom to finish. In my specific case, "something else" does involve my computer. Apparently you consider this action pointless.


----------



## ukbrown (Apr 7, 2013)

Definitely sounds like you need a faster computer, based on the fact that it is busy 100% of the time.  Changing priorities is bad as the palatalization of the tasks under the conditions of 100% CPU will be no faster than if the tasks were serialized.  So chill out and make a cup of tea is what I used to do, but I now have a much faster computer that LR can't get to more than 57% CPU on an export.


----------



## Allan Olesen (Apr 8, 2013)

Have you tried lowering the priority, or are you just guessing? I have tried it, and there is no significant reduction in total processing time. Other programs just get much more responsive, stealing a bit of CPU from Lightroom in the short time they need it when there is user action.

And why would a faster computer help? Lightroom would still try to use as much as possible of the computer't processing power until it hits a bottle neck.


----------



## ukbrown (Apr 10, 2013)

Faster computer will help because the bottleneck quite possibly is no longer the CPU


----------

