Raised This Month: $51 Target: $400
 12% 

linux entity issues insane cpu load


Post New Thread Reply   
 
Thread Tools Display Modes
JusTGo
Veteran Member
Join Date: Mar 2013
Old 05-30-2015 , 06:04   Re: linux entity issues insane cpu load
Reply With Quote #11

Quote:
Originally Posted by h010c View Post
I don't think that I was clear enough with my explanations. Here is what happens:



are you testing on the same specs ? cpu,ram...etc
JusTGo is offline
h010c
Member
Join Date: Aug 2009
Location: Mother Russia, Moscow
Old 05-30-2015 , 06:05   Re: linux entity issues insane cpu load
Reply With Quote #12

Quote:
Originally Posted by Arkshine View Post
You don't seem to understand that your example is invalid and silly. Game will never do that, nor a plugin.
Bailopan's CSDM has been doing it since 2006. An excellent example of silly programming.

All I wanted to get here is a response from someone with a unix server capable of spending a couple of minutes to test a very small plugin. All I got was a bunch of useless obvious advices and theoretical conclusions. I guess I'll have to try my luck somewhere else.
/thread

P.S.
Quote:
Originally Posted by Arkshine View Post
Note: Please don't PM people, I can see myself there are answers. It's annoying. Don't do it again
That was my first PM ever on this forum since 2009. I am sorry for being THAT annoying. Have a nice day.
h010c is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-30-2015 , 06:31   Re: linux entity issues insane cpu load
Reply With Quote #13

Quote:
Bailopan's CSDM has been doing it since 2006. An excellent example of silly programming.
Could you please show me where it spawns n entities in a row and at the same place, please?
EDIT: I did not see origin was the not the same in your code. It doesn't change fact that dealing with entity is expensive. You can probably confirm it depending properties (like if not rendered, and/or not linked to the world, this should reduce the load since it doesn't interact with others things)

Quote:
All I wanted to get here is a response from someone with a unix server capable of spending a couple of minutes to test a very small plugin. All I got was a bunch of useless obvious advices and theoretical conclusions. I guess I'll have to try my luck somewhere else.
Unless I've misunderstood you, you're posting in such section because you think the CPU load is because of AMXX. I've answered you, it's not. This is not a theoretical answer, it's a fact. I've already answered you that what does AMXX from your code is just calling directly engine (game) functions. Just wrappers. AMXX does nothing else, once called, it's about how the engine handles things from this side and obviously there is nothing we can do for that. Still, the CPU load makes sense anyway, if you don't want to understand engine does a lot of things when you play with entities, please keep away your stubbornness. Considering you seems to know what is right or not, why are posting there? The best way is to learn how engine works, and you can consider looking at the code yourself (you can find it on github), this way maybe you will trust your own eyes.

Quote:
hat was my first PM ever on this forum since 2009. I am sorry for being THAT annoying. Have a nice day.
I receive each day such kind of messages, so from my perspective, it's really annoying. It's just another random pointless messages to bring my attention on something.
__________________

Last edited by Arkshine; 05-30-2015 at 06:44.
Arkshine is offline
Infernuz
Member
Join Date: May 2011
Old 05-30-2015 , 06:36   Re: linux entity issues insane cpu load
Reply With Quote #14

claudiuhks, didn't help. Still the same, though now it just randomly jumps between 13% to 18%.
Infernuz is offline
Send a message via ICQ to Infernuz
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-30-2015 , 12:52   Re: linux entity issues insane cpu load
Reply With Quote #15

Out of curiosity, I tested code on my shitty test server under linux (small VPS).

Just used 'stats' command.

Started to 2%, with empty server.

- With the entities, I jump to +3% , so ~5% constantly.
- When I enter in the game, it takes ~ +0.5/1%, so ~6% constantly.

This looks like expected results.

As I've said, depending what you're doing, this will eat CPU.
For example, if you set MOVETYPE_FLY property, you're asking engine to check for collision, which is an expensive operation, and the more entities you have, the more it will cost CPU.

- For fun, tried to not set this property in the code, and I'm now at ~3/3.5%. Just by removing this property.


I don't know well engine, but for context where you want items on the ground, there are likely way to optimize things.
To make them more static from engine perspective, that's it.
__________________

Last edited by Arkshine; 05-30-2015 at 12:54.
Arkshine is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-30-2015 , 16:16   Re: linux entity issues insane cpu load
Reply With Quote #16

Quote:
Originally Posted by Infernuz View Post
claudiuhks, didn't help. Still the same, though now it just randomly jumps between 13% to 18%.
What is your CPU brand and model?
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 05-30-2015 , 16:23   Re: linux entity issues insane cpu load
Reply With Quote #17

You could just use 1.8.3 and use cs_create_entity to create a weaponbox entity since as far as i can see you want to create a fake weapon entity but you want it to be like a real one, so just create a real weaponbox..
__________________
Jhob94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 05-30-2015 , 16:31   Re: linux entity issues insane cpu load
Reply With Quote #18

Quote:
Originally Posted by Jhob94 View Post
You could just use 1.8.3 and use cs_create_entity to create a weaponbox entity since as far as i can see you want to create a fake weapon entity but you want it to be like a real one, so just create a real weaponbox..
For amxx versions <183 I have posted a native in tutorials section. Just saying, in case he wants to use 1.8.2
__________________

Last edited by HamletEagle; 05-30-2015 at 16:31.
HamletEagle is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-30-2015 , 23:20   Re: linux entity issues insane cpu load
Reply With Quote #19

Answer the next questions.

Quote:
Originally Posted by JusTGo View Post
are you testing on the same specs ? cpu,ram...etc
Quote:
Originally Posted by claudiuhks View Post
What is your CPU brand and model?
By the way, this is why I hate Linux as well. Haven't tried OS X yet.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode