precaching models 100% cpu
hello,
i'm precaching some models, so many that cpu is between 100% - 120% when precaching them engfunc_precache_model gives the same result is there any way to decrease this cpu usage while precaching? |
Re: precaching models 100% cpu
show your script.
|
Re: precaching models 100% cpu
How do you know it's during precaching? Also, I find it unlikely that you'd be able to precache enough models to make any significant impact on processor time without exceeding the model limit.
|
Re: precaching models 100% cpu
PHP Code:
what i tried: after many tries to discover the problem, not precaching the models has the cpu between 60-75. i searched for a method to read the file, so after reading some documentations i found textparse_inc in amxx 1.9.0 api changes i did some workaround to work with this text format and somehow managed to read the file, but the cpu load is the same. precaching some models in section config_default_skins, i tried to not use precache_model if they have been already precached, but the problem it's still there i know this occurs when precaching because i debugging it, after precaching the models the processor was in ~100% (i expecting there is a delay of aprox 1 seconds betweeen what's happening in the server and what the pterodactyl panel shows) can this be caused by the size of the .mdl files? i'm using submodels |
Re: precaching models 100% cpu
1 Attachment(s)
Took me 64 milliseconds to run.
Obviously I don't have your models so I had to make changes. The forum doesn't allow the words "Black Magic". Hilarious.
Spoiler
|
Re: precaching models 100% cpu
On a quick look it seems ok. There is just 2 things you can change:
When you do += 1 you can just do ++ for example g_iRanksNum++ And you don’t need to return plugin_continue at the end. It won’t increase cpu but yeah, good coding habits. About the cpu problem is it when the plugin_precache is called or is it when a player joins? Try to restart your server without players on it,on your game panel. If it only happens when a player is joining and if you don’t have a fastdl link than it’s normal your cpu will increase because players are doing several downloads from the server. |
Re: precaching models 100% cpu
Quote:
not precaching them: https://imgur.com/ViKrliV precaching them: https://imgur.com/GyVPgkj Quote:
i'm testing on linux on a server that doesn't have players. can be caused by vps sys specs? cpu: AMX Ryzed 9 5900X (4.90GHZ) RAM Memory: 1gb it's a bought host |
Re: precaching models 100% cpu
Quote:
|
Re: precaching models 100% cpu
Quote:
|
Re: precaching models 100% cpu
On set_fail_state why don't you do a return after it, to stop initiating commands within the plugin.
|
All times are GMT -4. The time now is 07:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.