Puget Systems print logo
Read this article at https://www.pugetsystems.com/guides/1735
Article Thumbnail

Metashape 1.6.1: Running Simultaneous Instances

Written on April 29, 2020 by William George


In our past testing of Metashape, we have found that it only effectively uses around 8-16 cores. More than that doesn't help, and so the focus for best performance is on high clock speeds within that range. What if you were running multiple photogrammetry jobs at the same time, though? Would that end up better utilizing a high core count processor? We did just that to find out.

AMD Threadripper 3990X Running Agisoft Metashape

As a first foray into running multiple instances of an application in our testing, we started small on the software side but big on the CPU - using AMD's Threadripper 3990X. This 64-core beast certainly has enough threads to run two (and maybe more) instances of Metashape at the same time, and also supports enough RAM to make sure that we weren't limiting performance on that side.

Test Hardware

Here is a list of the hardware components that made up the test configuration, along with the OS and application versions we used:

Test Platform
CPU AMD Threadripper 3990X
CPU Cooler Noctua NH-U14S TR4-SP3
Motherboard Gigabyte TRX40 AORUS Pro WiFi
RAM 8x DDR4-2933 16GB (128GB total)
Video Card 2x NVIDIA GeForce RTX 2080 Ti 11GB
Hard Drive Samsung 970 Pro 1TB
Software Windows 10 Pro 64-bit
Windows 10 Pro for Workstations 64-bit
Metashape 1.6.1

Benchmark Details

For testing photogrammetry applications we now have four image sets that we own the rights to, covering both smaller and larger size Model and Map projects. All of these image sets are available in our public Metashape benchmarks, split up to allow quick or extended tests, which you can download and run if you want to compare your system's performance to what we measured for this article.

  • Rock Model - A small model project taken with a smartphone camera at 20 megapixels
  • School Map - A small drone mapping project using photos that are 18 megapixels each
  • School Model - A medium size model using images that are each 18 megapixels
  • Park Map - A large drone-captured map project with photos that are 18 megapixels each

Given the focus of this article, however, I opted to use only the larger two image sets. I wanted the processing time to be long enough to ensure good results, and to really demonstrate whether this attempt to improve performance is effective. I found that the public version of our benchmark, available at the link above, worked better with two instances going at the same time than our internal tool. That test was run in two configurations:

  • One instance by itself, with the full power of the system available to it (all 64 cores, with SMT disabled as it doesn't help this application, 128GB of RAM, and dual GPUs)
  • Two instances running at the same time, but sharing system resources (each instance of Metashape was specifically assigned one of the two video cards in the Preferences -> GPU menu)

Benchmark Results

Here is a gallery showing the results, in seconds, for processing each image set by itself ("single project") as well as the longer of the two times from our concurrent testing ("parallel"). I also included a third result, which is just the single project time doubled up to show how long it would have taken to process it twice back to back ("serial") instead of at the same time.

Here is the same info, but shown as a percentage of time taken compared to the single project by itself:


The results speak for themselves, and are quite impressive! Yes, it takes 10-26% longer to process two projects simultaneously on this system compared to one by itself... but if you have multiple projects to work on, that is a much more efficient approach than processing them just one at a time. This may well extend further, beyond just two instances of Metashape - but multitasking like this would eventually be limited by either the CPU core count, RAM capacity, or number of video cards within a single workstation.

Can you run multiple instances of Metashape at the same time?

Yes, you can - at least with the Metashape Professional license we have access to. It is worth noting that you cannot control how many CPU cores or how much RAM Metashape will use, at least from within the application, but you can select which GPU(s) are to be used. Out of an abundance of caution, and until I can test things further, I would advise setting each instance to run on a different GPU.

Is running multiple instances of Metashape a good idea?

That depends on your hardware and workflow. If you have a lot of projects that you could process at the same time, and a system with >16 cores, at least twice the amount of RAM you need for a single project, and multiple video cards - then yes, this is a way to improve overall performance. If you don't have a backlog of projects, though, or if your PC isn't that powerful, then I would stick to one at a time.

Closing Thoughts

Despite this experiment having been quite a success, I am not sure how widespread the need for running multiple photogrammetry projects at the same time really is. Our recommended systems are still set up with the expectation that folks will be processing one image set at a time, but if you know that you want to push beyond that just call or email our consultants and they can help tailor a more powerful system to your exact needs.

I would also love to hear in the comments below if this is something you have tried, or are interested in! If enough users want to go this direction, we could easily add a recommended system built for this - and potentially even do expanded testing on 3 or 4 instances at the same time.

Looking for a Metashape Workstation?

Puget Systems offers a range of poweful and reliable systems that are tailor-made for your unique workflow.

Configure a System!

Labs Consultation Service

Our Labs team is available to provide in-depth hardware recommendations based on your workflow.

Find Out More!
Tags: AMD, AMD Threadripper 3rd Gen, CPU, Multi-threading, Processor, photogrammetry, Metashape, Threadripper 3990X, Software

Thank you for this benchmark.
You are correct that most people would only run one project at a time.
However MetaShape has 2 functions which may allow people to take advantage of this parallel processing.

1. There is a script which can be downloaded which splits up the current project into smaller chunks which can be processed in parallel between multiple instances of MetaShape. At the end of the processing, the chunks can be combined into one. The script is called 'split_in_chunks_dialog.py'.
Based on your conclusions in this article, one job can certainly be split up using the mentioned script and processed in parallel processes.
Memory may not be that much of a concern since each smaller chunk will require less memory to process. I don't know how that scales (if each chunk is 1/2 the project does that mean 1/2 the ram usage??)

2. MetaShape has network processing capabilities. It would be interesting to see if multiple network clients can be started on the same physical machine and process multiple chunks at the same time.

There's more that could be benchmarked here. The gains in performance seem to be HUGE!
What hardware changes can you think of that would nearly double the processing performance?
I wonder how this scales to 3 instances... or 4 or 6 or 8 instances...

Posted on 2020-05-20 12:03:49

Thank you for that info about the splitting script, and suggesting the network idea. I knew Metashape had network capabilities, but had not considered that you might be able to run them on the same system! Both of those sound like they are worth investigating, so I will look into them further when I have some time (which may not be for a while, its kinda crazy right now). Thanks again, though :)

Posted on 2020-05-20 16:32:30

I don't know if you can run the network client and server on the same system... I was just suggesting it as an option to try.
Because the performance gains are so high, I will also do some testing and create a workflow to take advantage of this.
I will post back when I have a usable workflow.

Posted on 2020-05-21 13:00:03

Cool I look forward to hearing what you find! :)

Posted on 2020-05-21 23:03:51

Jup this totally works, we run a system like this, check out my other comment in this thread :)

Posted on 2020-06-22 16:25:22

Hey William M George we just bought a 3970X with 4 2080 super's with 256GB ram on which we run 4 instances of metashape that each process chunks in parallel through the network system as adrian described. We're doing dense cloud generation to align photogrammetry with lidar scans. The system has been up for a week now and it seems to work exactly as advertised. I just found this article, really cool to see you've confirmed the suspicions as well.

I was afraid of context switching overhead, so I configured each metashape instance to only run on a specific set of cores, this is called "affinity" in Windows and there's a trick you can do to set it up on application launch using a shortcut with the path configured like this:

C:\Windows\System32\cmd.exe /c start "Metashape Instance 1" /affinity FFFF "C:\Program Files\Agisoft\Metashape Pro\metashape.exe" --gpu_mask 1 --node --host localhost

I'm now thinking if we for our next system should get 8 GPU's in a dual socket EPYC configuration...

Posted on 2020-06-22 16:23:23

Nice job! I'm glad to hear that system is working well for you, and setting affinity like that is a solid idea. I would be a little cautious about going to Epyc, though - in my (admittedly very limited) experience with that platform it seems like per-core performance is a lot lower than Threadripper, presumably due to lower clock speeds. I'd probably go for two more systems like the one you have now, rather than trying to combine them into a single system... but if you do go for it, I'd love to hear what you think :)

Posted on 2020-06-22 18:41:08

Thank you for this analysis

Posted on 2020-06-03 13:23:24