Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 10 11 12 13 14 … 18 Next »
Questions on global cpu time quota server.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pages (2): 1 2 Next »
Threaded Mode
Questions on global cpu time quota server.
26-10-2015, 06:22 PM, (This post was last modified: 26-10-2015, 06:23 PM by Yuri6037.)
#1
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
Questions on global cpu time quota server.
Hey all,

This mainly addresses to anyone who knows global cpu time quota on the server.

I have just a few questions... I'm asking that because I already got that error so many time with a ship with 6 server instances...
On what is based this global cpu time quota calculation ? Is it based on cpuTime() output or is it based on the average ?
What realy is that quota, how does it work ?

And for the last question, a question that I'm not sure anyone will answer...
What is the value set in server config for this quota ?


In the hope of answers to my questions,
Thanks by advance,
Yuri6037
Find
Reply
26-10-2015, 06:30 PM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Questions on global cpu time quota server.
The quota is based on the average CPU time usage per tick. If you want to monitor your usage, use cpuAverage().

The current quota is set at 1500µs, if you're going anywhere near 100µs consistently you're probably doing something bad.
Find
Reply
26-10-2015, 06:33 PM, (This post was last modified: 26-10-2015, 06:34 PM by Yuri6037.)
#3
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: Questions on global cpu time quota server.
Well my AI at full combat time (calculate enemy stats/analysis/weapon auto re target) brings the average to 1100 micro seconds plus about 400/500 for my old SG control screen. Without taking care of the other processors...
Find
Reply
26-10-2015, 06:37 PM,
#4
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Questions on global cpu time quota server.
That's way too high for something like that. I'd look over what you're doing and consider what is and isn't needed, and also consider not doing it every tick.
Find
Reply
26-10-2015, 06:41 PM, (This post was last modified: 26-10-2015, 06:45 PM by Yuri6037.)
#5
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: Questions on global cpu time quota server.
I'll tell you what I'm doing :
Enemy analyzing (getConstraints on enemy ship, note that the code is not finished so it's not currently running with the rest of combat systems)
Weapon retarget (that's what pumps much, for loop in think for good precision)
Self test analysis (done on EntityTakeDamage when hits the ship itself, enables alets/do final warp intended to save itself)

By the way, I forget thank you so much for giving me the algorithm used and for the server.cfg variable. I'll make a Starfall screen that will display each 5 seconds my global cup time in % so I know what processor is the problem even if I'm practically sure the problem is LanAI weapon retarget.
Find
Reply
26-10-2015, 09:01 PM,
#6
rouing Offline
#RBR15 - Rekt by Rouing 2015
****
Posts: 295
Threads: 27
Joined: Jul 2014
RE: Questions on global cpu time quota server.
(26-10-2015, 06:41 PM)Yuri6037 Wrote: I'll tell you what I'm doing :
Enemy analyzing (getConstraints on enemy ship, note that the code is not finished so it's not currently running with the rest of combat systems)
Weapon retarget (that's what pumps much, for loop in think for good precision)
Self test analysis (done on EntityTakeDamage when hits the ship itself, enables alets/do final warp intended to save itself)

By the way, I forget thank you so much for giving me the algorithm used and for the server.cfg variable. I'll make a Starfall screen that will display each 5 seconds my global cup time in % so I know what processor is the problem even if I'm practically sure the problem is LanAI weapon retarget.

Alot of that is very very low usage things.

What is this love you speak of?
Find
Reply
26-10-2015, 10:17 PM,
#7
Destiny's Player Offline
A passing by member
***
Posts: 237
Threads: 35
Joined: Dec 2013
RE: Questions on global cpu time quota server.
The first two should only run on setting the target, the third one should only run on EntityTakeDamage. Or something like that, not sure, I'm kinda braindead at the moment.
Find
Reply
26-10-2015, 10:21 PM,
#8
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: Questions on global cpu time quota server.
(26-10-2015, 10:17 PM)Destinys Player Wrote: The first two should only run on setting the target, the third one should only run on EntityTakeDamage. Or something like that, not sure, I'm kinda braindead at the moment.

The third is already on EntityTakeDamage the problem is not here.
The first one will be ran on set target when done (I still need to make some tests in case I'm not allowed to getConstraints on other's entities)
The second must run in think : cause : imagine moving target, how would you retarget ?
Find
Reply
27-10-2015, 02:41 AM,
#9
TheOneAndOnlyTee Offline
GMod Admin
Posts: 755
Threads: 47
Joined: Oct 2013
RE: Questions on global cpu time quota server.
I loop through my weapons every 0.4 seconds and i've got no problems with moving targets, a think hook for it is just insane.
My weapons usage was about 20-30us but i refined it down to 15-20, ordering the weapons by count; ie i've got 10 beam emitters and 2 torps so i put beam emitter action at the top

Also i wasn't even aware that you could do getConstraints on other people's entities, doesn't that require perms?

Steam Profile
My Discord Server
Need help with E2 or SF? , just ask me and i'll try to help.
[Image: 98Dkcoz.gif]
Find
Reply
27-10-2015, 07:08 AM,
#10
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: Questions on global cpu time quota server.
(27-10-2015, 02:41 AM)T-17 Wrote: I loop through my weapons every 0.4 seconds and i've got no problems with moving targets, a think hook for it is just insane.
My weapons usage was about 20-30us but i refined it down to 15-20, ordering the weapons by count; ie i've got 10 beam emitters and 2 torps so i put beam emitter action at the top

Also i wasn't even aware that you could do getConstraints on other people's entities, doesn't that require perms?

Well I haven't tested... If you read in details you'll see it's an idea I got.
I'll make some tests with that... By the way I saw find works for all entities even other's entities, so I think it should work with my custom getConstraints.
Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • View a Printable Version
Forum Jump:


Users browsing this thread:
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.