Back to search

Is there any news regarding CPU multi-thread optimization?

TL;DRCPU multithreading work is ongoing, with current focus on optimizing servers to run on three to four cores per instance before the client, which scales well to about eight cores.

Sean TracyTechnical Director for Content

Tons. There's lots of stuff going on. I don't know what kind of info to give you guys, but we went crazy profiling on the servers in the last two weeks. So it's not really the client side that we're so worried about. It's the server more than anything. So we're getting the servers worked out more than the client right now. We've got to get the optimization on the servers. One of the problems for CryEngine generally is the server. When you're doing a big game like this, what you have to do is you have to allocate a certain number of instances to a certain number of cores. It's a cost thing. So you pay per number of cores per so many hours, or per minute even with some distributors. So what that means is that we've got to optimize first our servers for the number of cores that we will run. What's really hard about that is, again, because we're live development, we don't know yet how many instances per core we want to run. So we started with two. This was the very original Arena Commander sort of stuff, and it seemed to be okay. In the PTU, it got very obvious very quickly that having only two cores... Imagine just trying to run your client on a two-core machine. Forget it. And the server has to do a lot of the same kind of calculation that the client does, just a little bit different. So imagine just trying to run that on two cores. So obviously the server started cratering in terms of performance.

Here's a good example to give you as well about the server and the difference between CryEngine and, say, something like EVE. EVE, their servers, and I've met with them on many occasions before CIG, because they were looking at licensing CryEngine for Valkyrie at some point, which they clearly didn't, which is too bad. They should have. Anyways, I digress. So they have their servers updating about two frames a second. This is not a problem for EVE. Most of it's point and click. It's not very reactive. It absolutely is not the speed of an FPS game. In an FPS game, you need at least a 33 millisecond update. You need to have 30 frames a second going, and that includes the server. So if you think about it, we have to operate at least 15 times the speed on our server, so that way all the things are coming in: when a player shoots, where a player is looking, how he's flying. It's why the experience feels so drastically different, because of the server update. The server's got to run just as fast, but you also have to mitigate all the cost of how many instances per core you have, and it can get very, very expensive.

So what we did during the PTU is actually we increased it from two to three, and we're now taking a look at four. A lot of people are just going to say, well, just increase it to 12 or however many a client's going to get. And yeah, I understand that we're getting a lot of crowdfunding money. It's going well for us, but not that well. And there is a waste at some level. So really what we're trying to optimize right now is the servers on three to four cores. We'll see how those servers actually run for that. So we'll set up our server code in a way that all the threading works out really well for the server. And then we move on to the client, because that's where it's unlimited, so to speak. So you get eight, 12, however many cores the client's going to have to run. But we want to make sure that the engine scales really nicely to all of those cores. Right now it scales super well to about an eight core. So a four core with hyperthreading, it scales pretty well on. So most people that are playing with an i7 or something like this, they're laughing, everything's great. Now, on an i5, it's a very different story. So even this slight step down, of course, makes a pretty big difference, because we have some pretty major job systems going on on one of the cores, and we have to move that onto the main thread for i5s, and it gets a little bit crazy. Now, I don't want to go too deep, because I don't want to say something wrong right now and be called back and quoted and stuff like that.

And so you guys know, one of the big guys that's working on it, and he's going to hate that I use his name, is a guy by the name of Christopher Bolte. He is within the Frankfurt office. His master's thesis was on job systems. And actually, we should make sure it's available in some notes. It's online. It's mostly written in German, though. It's on job parallelization. So he's the guy working on it, and he is the guy you want working on it.

Reverse the Verse›December 18th, 2015·
Published on this date.18 Dec 2015