CPUs and Multithreading

I’ll preface this post that it was originally written by one of our members who unfortunately has left the community. His information was very well written, so I found the original post using Google Magic so it could be re-posted here for the community.

Multithreading

In a nutshell, all 3d modeling software are single threaded since 3d model calculation is linear in nature and can then only be processed on a single thread at the time.

Most calculations necessary to produce a 3d model cannot be made into chunks, independent of each other and then sent to be solved by different calculators.

Simplifying to the extreme, let’s take a box with a hole in it as an example:

The box needs to exist in order for the hole to affect it. We could not tell one CPU to create the box and another CPU to create the hole in the meantime because the hole needs to know where the box is and use its dimensions and position as variables of its own calculations. Therefore the process of creating a hole in a box cannot be made parallel and thus cannot use multithreading.

Or consider the following: (2+2) - 1. You could send 2+2 to be solved on one thread and X - 1 on the other thread but the second thread would need to wait on the result of the first one to do its own thing. Therefore multithreading is useless.

SketchUp is not an exception: All 3d modeler out there are single-threaded as far as modeling goes. Some part of a 3d application (like physical simulations in SolidWorks for example) will be able to assign specific tasks to other threads but modeling per se will always be done as a single thread. Some other times, parts of the software that rely on the OS will be able to be multi-threaded by the OS itself.

It’s for that very reason anyone will recommend you go for the CPU with the fastest clock you can afford because a 3.4GHz processor will calculate a model faster than a 2.4GHz processor, regardless of how many cores each one has.

CPU Rendering

Rendering can and will take advantage of all your CPU’s core because it can just break down the entire resolution you are trying to render into an array of chunks and send each core a chunk, cutting render times by an order of magnitude equivalent to the number of cores available to the rendering engine. So a 6-core CPU will render faster than a 4-core equally clocked CPU.

Hope this helped! I’ll post some details on GPU rendering in another post.

Regarding Intel CPU types -

The i3, i5 and i7 are different beasts. Beyond clock speed, there are a number of technologies in the i7 that will affect performance like memory bandwidth (21.3GB/s for the i3 vs 34.1GB/s for the i7) and size of cache memory (3Mb on the i3 and 6Mb on the i7 for instance) and so on.

So a 2.4GHz clocked i7 might still perform much better than a 2.4GHz i3.

The important thing to note is that an i3 with a stock clock at 2.4GHz will underperform versus a (stable) overclocked same i3 at 2.7GHz and the reason is mathematical:

Let’s say your i3 can execute 1 billion of instructions (mathematical operations) per cycle. If your i3 runs at 2400 cycles per second, it will be able to make 2400 billions operations. If you up the number of cycles it does per second by increasing its clock speed (and assume it is still rock stable, which is not always the case when overclocking) to 2700 cycles per second, it will then be able to make 2700 billion operations, which is a substantial 12.5% increase.

But your i7, regardless of the myriad other reasons it could perform better, might be able to do 1.3 billion of instructions per cycle and is clocked at 2.4GHz (3120 billion instructions), it will outperform an i3 doing 1 billion instructions at 2.7GHz (2700 billion instructions)

So if you have the choice between let’s say two i7 CPUs, one clocked at 3.2GHz and one clocked at 4GHz, you will benefit from the faster clock in single threaded applications.

I’ve pitched your two choice of CPU one against the other on cpubenchmark.net and here’s the result.

Remember: All benchmark numbers are to be taken with a grain of salt.

As far as memory goes, it all depends on the complexity of your models and if you render, on the quality of the material you’ll use. I tend to preach that memory is cheap. Maxing out what your board supports even if you don’t think you might need this much right now can be a wise decision.

As time goes by and your models age and get older, buying memory for it three years down the road might prove difficult and more expensive than if you buy it now. Don’t believe me?

Corsair 2x2GB DDR2 800MHz Kit @ Best Buy = 55,99$

Corsair 2x4GB DDR3 1600MHz Kit @ Best Buy = 44.99$

Regarding using a system with a non-accelerated video card…

While SketchUp main tasks of triangulating your 3d model, grouping faces and managing components are all tasks that will solicit your CPU, what happens in the viewport will mostly solicit your GPU. Panning, Zooming and Orbiting operations will all take advantage of your GPU if you have a good one. SketchUp has a very good way of managing viewport performance though: viewport degradation. If you are stuck on an integrated chip, you will still be able to pan zoom and orbit at a ok speed because SU will turn off eye candy to perform these tasks (shadows, etc). The image quality will be much better with a decent GPU.

Some rendering engines will also benefits from a good GPU.

Right now some rendering engines only use the GPU to render the real-time preview since the GPU rendering part of the engine does not support all the maps and lighting settings their CPU offers. Either that or the standalone does it but the SketchUp pipe does not yet allow/make use of it.

Thea is an exception with their Presto mode. I have not tried it but it advertise an hybrid mode, making use of both CPU and GPU at the same time.

Others will eventually get there because it is the future. And it’s lightning fast

Regarding 3D Studio vs SketchUp…

3D Studio is single threaded for modeling just like all the others. It does use multi-threading for other tasks like rendering. But most (if not all?) rendering engines you can plug to SketchUp will multi-thread the rendering process.

As for your acquaintance preferences of 3DS over SU, I will not argue that. For me it’s like arguing which HB pencil is the best to draw hand sketches: Each to his own. It’s very rarely the tool that makes the artist but rather the artists that drives the tool. If you are more comfortable and therefore more efficient modeling in SU, so be it.

I’m also tempted to say: best tool for the job. If what you are trying to do is easier to do in one package than the other and you can afford both, then use the best tool for the job as most softwares supports common file formats that make interoperability possible.

Conclusion: SketchUp is a fast modeler. If you want to rig and animate characters, you might consider 3DS as a better choice. If you want to do ArchViz animations, 3DS might also be more suited to your needs. But if you want to create multiple construction documents from 3d models you created very fast and easily and show possible choices to your clients using dynamic components, not a whole lot of software matches SketchUp in my opinion.

14 Likes

I vaguely remember hearing there was a were several but don’t recall reading them. Alas, I just used the Internet Archive Wayback Machine to capture that particular thread since I had the URL. If we could figure out the URL for those other posts… I’m not sure if I have that much magic, but I’ll see if I can find anything.

1 Like

Just came across this thread. Indeed a very good explanation. But even 3ds max and SU being single threaded, why 3ds max can read an obj file much faster then SU (the same file when importing), or save huge files (polycount wise), much faster than SU in the same machine? Is it possible for SU to improve it’s performance related to this functions/actions?

1 Like

I don’t think we have ever benchmarked .obj import speed for the same model (on the same hardware) in 3DSmax vs SketchUp. If you have some test results to share, I’m sure they would be appreciated.

1 Like

Sorry for the late reply. I can definitely do some benchmarks. I’ll try to do this on this weekend, and post the results here.

1 Like

Are you sure that 3DS does not use some multi-threadig for file operations?

I would ask that a specific new topic be started for this “test” and it’s discussions.

1 Like

i love this post!
been hating on the new Sketchup versions but this explains everything.

I’m not a programmer and I don’t have a clue how hard creating software is. However, I believe they should create SketchUp from scratch and keep the interface the same. they should look at other softwares and see how fast they are. We don’t need multi-threading, we just need faster software that can process faster on a single-core, like other 3d software in the market. (please don’t give me excuses like “real-time rendering of SketchUp viewport”)

Like what? I have used quite a few 3D applications from about 1987 on and IMO SketchUp is not particularly slow. Have you some 1 to 1 comparison data to show us?

Every SketchUp version that I have used (from version 3 on) has been faster than the previous one.

I worked with blender and 3ds max a little bit. shouldn’t I compare SketchUp’s processing power to them?
SketchUp is lagging in simple things like handling complex scenes (high-poly). I can’t chamfer and bevel some complex models, even SUBD has a significant lag, you probably noticed that. I can’t properly UV complex models with Fredo’s ThruPaint because of lag and delay. I should use FloorGenerator and sketchyFFD carefully and so on. I know these are plugins and not SketchUp’s core function, but I think their slowness is from SketchUp’s incapability in processing high poly models.
Oh and I’m not ignoring SketchUp’s great features, they are all good in their way. I just complaining about its slowness in processing things.

Sometimes one must take the good with the bad.
Some of the performance issues can be attributed to the particular computer, the programs on it and the condition of the file system. Antivirus and clean-up apps can really mess up the system and or use a lot of the cpu cycles.

interpreted (Ruby) scripts are slow by design, running as a compiled executable is always much faster.

1 Like

Interesting, I didn’t know that. That’s why Trimble should consider adding some useful extensions to the main software.

Anyhow, What I was saying is that SketchUp itself is slow with high-poly models (maybe its processing engine is outdated? I have no idea about things going on in a software :joy: )

I always ask myself, why other 3d packages can handle millions of polygons without hassle. I mean look at 3ds max, blender, c4d, even now unreal engine 5 can handle and process millions of polys.

The answer I got from SketchUp staff wasn’t that convincing for me. They said SketchUp’s viewport does render in real-time. well, other 3d packages do that too, even most of em have a kind of fake reflection too, still, they show better performance than SketchUp.

Sorry for complaining a lot, but if the community doesn’t ask it, they never make big improvements. I still can’t take the “dashed line” as a feature :confused:

2 Likes

I would much agree with your helpful information in understanding machine algorithms at a preliminary level. There are still missing pieces when coming to real software and their architectures and I believe there are many ways to improve their behaviours in computing with multi-cores CPUs. Not every processing in software is 2+2-1=? scenarios and there are way more mathematical regressions. If users have been thinking of their industrial companies can make a better use of profit to do a better job, why would those leading-edge developers can be reasonably behind the current ideas?

The short story is, yes, Sketchup, like many other industrial-standard software, only uses one core for all processing. It makes a huge lag dealing with large/detail models, which makes intensive modelling in workplaces barely realistic. What we found was, if users can open up multiple SketchUp programmes and split the large model into smaller pieces into each programme, Sketchup can use multi-cores efficiently!

That’s point. If you want Sketchup uses multiple cores, please manually open up many SketchUp apps in your PC and cut and paste your model parts into them and do the modelling processing! You will find your Sketchups now are using multiple or all your cores to deal with the whole model. After done that, of course, you have to paste the finished parts back to the large one. This has been proven tremendously more efficient (30hour modelling 1 core = 30minutes modelling 8 cores).

What I have demonstrated was, it is absolutely for modelling software being engineered for multi-core uses. Sketchup, as a partially open-source, can definately make their plugins multi-threaded straight-forward, just by investing into its programming.

But what we have been witnessing throughout years was many industries are still replicating acient engines dating back prior to DX9 era and might not much interested in improving software engineering for users.

you have demonstrated, that several progam instances can run each as a single thread on a single kernel, which is plain trivial and no multi-threading in one (1) program instance as discussed and actually the technology requested.

But if engineering multi-threaded operations is “straightforward” and “just needs inventing”, just name e.g. some ‘big boys’ which surely do have the development power and therefore should have realized this already, please be verbose.

SketchUp is not (partially) open source, in fact the used scripting language (Ruby) is.

1 Like

It cannot be for lack of trying. The Pentium processor debuted something like 27 years ago, with the possibility of multiple CPUs on a motherboard. Immediately, Autodesk announced that a multithreaded version of the 3D Studio modeller was forthcoming. We are still waiting (OK, rendering has been multithreaded for years).

1 Like

raster data and file operations can be multi-threaded or separated to another thread, modeling operations is the challenge.

Now my strategy with Sketchup is hide almost everything in my scene but what I’m working on.
Sketchup is too slow and multi-thread should focus on render different components instead same component.

I understand that the SketchUp modeler must be processed on a single thread and for the size of models I do, I don’t have a problem with it’s speed. Layout on the other hand could use some help. So I’m curious if Layout could utilize multi-threading for refreshing the different reference views? Would it be possible to assign an available thread to each window view of the model and then each overall sheet space of Layout? This could literally speed up Layout’s refreshing speeds by almost X times the number of cores a system has. If reading the same data at the same time is an issue, could Layout make as many temporary copies of the SketchUp file in RAM as there are threads to assign unique high speed copies to? As a fall back, on systems that don’t have enough RAM, could it utilize a Pagefile of sorts on the hard drive? With today’s solid state drives this could still be done fairly quickly. Just a thought from a non-technical user that really wants to see Layout shine. I think overall its a great program, it can just be painfully slow sometimes.

3 Likes