Comments

Hello everybody, my name is CCP Prism X and I am a Libra!

This summer we saw a welcome influx of players with the release of EVE Online: Odyssey. On occasions as such we usually celebrate our great success by pulling out the champagne and our $1000 Japanese pants, and having ourselves a great big pillow fight. However, this time around the influx of people was so dramatic that it worried us; Empire Space was burning. There were so many people in New Eden, doing so many things, that the actual CPU cores (reffered to as "nodes" hereafter) running the Empire Space systems were under extreme load. This was causing Time Dilation to affect the various, and disparate, portions of Empire Space. Time Dilation is all well and good when you‘re blobbing with your space-friends in Nullsec. But when you‘re just running a mission in some dead-end system, all alone in local, and suddenly everything starts going all bullet-time on you: you get frustrated.

Empire Space should really have such predictable load that Time Dilation should never kick in there. If it happens, our Static Cluster Premapper should at least be able to avoid a reoccurence. That is because we track an estimated load fingerprint of all solar systems and assign systems to different nodes, based on said estimated load, during startup. As long as that estimate is correct-ish and the premapper is functioning as it should, things should run fairly smoothly. But the same systems were consistently starting up on nodes with too many other systems assigned to them. Things were not running very smoothly at all and we weren‘t quite sure why.

† Assuming that no social engineering takes place that diverts load to new, unexpected, places.
Example: Announcing an upcoming LP offer from a corporation that only has a single good agent in high-security space will result in a lot of new load in that agents system which the premapper cannot in any way anticipate.

Step 1: Identify the problem

Above I omitted a fairly important fact about this premapping of solar systems: systems within the same constellation want to stay on the same node. They want it so bad that they‘ll do so at the expense of balanced load distribution as they‘ll ignore the, load wise, most optimal node assignment if their preferred node is only 20% more loaded than the optimal one. This behavior causes a huge deviation between the load of different nodes whereas we‘d rather want the premapper to spread the load as evenly as possible over all the nodes available to it. Furthermore this behavior doesn‘t extend above the constellation level so effectively a node can run two whole constellations, but one is located in the Deep North and the other in the Deep South. So a fleet fight in the Deep  South could enforce Time Dilation on the other constellation located in the Deep North. That‘s frustrating for the Deep North pilots!

Here is visualization of the clustering of systems to nodes in the old systems (Note, this is 3D data badly projected on a 2D plane so there‘s some skew). Systems of the same colour reside on the same nodes. You‘ll quickly notice that this is just a jumble of colours with little consistency. I‘ve drawn red circles around two clusters which all belong to the same node to show the distance between the two:

 

And to top it off this isn‘t even a good load distribution. The difference between node load is fairly staggering as you can see on the standard deviation values here:

But why were  we clustering systems on the constellation level? Because a long time ago it was theorized that inter-node stargate jumps were more expensive than intra-node jumps. Presumably, that is due to the assumed overhead introduced by network latency. Now we know that this assumption is completely wrong and inter-node jumps are actually cheaper than their counterpart. A stargate jump requires the removal of the player from one system, and his introduction into another one. Splitting that work between two nodes spreads load better than doing it all on the same node.

Realizing this, we just decided to remove any such node affinity behavior from the premapping logic as a first step. Systems would just be assigned to nodes on the basis of the most loaded, unassigned, system being assigned to the least loaded node. That resulted in an amazingly well balanced cluster and the load problem was solved! But even though we‘d made a very balanced cluster the Time Dilation problem was now even more pronounced. Systems had just been semi-randomly assigned to nodes with no respect to locality and so we still had people in the Deep North affected by fleet fights in the Deep South. Revert the changes and put the thinking cap back on!

Step 2: Solve the problem

So we needed a way to split load between nodes whilst ensuring that all systems on a node belong to the same space-neighborhood. As a secondary concern we really did not want to increase the time premapping took, and we used the opportunity to completely nuke the old T-SQL code and recreate it as a Python module. That last decision, unsurprisingly, turned out to be the most important one as a procedural language with a large supporting ecosystem of available tools is much better geared to solve a procedural problem than a highly limited relational language.

With Python at our side we initially arrived at a fairly simple and approachable solution. As we‘re attempting to split up a cluster of stars with defined coordinates so that both halves are adjacent and equally weighted; why don‘t we just do that? If you split any coordinate system in half with a plane, both halves will be adjacent to each other and that solves the problem of proximity. That leaves us with a way of ensuring that both halves are close to equal in their load. As we keep track of each systems load this just becomes a matter of tweaking the split line iteratively in some sensible manner. That‘s not more complex than using the properties of Binary Search! We just have to move the split line a given distance towards the more heavy of the two halves, and then half the distance we‘ll move it on the next iteration. Theoretically we should bounce between both sides of the optimal split line for a while until we hit it. I say theoretically because we‘re not trying to find the optimal solution here, only a good enough solution in the least amount of time.

Here is a graph to help you visualize this process. Imagine the circle stands for the entire cluster of stars we want to split up. The stars themselves are not shown because they're not important, all that matters is that the split will not mix stars from the two distinct halves between them and that the load is as equal as possible.

Once we’re done splitting the initial universe into two clusters, we’ll pick the heavier of those two and split it again. Then we’ll pick the heaviest of those three and split it again and repeat the process on the four resulting clusters of stars. We’ll repeat this until we have as many clusters as we have nodes at which point we commit the mapping to the database and continue on with startup.

To visualize this properly I’ve provided some visualization, using this method, run against the same dataset as the graph above. However, the first three steps are the split of Empire Space only due to the inner workings of the new method and only serve to describe the method better. The last picture is the final allocation of the entire universe (on the same data) and can thus be compared to the similar graph above.

Initial Empire Space step:

 

First Empire Space split. Note the size difference of the two halves due to the fact that not all systems are equally loaded:

 

Seventh Empire Space split (that grey blob is two hues of gray):

 

End result of entire universe. Note how much more uniform the color distribution is:

Step 3: Actually Solve the Problem

That’s how we initially pushed out the new cluster premapper a few weeks before Rubicon was released. We did so understanding what the more Computer Sciency types out there might already have realized from the above; this results in a balanced load spread if, and only if, the number of nodes available for allocation are a whole power of two. Anything else will result in a fairly unbalanced load spread as we’re always splitting load into two halves, creating a sort of a Binary Tree. For a perfectly equal split we must have enough nodes to fill the leaf level of that imaginary tree or we’ll have nodes on level leaf-1 with double the amount of load on the nodes on the leaf level.

Here is a very simple picture displaying the whole power of two issue with 3 nodes as opposed to 2^2=4 nodes. Please keep in mind that this is a perfect world example. We do not actually expect all load splits to be perfectly equal.

This resulted in a too uneven of a split. The statistics below do look better for Nullsec but in Empire we’re still looking at a fairly large standard deviation between nodes. But at least the CPU Minimum isn’t zero here. Sadly the memory stats just got plain worse, but we’re really balancing primarily for CPU.

Obviously the optimal split here is 33% of the load allocated to each node but you can see how the nice and simple algorithm outlined above completely fails here. But since we know this works optimally if we divide the load by a number of nodes that is a whole level of two we just need to force that behavior! We could of course constrain ourselves to always have a whole power of two number of nodes for solar systems but that feels like a rather silly artificial constraint. Especially if you know that any number in base 10 (decimal number system) can be represented in base 2 (binary number system), then this just becomes a matter of rearranging the binary tree above into branches of whole number of two nodes and running the algorithm detailed above on those branches.

Using a bit more complex example than the three nodes above, we can visualize this in action as thus:

This is easy enough to achieve with minimal alterations to the code used in the initial solution. That solution already relies on a method of splitting coordinate systems in two equally loaded parts. Altering it to split it into two X/Y parts is no big deal.

Using this new approach on the exact same dataset as the examples above we end up with this pretty picture of a balanced universe within which space-friends shoot other space-friends in their respective faces:

 

And now the CPU standard deviation has dropped drastically! We're hoping to have this code out by tomorrow Wednesday, December 4th.

Step 4: Write a Dev Blog

Then do it again. This is the second version of this Dev Blog. I’m pretty sure nobody would have enjoyed reading the first one. Sadly I couldn’t reuse a lot of stuff from that first attempt, like I could with the code. It simply had too many mentions of water carriers, aqueducts and Beyonce Knowles. Probably wouldn’t have made a lot of sense to anybody!

So there you have it; our recipe for a Balanced Universe. Perhaps you can find some way of applying it to your own lives! I’m thinking those fancy colored dot charts could probably substitute for a Rorschach test. But in case you just read through my entire blog and do not feel like you’ve gained much from it I’d like to present you with this cool island song as a peace offering (Don’t browse at work kids!).

That’s it folks! If you’ve got some further questions I’ll be looking at the comment thread regularly.

188 Comments

  1. Great tremendous things here. I am very glad to look your article. Thanks so much and i’m looking forward to contact you. Will you kindly drop me a mail?

    September 22, 2019 at 12:07 Reply
  2. Hi there, just became aware of your blog through Google, and found that it’s truly informative. I’m gonna watch out for brussels. I’ll be grateful if you continue this in future. Numerous people will be benefited from your writing. Cheers!

    September 22, 2019 at 12:07 Reply
  3. I think this is a real great blog post.Much thanks again. Want more.

    September 22, 2019 at 17:43 Reply
  4. It is really a nice and useful piece of info. I am satisfied that you just shared this helpful info with us. Please stay us up to date like this. Thank you for sharing.

    September 23, 2019 at 19:20 Reply
  5. whoah this blog is wonderful i really like studying your posts. Stay up the good work! You recognize, lots of people are looking round for this info, you could aid them greatly.

    September 23, 2019 at 19:20 Reply
  6. Thanks a lot for the blog post.Really thank you! Really Cool.

    September 24, 2019 at 01:16 Reply
  7. WOW just what I was searchinglooking for. Came here by searching for keywordmeta_keyword

    September 24, 2019 at 08:09 Reply
  8. A big thank you for your article post.Much thanks again.

    September 26, 2019 at 00:28 Reply
  9. I truly appreciate this article.Really thank you! Cool.

    September 28, 2019 at 03:35 Reply
  10. Hey there! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing a few months of hard work due to no back up. Do you have any solutions to prevent hackers?

    September 28, 2019 at 20:43 Reply
  11. The NUMBER ONE conservative late night comedy show!!

    September 29, 2019 at 01:11 Reply
  12. justin trudeau is an evil racist blackface hater !

    September 29, 2019 at 03:14 Reply
  13. wow, awesome blog post.Much thanks again. Really Great.

    September 30, 2019 at 08:38 Reply
  14. Incredibly comfy. My little girl is actually no more fussing concerning her mattress being uncomfortable or even uneven.

    September 30, 2019 at 21:14 Reply
  15. Super relaxed, Made in the USA and also seeems to be holding up effectively. I utilize it on a twin daybed and check out tv.

    September 30, 2019 at 22:43 Reply
  16. I cannot thank you enough for the blog article.Really thank you! Fantastic.

    October 1, 2019 at 03:23 Reply
  17. Great purchase for a mattress without unpleasant chemicals. Procured twin dimension for a 4 year old. That is incredibly comfy and seems properly created.

    October 1, 2019 at 07:57 Reply
  18. I think this is one of theamong the most importantsignificantvital informationinfo for me. And i’mi am glad reading your article. But wannawant toshould remark on fewsome general things, The websitesiteweb site style is perfectidealgreatwonderful, the articles is really excellentnicegreat : D. Good job, cheers

    October 2, 2019 at 05:52 Reply
  19. I was recommendedsuggested this blogwebsiteweb site by my cousin. I amI’m not sure whether this post is written by him as no onenobody else know such detailed about my problemdifficultytrouble. You areYou’re amazingwonderfulincredible! Thanks!

    October 2, 2019 at 18:44 Reply
  20. They offer pruning, shaping, cabling and tree care.

    October 3, 2019 at 01:12 Reply
  21. I like the valuablehelpful informationinfo you provide in your articles. I willI’ll bookmark your weblogblog and check again here frequentlyregularly. I amI’m quite certainsure I willI’ll learn lots ofmanya lot ofplenty ofmany new stuff right here! Good luckBest of luck for the next!

    October 3, 2019 at 07:16 Reply
  22. To Whom it may Concern,

    I am interested in an opportunity to volunteer our ICO Listing totally
    at no cost of charge, we have significant experience working within the
    IT field and would like to continue to do this in a volunteer capacity.
    What we mean at no cost, is we’d be happy if you assisted by challenging
    to list unto five (5) ICO/IEO or STO’S you see fit for this request.

    Our terms is if you can allow us to display them within this agreement,
    we won’t charge a cent. As we doing this to boost our Sales Plan. We
    hope this makes sense as there are plenty of ICO Listing doing the same
    even better. But our aim is to grow before setting targets that doesn’t
    deliver.

    So basically I’d like to work with you for at no cost Premium ICO/IEO &
    STO publishing in our site. even If there are banners related to
    Blockchain events, news. I’ll be happy to display on ICO Onboard.

    To your success,
    CJ Visser, MA, LLB(Law)(London)
    CEO http://www.icoonboard.com

    October 3, 2019 at 15:59 Reply
  23. I have read so many articlespostsarticles or reviewscontent regardingconcerningabouton the topic of the blogger lovers butexcepthowever this articlepostpiece of writingparagraph is reallyactuallyin facttrulygenuinely a nicepleasantgoodfastidious articlepostpiece of writingparagraph, keep it up.

    October 4, 2019 at 06:09 Reply
  24. I am regular readervisitor, how are you everybody? This articlepostpiece of writingparagraph posted at this websiteweb sitesiteweb page is reallyactuallyin facttrulygenuinely nicepleasantgoodfastidious.

    October 5, 2019 at 06:21 Reply
  25. Hurrah! After all I got a webpage from where I be capable of really obtain helpful information concerning my study and knowledge.|

    October 5, 2019 at 22:48 Reply
  26. I really enjoy the blog article.Really looking forward to read more. Keep writing.

    October 6, 2019 at 00:35 Reply
  27. HowdyHi thereHiHey thereHelloHey would you mind letting me know which webhosthosting companyweb host you’re utilizingworking withusing? I’ve loaded your blog in 3 completely differentdifferent internet browsersweb browsersbrowsers and I must say this blog loads a lot quickerfaster then most. Can you suggestrecommend a good internet hostingweb hostinghosting provider at a honestreasonablefair price? Thanks a lotKudosCheersThank youMany thanksThanks, I appreciate it!

    October 7, 2019 at 07:12 Reply
  28. HiHelloHi thereWhat’s up, just wanted to mentionsaytell you, I enjoyedlikedloved this articlepostblog post. It was inspiringfunnypracticalhelpful. Keep on posting!

    October 7, 2019 at 20:26 Reply
  29. Yes! Finally somethingsomeone writes about keyword1.

    October 8, 2019 at 05:58 Reply
  30. All other webmasters should take note: this is what awesome articles look like! I cannot wait to read more of your work! Not only is it engaging, but it is also well-written. If you would reply with a link to your Facebook, I would be extremely grateful!

    October 11, 2019 at 01:30 Reply
  31. A personSomeoneSomebody necessarilyessentially lend a handhelpassist to make seriouslycriticallysignificantlyseverely articlesposts I wouldI mightI’d state. This isThat is the firstvery first time I frequented your web pagewebsite page and to this pointso farthus farup to now? I amazedsurprised with the researchanalysis you made to createmake this actualthis particular postsubmitpublishput up incredibleamazingextraordinary. GreatWonderfulFantasticMagnificentExcellent taskprocessactivityjob!

    October 11, 2019 at 19:58 Reply
  32. I am not sure where you are getting your information, but good topic. I needs to spend some time learning much more or understanding more. Thanks for wonderful information I was looking for this info for my mission.

    October 13, 2019 at 06:41 Reply
  33. Wow, amazing blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is magnificent, let alone the content!

    October 13, 2019 at 07:37 Reply
  34. There is clearly a lot to realize about this. I consider you made certain good points in features also.

    October 13, 2019 at 07:37 Reply
  35. Definitely, what a great website and instructive posts, I will bookmark your blog.All the Best!

    October 13, 2019 at 07:37 Reply
  36. My brother recommended I might like this website. He was totally right. This post truly made my day. You cann’t imagine simply how much time I had spent for this information! Thanks!

    October 13, 2019 at 07:37 Reply
  37. Definitely believe that which you stated. Your favorite justification seemed to be on the web the easiest thing to be aware of. I say to you, I definitely get annoyed while people think about worries that they just do not know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people could take a signal. Will probably be back to get more. Thanks

    October 13, 2019 at 07:37 Reply
  38. Some reasons for useless & low quality PO polls may be:

    1) scientific noviceness
    2) cost & capability limitations
    3) profit motive
    4) political incentive

    Public opinion gauging is a challenge, behavioral economics is probablistic & confirmation bias seems almost natural.

    /5

    October 14, 2019 at 03:46 Reply

Leave a Reply to John Deere Service Manuals Click here to cancel reply.