The AT Battlefield Bad Company 2 F.A.Q.

Page 276 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Status
Not open for further replies.

Cienja

Senior member
Aug 27, 2007
471
0
76
www.inconsistentbabble.com
I've gone into empty servers to learn how to fly the heli's, the UAV, and to learn some maps. Also, to learn how to use the mortar as Recon. The engineer is getting me lots of points with the repairs. Fun game.
 

GullyFoyle

Diamond Member
Dec 13, 2000
4,362
11
81
New Battlefield Blog Post: Stats issue fix Tuesday-25th-January

Battlefield Bad Company 2.
Maintenance work on Tuesday.
Posted by. Luis Dias

Tuesday the 25th of January we are going to do a bit of maintenance work on the Xbox 360, Playstation 3 and the PC during these hours:.

2:00 am PDT - 5:00 am PDT 2:00 am PDT - 5:00 am PDT.
5:00 am EST - 8:00 am EST 5:00 am EST - 8:00 am EST.
10:00 GMT - 13:00 GMT 10:00 GMT - 13:00 GMT.
11:00 CET - 14:00 CET 11:00 CET - 14:00 CET.

The purpose is to improve performance of the stats system, to reduce / eliminate stats outages. We're very sorry for the inconvenience.

==================================================

Related background: Another classic Kalms post:

The stats system - a performance perspective

What follows is a description of how the stats backend functions for BFBC2, what happens during high load, and what we are doing to resolve it. Consider it a peek 'under the hood' of BFBC2.


System overview

When playing online, all game clients and game servers are permanently connected to the game's backend servers.

There is a separate backend for each of the PC/PS3/360 versions of BFBC2.

A backend is split into two portions - one group of machines which run some custom software, and a database. The database is not directly accessible by game clients/servers; they can only reach it by sending requests to the custom software portion, which in turn talks to the database.

Each database is a cluster of machines which run Oracle 9i with RAC enabled.

There are a few modules in the backend, and a few tables in the database, which are shared between multiple platforms / titles. Those are generally rather low-intensity processes. However those have to be cared for if one wants to perform changes to the physical configuration of the machines that run the backend.


Stats

A stat is a short identifier with an accompanying value. Stats are tracked for each player, and they are saved between game sessions. For BC2 there are approximately 2000 unique stats values. Some of the stats have a direct meaning - your current score with a specific kit, number of kills with a specific weapon and so on - whereas other stats are meaningless on their own and track your progress toward various achievements/trophies, pins and insignias.

The stats are kept in a couple of big tables in the Oracle database.


Game client and stats

The game client only reads from the stats database; it never writes.

Stats reads happen on two occasions: when a player logs in, and when a player exits from a server back to the main menu. The client has a local cache of all stats. When one of the two previous events occur, the game client requests a handful stats (for instance the, the player's total score and accumulated online playtime). If any of those stats are different from the locally cached values, the game client goes out and grabs all stats (approximately 2000 values).

The game client uses these stats to display information in the main menu. It is not used in-game in multiplayer.


Game server and stats

The game server reads and writes to the stats database.

When a player enters a server, the server requests approximately 1000 stats for that player from the database. Anything that has to do with stats and ranks is controlled by the server (for instance, which weapons are unlocked for a specific player).

The server writes back a player's stats when the player leaves the server. Also, all players' stats are written to the database at the end of each round. This is to minimize the risk that player progress is lost because of a server crash. When writing stats, the server will only write those stats that have changed. In addition, whenever possible the server will issue commands like "add 3 to stat named ABCD" rather than "write 27 to stat named ABCD". This minimizes the risk that any bugs in the code or network communications problems will trample stats; the worst that can occur is that a stat is not increased, it will not get lowered or set to zero inadvertently.

Usually the game client will write a lot less than 1000 stats. I don't have figures at hand, but perhaps 100 stats are usually updated after a player has played a full round.


High load scenarios and the backend

Normally the database responds to the custom software's read/write queries very quickly. The database can service requests from a couple of game clients/servers in parallel; if there are too many requests made at once, new ones are put into a queue. Normal turnaround time for retrieving 2000 stats is approximately a second. Requesting 2000 stats takes a bit more time than requesting 1000 stats - probably about twice as long. The database completes the queued-up entries as quickly as it can.

The requests do not come in a steady flow however. Sometimes many servers and clients will ask for stats data at nearly the same time. The database will then service some of those requests a bit slower than usual.

The database is the weaker portion of BFBC2; that is, the custom software can handle more players being active simultaneously, than the database can.

If the clients/servers are doing a lot of requests to the database over a long period of time, then the backlog of queries in the database's queue will get longer and longer. When the queue is so long that the database is unable to service queries in 10 seconds, the custom software will give up on those queries and respond with an error to those clients/servers.


High load scenarios and the game client/server

With the above in mind, let's imagine what happen when the number of simultaneous players increases.

At first, there are not a lot of players. The database will handle any requests quickly and its queue is nearly empty all the time.

As the number of players go up, the database will still be able to keep up with most requests. However, occasionally a lot of servers/clients will happen to perform stat requests at nearly the same time. This causes the queue to fill up a bit more than usual. Some of those queries will then time out when they hit the 10 second cutoff. Since clients normally request more data, it is usually the game client's requests that fail first.

If the game client's request fails, the game client will attempt to retrieve stats for 10 or 20 seconds - and then give up, and the game's main menu will claim that the player is Rank 1 and has zero score etc.

As the load increases further, the game server read requests will also fail more often. When game server read requests fail, the players which are affected will play with rank 1 and no stats-related unlocks. When this happens, the game server will not record & write back progress for the affected players either.

Finally, with a really high load, all requests from game clients & game servers will fail.


High load versus too high load

One important thing to notice about some online systems and load, is that the load does not behave like you would intuitively expect it to. Usually it rises slowly... until it gets to a certain point, and then it all spirals out of control and horror ensues. There are several reasons for this.

One is the human factor: When the load is at such a level that stats requests are failing intermittently, it appears to the player like he/she has lost all his/her progression, but either logging in/out (in the case of no stats in the main menu) or disconnecting/reconnecting (in the case of no stats in the game) has a % of chance to get stats back. People will then naturally do this over and over until they either get stats, or are frustrated enough to give up. This behaviour will cause more load on the backend than normal gameplay behaviour, which worsens the problem overall.

Another can be in the code; sometimes game client/game server code is written to retry a couple of times when an operation fails. This is a good thing when the backend is not under high load - after all, the error might be due to a momentary hiccup. However, when the load is high this will make the problem worse (in just the same way as the "human factor example").

There are also some things happening in the background on databases - like backups, or regularly scheduled maintenance / dataprocessing jobs.

This means that some online systems can seem to be running fine, with a steady load, and then something happens and within minutes they grind to a halt.

How well-behaving the system is depends on what functions it performs, and the behaviours of the users of the system.

BFBC2's custom backend software is well-behaved in most respects. The database suffers a bit from the problems described above - the step between "players are occasionally not getting stats" and "players are never getting stats" is smaller than theory would predict.


A closer look at the database itself

Somehow the stats database used to handle considerably more players back when it launched than now. In other words, reads/writes against the database takes more time to complete. There are two main reasons for this.

There are stats for much more players in the database now than back when we started. Databases are good and servicing requests like, "give me the contents for user with ID=1234, it is somewhere in that huge table", but performance does go down as the tables grow in size.

The tables themselves are becoming fragmented. Several years and several games ago, when the database administrators designed the database setup for the system, they asked what the priorities were for the database. The response was -- runtime performance; the database should be setup to be able to service as many reads/writes per second as possible. One deliberate tradeoff of the highest-performance setup they could create was that the database would gradually acquire small gaps in it. These gaps would not get reclaimed automatically. The amount of "lost" space in the database would grow over time, and after a while the lost space would result in performance loss (due to disk caches not being as efficient anymore). This is sorted out by taking the database offline once every couple of months and rebuilding it - thereby squeezing out all the gaps. However, due to some reason these regular rebuilds have not been happening for any BFBC2 title.


Defining the problem

The problem we will tackle is the following: the current player population is suffering from stats outages. That shouldn't be happening. Stats should be reliable with roughly the player numbers that we have now, plus a bit of headroom. We will not attempt to make it handle 100.000 concurrent users on a single backend.


Tackling the problem

One can attempt to make individual database accesses faster.

Taking the database offline, and rebuilding the tables.
This is certain to help. That is also the first thing that we will do. (And schedule new rebuilds whenever necessary in the future.)

Making disk cache sizes larger.
Memory is faster than disk, so if more of the database is kept in memory then accesses will go faster.
The PC and 360 database clusters have as much memory as is possible. The PS3 cluster has room for more memory though.
We will add it.

Redesigning the tables.
The table layout is not designed specifically for BFBC2; the same design is used by many other EA titles. Changing the design would improve performance for most requests by a fair bit. However, the time required for getting such a modification implemented, tested, and live is far too long.
We will therefore not do it.

Adding more machines to the database clusters.
One might think that doubling the number of machines in a database cluster will also double the performance of a cluster. In reality, all those machines need to coordinate their work with each other. Therefore, adding more machines only helps sometimes. In some cases, performance actually gets worse.
We will therefore not do it.

Moving to a newer Oracle version or another database altogether.
Again, the turnaround time for doing this to a live system is far too long.
We will therefore not do it.


Or one can reduce the amount of database accesses.

Making game clients request fewer stats.
The game client is already doing a small fetch before doing a full fetch (in case score/time or a couple other stats have changed). If the client doesn't update all the stats in its cache, the main menu will not be able to show the player's ingame progression correctly. It is perhaps possible to split the stats fetching into two portions - one portion for showing the most important stuff in the main menu (in the case of BC2 PC, the stats-related items in the main screen), and another portion for showing all the achievements/trophies etc.
It is under consideration.

Making the game servers cache stats for players.
The servers could have a cache like the game clients, but cache stats for many different players. This would help with people who play near-exclusively on one server. It is doubtful if it would make a difference (I don't have statistics on this, just guessing).
We will not do it.

Making the game servers request fewer stats.
Fetching fewer stats will make the game server unable to evaluate the full player progression.
We will therefore not do it.

Making the game servers write fewer stats.
If the game servers would write stats to the backend at each Nth round instead of at each round, then there would be fewer unique stats written. There is a tradeoff here - is there a risk that players lose their progression due to server crashes? - but N=2 or N=3 keeps both risk and impact very small.
We have already implemented this change for both consoles, and will implement it for PC.

Once one set of changes is in place, we will then reassess the situation. Etc.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
it's ridiculously easy to get kills with medic.. almost any LMG with magnum ammo is rape.

The thing I still don't get about LMGs is how every game seems to have one or more people in it who can let rip with long bursts from halfway across the map and kill me every time. No ranging shots, no misses. When I try the same thing I have to squeeze off short bursts to keep the sights on target, and I never get a kill with the first burst. Probably either lag is making me thing they are doing something they aren't, or they are getting some stability enhancements with rank... or something.
 

Maximilian

Lifer
Feb 8, 2004
12,603
9
81
The thing I still don't get about LMGs is how every game seems to have one or more people in it who can let rip with long bursts from halfway across the map and kill me every time. No ranging shots, no misses. When I try the same thing I have to squeeze off short bursts to keep the sights on target, and I never get a kill with the first burst. Probably either lag is making me thing they are doing something they aren't, or they are getting some stability enhancements with rank... or something.

Theyre probably just tapping the mouse button really fast.
 

Baasha

Golden Member
Jan 4, 2010
1,997
20
81
it's ridiculously easy to get kills with medic.. almost any LMG with magnum ammo is rape.

especially in vanilla BC2 with the red-dot scope... it's like an auto-sniper rifle! LOL...

And, the dumbest thing is when dumbass medics don't revive you.... they camp behind a rock... the only "camper" should be snipers... everyone else should RUSH...
 

coldmeat

Diamond Member
Jul 10, 2007
9,214
78
91
Does anyone else find themselves calling mortar strikes on themselves sometimes? I swear I have a clear view at my target, but the mortar will strike right on top of me as if I called it on the rock I'm hiding behind.
 

stag3

Diamond Member
Feb 7, 2005
3,624
0
76
Does anyone else find themselves calling mortar strikes on themselves sometimes? I swear I have a clear view at my target, but the mortar will strike right on top of me as if I called it on the rock I'm hiding behind.

yep it sucks, for the most part the dot for the mortar strike turns red for me when its
right on the target (ie tank etc..)

what i'm having issues with lately is the rpg, if there's so much as a leaf in front of you, it explodes and suicides me arghhhhhhhhh
 

Moonzi

Senior member
Nov 5, 2009
617
0
76
Does anyone else find themselves calling mortar strikes on themselves sometimes? I swear I have a clear view at my target, but the mortar will strike right on top of me as if I called it on the rock I'm hiding behind.

that's happened to my a bunch of times lately, and I'm not even looking at any objects but the SCOM building.
 

JTsyo

Lifer
Nov 18, 2007
11,774
919
126
Does anyone else find themselves calling mortar strikes on themselves sometimes? I swear I have a clear view at my target, but the mortar will strike right on top of me as if I called it on the rock I'm hiding behind.

Happened to me yesterday for the first time. I was also sniping at a sniper behind a rock. It seemed the hit box for the rock was bigger than the visual appearance. I hit the rock 4 or 5 times before I was high enough and hit him. At first I thought I was hitting his gun since you could see a spark.

When the mortar lands on you are you behind a rock or bush? Think the hit boxes might be screwy.
 

minmaster

Platinum Member
Oct 22, 2006
2,041
3
71
yea rocks seem to have an invisible border that's bigger than what can be seen.
i've mortared myself hiding behind rocks tons of times because of this...
 

GullyFoyle

Diamond Member
Dec 13, 2000
4,362
11
81
I've walked on several rock formations where I found myself rising up in to air on invisible surfaces. Yes, there are issues.
 

bunnyfubbles

Lifer
Sep 3, 2001
12,248
3
0
yea rocks seem to have an invisible border that's bigger than what can be seen.
i've mortared myself hiding behind rocks tons of times because of this...

I've walked on several rock formations where I found myself rising up in to air on invisible surfaces. Yes, there are issues.

tree branches too

Invisible wall hit-boxes are terrible in Vietnam, never had anywhere near the same problem with BC2, I've had so many dead-on sniper shots blocked by some invisible wall in Vietnam, and the worst part is that I often get killed by the very guy I'm shooting at - somehow he can shoot through whatever blocks my shot but I can't shoot through it...



I hardly ever see anyone using the XM22...

well I do play a lot more rush than conquest but I can't imagine that it would be much different, most of the better combat medics I see are definitely using the XM22 and all my more experienced buddies definitely agree that the XM22 is better than the M60, although both are better than the RPK save for iron sights and reload time.

Maybe you see less XM22 because people already have it to platinum like I do and are working on the other LMGs to medal those up instead

proof is also in the stats:



M60 = 20.2 damage in CQC and shrinks to a minimum of 16.7 damage at long distances

XM22 = 16.7 damage in CQC and shrinks to a minimum of 14.0 damage at long distances

so while the M60 does indeed do quite a bit more damage per bullet, the XM22 has a significantly higher rate of fire at 800RPM vs. the M60's abysmal 550RPM which equates to a significantly higher rate of damage (multiply any of the damage numbers by 1.25 for magnum):

9,185-11,110 damage per minute for the M60

11,200-13,360 damage per minute for the XM22

Note that even the XM22's lowest possible rate of damage is higher than the M60's highest possible rate of damage!

Now you could say that maybe the XM22 is a lot less acurate so maybe you won't be able to get as many bullets on target as the M60, well that's not the case either when we look at the Spray and Recoil stats (lower is better) - all significantly lower other than KICK which is marginally higher, so its actually easier overall to keep your bursts or even longer streams of fire on target.

Combine that with the fact that you get DOUBLE the ammo in a mag (200 vs 100 bullets) and its negligibly longer reload time hardly ever comes in to play because you pretty much never have to reload.

Considering all of the above I think its quite clear the XM22 is, hands down, the best Vietnam LMG, and could actually use a nerf to bring it more in line with the other LMGs.
 
Last edited:

caboob

Platinum Member
Mar 31, 2000
2,214
0
76
Yes, I like the rate of fire of the XM22, M60 seems real slow when I switch back to it.
 

Zargon

Lifer
Nov 3, 2009
12,240
2
76
played on a brothers of anarchy server yesterday, wont be doing that again.

atacama conquest, nothing but baseraping.
 

GullyFoyle

Diamond Member
Dec 13, 2000
4,362
11
81
Played on a server OPPOSITE Bunnyfubbles and his buddy. Won't be doing that again.

Vietnam Rush. One round, I guess they had the chopper up the whole round, and BunnyFubbles was the pilot, because his buddy went 71/0...

So, bunnyfubbles, next time I should go sniper to take the chopper down? Medic gun was never able to finish the job....
 
Last edited:

jlee

Lifer
Sep 12, 2001
48,513
221
106
I found a hardcore server last night and had an EPIC run...was by far the top player on the server, then got a punkbuster 9014 boot shortly before the game ended. WTF...bah, I was pissed.

I learned that the 3rd rocket launcher can easily take down helicopters if you're on a small-ish map..I must've dropped him 4-6 times.
 
Last edited:

SexyK

Golden Member
Jul 30, 2001
1,343
4
76
Anyone know how large of a download the Vietnam expansion is?

As far as I know, if you have a fully patched version of the base game then you won't need to download anything - the expansion was built into the last patch and you just need a code to unlock it.
 
Status
Not open for further replies.
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |