Alright, let's see...
1. Math.sqrt is a quite expensive method. Instead of using something like this:
distance = Math.sqrt(((client.x - j) ** 2) + ((client.y - i) ** 2))
return true if distance <= piece.power - 1
you should better use something like this:
squared_distance = (client.x - j) ** 2 + (client.y - i) ** 2
return true if squared_distance <= (piece.power - 1) ** 2
** is way less expensive than Math.sqrt. Just be careful not to mess up your code, I took a look at it. In any case decrease calculating the same stuff to a minimum. You have a lot of RAM at your disposal and Ruby is a slow language. So trade in CPU time for RAM expense any time you can.
2. Your source update is too CPU heavy (hence the lag). I noticed that you keep calling effective_power which seems to be quite a CPU heavy method. Rather than updating it constantly, it would be a good idea to edit Client#update. I noticed that you add stuff to @source_effective_powers without adding stuff to @sources_in_range and call effective_power regardless if the source is actually in range. I think you should put it both in the if branch.
3. Generally that update is too heavy. Rather than calculating how the effective power is each time, you should create a variable that that indicates how big the effective_power is by default and then simply use a modifier depending on the range. This should take off a load of unnecessary calculation. In fact you should first find the closest source and only then only for that source call the effective_power method. This should take a load off the CPU.
4. The rest of the lag comes from high ranges of the sources.
5. Suggestion: It would be a very good idea if you made the sources work via events since like this it works for one map only. If you make the config work with event comments, keep in mind that you should limit it to having comments in the first line or else noticeable lag can occur when refreshing the map. If you decide to use event names, keep in mind that you won't be able to switch a source, except if you allow renaming the event and reevaluating the source configuration in the name. I suggest the latter since it's faster, I did the same in Blizz-ABS.
6. If you give me credit for this, I won't love you anymore. ._.