| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| Planet list slowdown https://mail.black-squirrel.com/viewtopic.php?f=52&t=26096 |
Page 1 of 2 |
| Author: | John Pritchett [ Fri Jun 04, 2010 12:29 am ] |
| Post subject: | Planet list slowdown |
Ok, I'm looking at the issue of long planet lists bogging down a server. I know we got into questions of whether we should allow that many planets, or whether the planet "touch" function is as efficient as it could be, but I think the real issue here is something that's actually been dealt with in other places and just overlooked here because long planet lists are less common. Generally, whenever there's the possibility of a long display, especially when there's overhead associated with generating that display (like the known universe display, or many CIM displays), the game does some pacing to avoid one session hogging too much CPU. So that's what needs to be done here, and while I'm at it, I would like to consider if there are any other long, high-overhead displays that need to be paced. I'm curious if there are objections to putting planet lists on the list of "screen pause" displays. These are displays that are automatically given a "more" prompt whenever they go longer than a single screen. Screen pause is a user setting, and it seems like someone who wants screen pauses would like to have long planet lists (or any long sector display lists) pause between screens. Any thoughts? That isn't really the solution to this problem, but just something I noticed while looking at this problem. It seems like any long list like this where a player might actually be reading the list, it's good to have the option for a screen pause. But to actually solve this problem, I need to put in either a per-line delay or a per-screen delay just to make sure the game gives up the CPU for other apps. I should be able to do that in a way that won't be too noticeable. Let's give it a try and see if there are any issues with it. |
|
| Author: | Promethius [ Fri Jun 04, 2010 12:35 am ] |
| Post subject: | Re: Planet list slowdown |
In the problem I brought up about the large numbers of planets, we abort the displays anyway and still kill the server. |
|
| Author: | Singularity [ Fri Jun 04, 2010 12:39 am ] |
| Post subject: | Re: Planet list slowdown |
Yup. Abort the list, CPU still bogs. This happens w/ resource movers, too, even on a smaller (aborted) list. |
|
| Author: | John Pritchett [ Fri Jun 04, 2010 3:46 am ] |
| Post subject: | Re: Planet list slowdown |
That's because aborting the display only aborts the output, not the processing. That could be changed, but I'm under the impression that part of the problem is with people abusing the long planet lists specifically to bog down the server. Either way, I think it's best to put some pacing on this or any open-ended command like this. There just need to be limits on this kind of processing. There will be some slowdown, so I need feedback to make sure it doesn't slow things down too much. I just need to get the right balance. |
|
| Author: | Cruncher [ Fri Jun 04, 2010 10:31 am ] |
| Post subject: | Re: Planet list slowdown |
Is it possible to have the planet list pause as a toggle under player preferences? C, N,... |
|
| Author: | John Pritchett [ Fri Jun 04, 2010 12:27 pm ] |
| Post subject: | Re: Planet list slowdown |
I was asking for people's thoughts on that above. I'd like to add the planet scanner list and also sector display to the "screen pause" option under personal settings. These lists can both get pretty long and I think it makes sense to have them pause on screen like other long displays. Are there any other long lists that were missed when I added the screen pause option? |
|
| Author: | John Pritchett [ Fri Jun 04, 2010 2:08 pm ] |
| Post subject: | Re: Planet list slowdown |
Ok, I went through the displays and added configurable page breaks to these displays that did not use them: sector display planet scanner display corporate list corporate ranks corp assets list deployed fighter scan deployed mine scan This is configured as Computer/Personal Settings/Screen Pauses. Scripters generally keep these off, so this is for the manual player. Just a little cleanup here. If there are any objections, let me know. |
|
| Author: | Legion [ Fri Jun 04, 2010 2:10 pm ] |
| Post subject: | Re: Planet list slowdown |
does the long ship list do the same bogging down as a long planet list? |
|
| Author: | John Pritchett [ Fri Jun 04, 2010 2:15 pm ] |
| Post subject: | Re: Planet list slowdown |
It shouldn't, because it's not locking the data files in order to update records. That's where the overhead comes in. Planet and port updates require multiple file locks, and when you cycle through many of them, especially when more than one person is hitting the same list, it can get pretty messy. |
|
| Author: | Singularity [ Fri Jun 04, 2010 4:24 pm ] |
| Post subject: | Re: Planet list slowdown |
John Pritchett wrote: I was asking for people's thoughts on that above. I'd like to add the planet scanner list and also sector display to the "screen pause" option under personal settings. These lists can both get pretty long and I think it makes sense to have them pause on screen like other long displays. Are there any other long lists that were missed when I added the screen pause option? If people are aborting the display, it won't show the screen pause (or at least it shouldn't). But that means the road to abuse is still there, since people generally do not display large lists. Likewise, the problem still happens on small lists if you use a macro resource mover. If you add a small amount of pacing, be careful. Pgridding would be very affected by that, so make sure it's small. If there's any other way... And the ship list DOES cause a lag. Get 100 ships, xport back and forth between them. You'll see a big spike in CPU usage. |
|
| Author: | John Pritchett [ Fri Jun 04, 2010 4:51 pm ] |
| Post subject: | Re: Planet list slowdown |
Ah, didn't catch that at first, but ship display is running a warp route for each ship, so yeah, there is a significant amount of overhead there. Good catch. I'd say that planet update, port update, and warp path scanning are the heaviest load in the game. Any operation that has the potential to run many of these operations without any pacing is a bad thing, because one user session can grab all of the CPU for however long it takes to complete that operation. What I'd like to do is put in a "release CPU" operation on these commands. That allows the OS to be more smart about balancing the load. If nobody else is on, the operations will run very quickly. If others are on, though, it will slow things down, but in a balanced way. Better to slow everyone down a little than to freeze some while others get 100% CPU. |
|
| Author: | Singularity [ Fri Jun 04, 2010 7:32 pm ] |
| Post subject: | Re: Planet list slowdown |
John Pritchett wrote: I'd say that planet update, port update, and warp path scanning are the heaviest load in the game. Any operation that has the potential to run many of these operations without any pacing is a bad thing, because one user session can grab all of the CPU for however long it takes to complete that operation. What I'd like to do is put in a "release CPU" operation on these commands. That allows the OS to be more smart about balancing the load. If nobody else is on, the operations will run very quickly. If others are on, though, it will slow things down, but in a balanced way. Better to slow everyone down a little than to freeze some while others get 100% CPU. As long as it's not a fixed mandatory delay, there's no problem. It basically means that landing will be delayed by an OS cycle, and that's not enough to worry about in most cases. It also means that a smart player can use these commands to time the load of the server, and grid when it's the least. Frankly, I kind of like that... If you do add a fixed delay, keep it less than 10ms, preferably 5ms or less. Otherwise it shifts the balance outta wack. |
|
| Author: | John Pritchett [ Fri Jun 04, 2010 8:19 pm ] |
| Post subject: | Re: Planet list slowdown |
Unfortunately, I don't have that kind of fine control over delays. Anything less than 20 ms is beyond the resolution of the clock. At least I can't rely on getting better than that. Using 0 delay means that I'll get back as soon as possible after releasing the time slice to another equal-priority app. "A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution." so that's really the best I can do here. |
|
| Author: | Singularity [ Fri Jun 04, 2010 8:24 pm ] |
| Post subject: | Re: Planet list slowdown |
John Pritchett wrote: so that's really the best I can do here. I think that will work beautifully. |
|
| Author: | John Pritchett [ Fri Jun 04, 2010 8:30 pm ] |
| Post subject: | Re: Planet list slowdown |
Well, we'll definitely see. Let's get it up there and you guys can give it a pounding and make sure it doesn't slow your pace too much. |
|
| Page 1 of 2 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|