Forum

Author Topic: 100% CPU for minutes after loading heavy project  (Read 7374 times)

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
100% CPU for minutes after loading heavy project
« on: June 26, 2021, 02:47:18 AM »
I have a big project with 13,000 cameras and a mesh of 50,000,000 faces...

When i load it, my laptop shows it pretty quick, bit it then continues with 100% CPU usage for many minutes, leaving any interaction with the model really sluggish.  After a while it subsides, and then works just fine.

I have noticed that if i switch to a decimated mesh of 3,000,000 faces, it subsides quicker, but then switching back, it starts running at 100% again until it later subsides...

What is Metashape doing during this time?
All functionality is otherwise working, just sluggish.

Using Metashape Standard Version 1.7.3 build 12473 (64 bit) with 64GB of ram.  Of which, only 12GB is being used, total.
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15086
    • View Profile
Re: 100% CPU for minutes after loading heavy project
« Reply #1 on: July 01, 2021, 01:26:14 AM »
Hello CheeseAndJamSandwich,

Do you have a dedicated GPU available on your system? If it is quite powerful, I would suggest to enable VBO option in the Advanced Preferences tab of Metashape window and set VRAM to 2-3 GB value.

Also if you are regularly working with high-poly models, it may be reasonable to switch the Default View option in the General Preferences tab to Point cloud in order to avoid automatic mesh model display on project load.
Best regards,
Alexey Pasumansky,
Agisoft LLC

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: 100% CPU for minutes after loading heavy project
« Reply #2 on: July 01, 2021, 12:04:16 PM »
Thanks for your reply,

Yes, i have an 'old' Quadro 2200M in my Thinkpad P51.

What is Metashape actually doing in the background though??? It looks and works fine other than being understandably sluggish.  What's it processing/checking???
It was taking about 15 minutes before it calmed down.  And was in fact the same, for the original mesh or the decimated mesh.

I'll give the VBO setting a try.

Does changing the ram value affect processing of alignment, mesh, texture?  My GPU only has 4GB of VRAM.

Cheers.
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: 100% CPU for minutes after loading heavy project
« Reply #3 on: July 03, 2021, 02:04:38 PM »
OMG...

Enabling VBO makes a huuuuuuuuuuuuge difference!!!


Viewing my model in shaded mode now makes it feel really, really light!!  Even tho it's got 92,000,000 faces!  :o 8)

The CPU is still slammed to 100% for more than 15 minutes after loading, but the model is super responsive even then.

I've set the VBO to 2048MB for my 4GB Quadro 2200M.  Hope that's correct?
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: 100% CPU for minutes after loading heavy project
« Reply #4 on: October 15, 2021, 09:46:07 AM »
I'm still plagued by the 10-15 minute 100% CPU load slowing everything to snails pace after switching to my 'heavy' shaded or textured models...
VBO also now doesn't seem to give me ability to manipulate the models freely any more either... strange...  It's really heavy now.


Alexey, can you please give us incite to what MS is doing when loading these models, to cause the very long 100% CPU load??/
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

Bzuco

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Re: 100% CPU for minutes after loading heavy project
« Reply #5 on: October 15, 2021, 10:15:38 AM »
+1

I also noticed this behavior. When I checked resource monitor, MS just after opening project is reading all depth maps zip files from project sub folders. In my case <30s, 200 cameras and 8 core cpu.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15086
    • View Profile
Re: 100% CPU for minutes after loading heavy project
« Reply #6 on: October 15, 2021, 11:46:03 AM »
Hello CheeseAndJamSandwich and Bzuco,

Which version of Metashape you are currently using?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Bzuco

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Re: 100% CPU for minutes after loading heavy project
« Reply #7 on: October 15, 2021, 12:08:52 PM »
The latest 1.7.5 13229. In atachment how it looks after opening. Second chunk is active in tie points view mode.
The same behavior in previous 1.7.4 13028 and older.

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: 100% CPU for minutes after loading heavy project
« Reply #8 on: October 15, 2021, 04:09:18 PM »
Same, the very latest, Metashape Standard 1.7.5 13229

The 100% CPU load triggers when loading, when i change 3D Models, or if i change view to Model Shaded, etc...
I don't observe much disk activity.  Just 100% CPU
Does MS need to do what it's doing at this time???  The 3D model, etc. loads really quick and moves around... Could it do this task at a lower priority, or do it later when needed by a dependant task?  Can there be an option to 'Defer loading _____' (whatever it is), so we're not bogged down by it unnecessarily?

Project loaded:
Photos: 12MP GoPro Hero7 & 8
Cameras: 10,695/10842 Aligned
Tie Points: 8,633,400
Depth Maps: 10,635, Medium Quality, Mild Filtering
3D Model: 135,950,069 faces, Medium quality
3D Model: 5,699,999 faces, Medium quality (decimated for Sketchfab)

See the attached screenshot...
The traces from XTU show the 15 minutes of 100% when i loaded the above model.
The decimated model was 'default'.
I've just changed the default to the original full model and it's triggered the 100% CPU, as expected...
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: 100% CPU for minutes after loading heavy project
« Reply #9 on: October 15, 2021, 04:27:25 PM »
This screenshot shows the the previous loading of the project, and then a few minutes later, me switching the default model from the decimated one, to the original 'heavy' 3D model.
Nothing else is being done.

This happens every time.
Project size does change the time at 100% though.
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: 100% CPU for minutes after loading heavy project
« Reply #10 on: October 31, 2021, 01:27:19 PM »
This 100% CPU on load/switching models is killing me...  It's fine once it's loaded... runs sweet... until you switch models...
20 minutes of 100%... each time....

Please Alexey...
Can you give us some insight as to what this is?
It doesn't seem to be related to displaying/moving the models themselves, so why is it needed?
Could this task be run on a lower priority thread, so that it doesn't kill the system so much?
Is it a bug, or a feature that's being worked on, changed, that will be rectified in a future release?
I don't understand why it can otherwise load up great, allow for the models to be viewed fully, moved around (sluggishly, obviously), and all functionality looks to be available...  Yet it continues to stay at 100% for 20+ minutes.  It just seems like it's not doing anything that Metashape needs to be done.....???
Or can't it do this work later when it's actually needed by one of the commands that demands it???  At least it won't be killing the system EVERY time we load a big model, or EVERY time you switch to different models within the project...

This is making it difficult to work with.
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: 100% CPU for minutes after loading heavy project
« Reply #11 on: November 01, 2021, 10:19:09 AM »
+1

I also noticed this behavior. When I checked resource monitor, MS just after opening project is reading all depth maps zip files from project sub folders. In my case <30s, 200 cameras and 8 core cpu.
I just dug out procmon and indeed, you are correct, it's reading every single depth map zip file...
My model has 11108 depth maps, in 295 zip files, taking up 13.5GB of space.

EDIT:  It's also reading the thumbnails.zip file too...  At the same time, there's a bunch of depth maps reads, then a bunch of thumbnails.zip reads...  It's not doing one then the other...
EDIT 2: The above edit was with 1.7.3...  Now i'm running 1.7.5, and it is not mixing in the reading of the thumbnails.zip, only a quick read of that right at the start of the load, then it turns to only reading all of the depth maps zips...  So as idicated by Alexey's comment in the following thread, they addressed the thumbnails loading problem...  But they don't seem to have addressed the depth maps reading problem addressed here...
https://www.agisoft.com/forum/index.php?topic=13298.msg60439#msg60439


So, I've deleted the depth maps from the project, saved it as a copy, and now it loads up just fine!
No lingering 100% CPU.

I guess i just continue deleting the depth maps after the mesh it generated...  Not sure i do any further steps that will require them.

Alexey.
Does Metashape really need to scan every single depth map zip file after launch?
Does it need to scan them after we change from one 3D model to another?
This seems unnecessary...  A bug?
« Last Edit: November 01, 2021, 10:57:57 AM by CheeseAndJamSandwich »
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

Guilhem

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: 100% CPU for minutes after loading heavy project
« Reply #12 on: January 13, 2022, 11:45:19 AM »
Same issue with v1.7.5... Metashape consumes >90% of CPU all the time, even though it is not doing anything nor ready data (disk 0%). I have a project with two chunks or 1500-2000 HD pictures, nothing spectacular compared to what I am used to process with Metashape. And once again, Metashape is supposedly not doing anything...
Any clue about this weird CPU consumption with this version ?

Guilhem

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: 100% CPU for minutes after loading heavy project
« Reply #13 on: January 13, 2022, 12:21:11 PM »
Upgrading to v1.8.0 solved the problem !
I'll have at least learnt the VBO option and default loading of the point cloud rather than the heavy model (which has always been a problem for me), thanks !