Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: KAKAN on May 13, 2016, 11:53 AM

Title: [SOLVED]Many pickup casues lag?
Post by: KAKAN on May 13, 2016, 11:53 AM
Well, I was doing something while I discovered this.
I had about 50 pickups close to each other, and when I got over that location, I started to lag as hell.
When I used the chat, there was delay of about 8-14 seconds, even when I got 0 ping.
This doesn't happens with sphere/checkpoints, any reasons?
Title: Re: Many pickup casues lag?
Post by: Mötley on May 13, 2016, 12:20 PM
Yes someone needs to take the time and update the weapon pickups there bugged in general,.


Where the pickups on your screen(your view, your monitor)
*I do not see any where in the wiki but typically you cant not fit but so many on a screen before you lag or crash.
Title: Re: Many pickup casues lag?
Post by: aXXo on May 13, 2016, 05:07 PM
Yes, this happens.

We had a house pickup icon for every house. The Haiti/Havana area had too many pickups around the shacks. Several players noticed inconsistent lag with stuff delaying for upto 30 seconds.

To solve it you can try to create a custom pickup icon and set it's distance to 10, so it won't stream for far away players. I am not certain that it would work, but it is worth a try.

The cash pickup icon distance is lower than other general pickups, so it is not affected by this issue. I'm not sure about the weapon pickups, so it won't be a good idea to implement weapon drops on death.
Title: Re: Many pickup casues lag?
Post by: vito on May 13, 2016, 05:13 PM
the reason is object of pickup or pickup's tracking?..
Title: Re: Many pickup casues lag?
Post by: KAKAN on May 13, 2016, 05:40 PM
Quote from: aXXo on May 13, 2016, 05:07 PMso it won't be a good idea to implement weapon drops on death.
that's what I did. 10 players were in the server, while we were dming in a small place and this happened :P


Quote from: vito on May 13, 2016, 05:13 PMthe reason is object of pickup or pickup's tracking?..
dunno
Title: Re: Many pickup casues lag?
Post by: vito on May 13, 2016, 06:02 PM
I think pickups just not optimized to use it in such way.
Title: Re: Many pickup casues lag?
Post by: Mötley on May 13, 2016, 06:30 PM
Well I will slightly go off topic.

I have thought about adding to my looping method a way to create the pickup .
Since pickups can be removed just not respawned normally.

Another way in a looping method when finding the player that is in the loop would be to use an area system if the player is in the area create the pickup. Say 7 car lengths away vice versa remove the pickup. But there is still possibility of lagging a server still as there is a lot of data being possibly used(hard to explain).
Similar to aXXo's comment
Title: Re: Many pickup casues lag?
Post by: Sebastian on May 14, 2016, 11:34 AM
Quote from: vito on May 13, 2016, 06:02 PMI think pickups just not optimized to use it in such way.

I agree.
Better say the lights created by pickups are not that optimized, so when are too many onscreen, it will simply lag.

If anybody is wondering, the same lag was happening in 0.3z when doing such a thing.
I used to create lights just by spawning like 10 pickups in the same position.
Title: Re: Many pickup casues lag?
Post by: KAKAN on Jul 15, 2016, 09:02 AM
*bump*
It's not FPS lag, the server lags and the chat takes much time to respond.
Title: Re: Many pickup casues lag?
Post by: Thijn on Jul 17, 2016, 10:03 AM
Quote from: KAKAN on Jul 15, 2016, 09:02 AM*bump*
It's not FPS lag, the server lags and the chat takes much time to respond.
Why would the server lag for something as simple as telling clients there's a lot of pickups in one place?
Title: Re: Many pickup casues lag?
Post by: KAKAN on Jul 17, 2016, 11:21 AM
Quote from: Thijn on Jul 17, 2016, 10:03 AM
Quote from: KAKAN on Jul 15, 2016, 09:02 AM*bump*
It's not FPS lag, the server lags and the chat takes much time to respond.
Why would the server lag for something as simple as telling clients there's a lot of pickups in one place?
Then why does the chat much time to respond even with 0 ping? Even the players would look like they're timedout, but they're not.
Title: Re: Many pickup casues lag?
Post by: Stormeus on Jul 17, 2016, 04:18 PM
I tried starting a server with 2000 pickups (the maximum) with 440 different models all in one location and went to it. The performance loss was virtually negligible as measured. Bear in mind that this was a server whose only scripts consisted of a command to teleport to the pickup.

I'll be back soon to post screenshots of my profiler's findings.
Title: Re: Many pickup casues lag?
Post by: Xmair on Jul 17, 2016, 04:24 PM
Off topic: Can you increase the limit of objects created with CreateObject statements?
Title: Re: Many pickup casues lag?
Post by: Stormeus on Jul 17, 2016, 04:33 PM
There's a maximum of 3,000 objects that can be made with CreateObject. If you need more than that, you should be using static maps. Dynamic objects are a far bigger performance hit than pickups.
Title: Re: Many pickup casues lag?
Post by: Stormeus on Jul 17, 2016, 04:41 PM
This is a graph of CPU usage when in a server with 2,000 pickups in one place while running around and picking them up.

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FxDGUwom.png&hash=72d4a0bf2c696f62b9141ea209848f711fceb60b)
Title: Re: Many pickup casues lag?
Post by: EK.IceFlake on Jul 17, 2016, 04:50 PM
No, what he means is that the server takes a lot of time if for example you write
'ping'
it will show up in the console a few seconds later
more info here http://vkserver.big-forum.net/t3561-customprop-bug-report#50642
Title: Re: Many pickup casues lag?
Post by: Stormeus on Jul 17, 2016, 05:04 PM
Are you guys saying the server is lagging or the client?
Title: Re: Many pickup casues lag?
Post by: EK.IceFlake on Jul 17, 2016, 06:02 PM
Its something to do with the network connection I guess, or processing the received packets. Its the client.
Title: Re: Many pickup casues lag?
Post by: VK.Angel.OfDeath on Jul 17, 2016, 06:04 PM
Quote from: Stormeus on Jul 17, 2016, 05:04 PMAre you guys saying the server is lagging or the client?

I am not an expert, but it seems to be client lag. I assume the meaning of server lag is that everyone on the server experience the same lag and that isn't the case.

I tested this myself: I spawned about 50 pickups in a circle that is maybe 5-10 meter in radius. I then looked directly at the pickups, typed something in the chat and noticed that the delay was 5-10 seconds. My download rate was: 120 kbps and my streaming memory was completely full. When I asked other players (far way from the pickups) if they experienced any lag, the answer from everyone was no. I also tried doing the exact same thing with objects as well. The download rate was 12 kbps and the streaming memory usage was about the same as it was before I added the objects.

My internet connection speed is decent and my PC is also decent. My FPS remained at 60 FPS while looking at the pickups, decreased while I ran into them and I think my ping increased a little as well. Players with poor internet connection and a shitty computer seems to experience the same type of lag  (with delays up to 15 seconds in everything) if they are near 10-15 pickups with 1 to 3 other players.
Title: Re: Many pickup casues lag?
Post by: Stormeus on Jul 17, 2016, 06:42 PM
@VK.Angel.OfDeath This is a lot of good, detailed information, I think I have a good idea where to start looking. Thanks.
Title: Re: Many pickup casues lag?
Post by: ysc3839 on Jul 18, 2016, 01:09 AM
Quote from: Stormeus on Jul 17, 2016, 04:41 PMThis is a graph of CPU usage when in a server with 2,000 pickups in one place while running around and picking them up.

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FxDGUwom.png&hash=72d4a0bf2c696f62b9141ea209848f711fceb60b)
What's this software?
Title: Re: Many pickup casues lag?
Post by: . on Jul 18, 2016, 01:13 AM
Quote from: ysc3839 on Jul 18, 2016, 01:09 AMWhat's this software?

Visual Studio. By the looks of it, >=2015 version.
Title: Re: Many pickup casues lag?
Post by: Stormeus on Jul 18, 2016, 01:18 AM
The root cause for this issue's been fixed. Expect another server patch soon.
Title: Re: Many pickup casues lag?
Post by: ysc3839 on Jul 18, 2016, 02:06 AM
Quote from: . on Jul 18, 2016, 01:13 AM
Quote from: ysc3839 on Jul 18, 2016, 01:09 AMWhat's this software?

Visual Studio. By the looks of it, >=2015 version.
Where is it? I don't even know it. :o
Title: Re: Many pickup casues lag?
Post by: Thijn on Jul 18, 2016, 05:58 AM
Quote from: ysc3839 on Jul 18, 2016, 02:06 AM
Quote from: . on Jul 18, 2016, 01:13 AM
Quote from: ysc3839 on Jul 18, 2016, 01:09 AMWhat's this software?

Visual Studio. By the looks of it, >=2015 version.
Where is it? I don't even know it. :o
https://msdn.microsoft.com/en-us/library/ms182372.aspx
Title: Re: Many pickup casues lag?
Post by: KAKAN on Jul 18, 2016, 08:39 AM
Quote from: Stormeus on Jul 18, 2016, 01:18 AMThe root cause for this issue's been fixed. Expect another server patch soon.
Thanks :D Finally, I can start using pickups :)
Title: Re: Many pickup casues lag?
Post by: Stormeus on Jul 18, 2016, 05:57 PM
Should be resolved per http://forum.vc-mp.org/?topic=3333.msg24900#msg24900
Title: Re: Many pickup casues lag?
Post by: MEGAMIND on Jul 18, 2016, 07:38 PM
Y in the world will someone will use 50 pickups...?????
Title: Re: Many pickup casues lag?
Post by: KAKAN on Jul 19, 2016, 08:40 AM
Quote from: Stormeus on Jul 18, 2016, 05:57 PMShould be resolved per http://forum.vc-mp.org/?topic=3333.msg24900#msg24900
As the problem is solved, I'll lock this topic.



Quote from: MEGAMIND on Jul 18, 2016, 07:38 PMY in the world will someone will use 50 pickups...?????
I'm going to use more than 500 pickups this time :p