DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • May 20, 2013, 11:45:44 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: 1 [2] 3   Go Down
  Print  
Author Topic: Server Optimization and SQL peaks.  (Read 5298 times)
0 Members and 1 Guest are viewing this topic.
SinisterDragon
Codemeister
****
Offline Offline

Posts: 445



View Profile WWW
« Reply #15 on: September 27, 2006, 10:15:23 PM »

i'm guessing that on my site, the page gen times are due to the number of queries

I haven't gone through the rest of my modules yet.  I'm sure i'll find some more to get rid of.  Ones that i don't really need.  Hopefully that will help out some Cheesy
Logged

XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #16 on: September 27, 2006, 10:35:30 PM »

The Blue page time stats MIGHT be affected by having only two users  Grin But the queries aren't.
So, actually your server with fewer users is slower than the one which is played upon? Grin
Logged

Running for more than three years now:
SaucyWench
Moderator
Mod God
*****
Offline Offline

Posts: 2238


I'm a good girl.


View Profile WWW
« Reply #17 on: September 28, 2006, 12:09:31 AM »

Yeah! Hehehe. I noticed a while back that Blue is a bit bogged down. It's had a lot of modules installed and uninstalled and it's had a lot of changes... it's a bit like Windows XP after a couple of years - it needs a reinstall Wink

On the other hand, maybe it's the fabulous code changes to 1.1.0 that make that one faster Cheesy (We'll ignore the fact that Blue has a LOT more modules installed!)
Logged

SaucyWench
Owner of GemDust.com and Darton City proudly hosted by LunarPages
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #18 on: September 28, 2006, 12:15:11 AM »

Yes... We'll ignore that... :p

And the code changes, which will affect performance are in 1.1.1 Wink The 1.1.0 changes were not really performance improvements... :p
Logged

Running for more than three years now:
Nightborn
Guest
« Reply #19 on: September 28, 2006, 01:33:09 AM »

@sinisterdragon

your number indicates datacaching is turned off =) turn it on.
Logged
SinisterDragon
Codemeister
****
Offline Offline

Posts: 445



View Profile WWW
« Reply #20 on: September 28, 2006, 09:48:28 AM »

that's most likely the issue...but i'm not sure how to set it up
can i just set it to any directory in my webspace?
Logged

Nightborn
Guest
« Reply #21 on: September 28, 2006, 10:41:14 AM »

theoretically...

but make folder permissions 777
and there may be a php open_basedir_restriction active... so it must a subfolder of the directory the domain points to. (or the respective basedir)
Logged
SinisterDragon
Codemeister
****
Offline Offline

Posts: 445



View Profile WWW
« Reply #22 on: September 28, 2006, 11:00:09 AM »

with the help of NightHawk, i got it figured out
and now my login page is down to 60 queries
and my village is at around 220 or so
Cheesy
Logged

Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #23 on: September 28, 2006, 11:02:57 AM »

Let it work for a while and it might be even better. Mine is 10/60, index and village respectively. But, that is just because I'm cool.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Nightborn
Guest
« Reply #24 on: September 28, 2006, 11:47:36 AM »

and my village is at around 220 or so
Shocked

you should reduce your modules that hook in village...

*arf* what are those 200 queries do at the village?

my village has 84 queries. If I'd have 220... oh well, a bicycle driver would surpass me on the motorway....

a 60 queries login page is too much, really.

you have to be careful about modules that you install... check the performance (I've had this discussion with many people many times) of them. How many queries do they do, where do they hook in.
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #25 on: September 28, 2006, 11:49:51 AM »

It's not necessarily the village-hook that is used. It might also be several modules that add content to the charstats area.
Logged

Running for more than three years now:
Nightborn
Guest
« Reply #26 on: September 28, 2006, 12:08:23 PM »

Agreed. But normally there are all shops of all cities on this hook.

Charstats might be about 10 if you install quite some stuff. Up to 20 maybe.

But, without the exact server config, we don't know.

Sinisterdragon, be so kind to execute the following query:

Code:
Select location,count(location) as location_counter from module_hooks
 group by location order by location ASC;

and then you'll see how many modules are hooked in where.
Logged
SinisterDragon
Codemeister
****
Offline Offline

Posts: 445



View Profile WWW
« Reply #27 on: September 28, 2006, 12:15:34 PM »

location    location_counter
adjuststats    3
ale    1
apply-specialties    5
battle    2
battle-defeat    3
battle-victory    2
bioinfo    5
biostat    8
changesetting    21
charstats    18
check-create    1
checkuserpref    1
check_su_access    1
choose-specialty    5
chooserace    10
cities-usetravel    1
collapse-nav{    1
collapse{    1
commentary    1
count-travels    1
create-form    1
creatureencounter    6
dagnav    1
dagquests    3
darkhorsegame    3
delete_character    4
dk-preserve    1
donation    1
dragonkill    17
dragonkilltext    6
drinks-check    3
drinks-text    2
dwellings    3
dwellings-buy-valuecheck    1
dwellings-list-interact    1
dwellings-list-type    3
dwellings-manage    2
dwellings-maxkeys    1
dwellings-pay-costs    1
dwellings-sold    1
everyfooter    2
everyheader    1
everyhit    2
faq-toc    3
fightnav-specialties    5
footer-bank    2
footer-gardens    1
footer-hof    6
footer-prefs    1
footer-runmodule    5
forest    4
funddrive_getpercent    1
gardens    1
graveyard    1
header-graveyard    1
header-inn    2
header-modules    1
healmultiply    1
heidi-end    1
hprecalc    4
incrementspecialty    5
index    1
inn    5
inn-desc    1
innchatter    1
master-autochallenge    1
moderate    11
mountfeatures    2
namechange    3
newday    60
newday-runonce    5
notifyuserprefchange    1
onlinecharlist    1
pointsdesc    1
pre-travel    1
prefs-save    1
process-create    2
pvpadjust    8
pvpmodifytargets    2
pvpwarning    1
pvpwin    1
raceminedeath    10
racenames    10
ramiusfavors    1
scrolls-signetsale    4
set-specialty    5
setrace    10
shades    1
showsettings    1
soberup    1
specialtycolor    5
specialtymodules    5
specialtynames    5
stablelocs    2
stables-desc    1
stables-nav    1
stabletext    1
superuser    13
template-collapse    1
training-victory    1
travel    10
validateprefs    1
validatesettings    3
validforestloc    8
validlocation    8
village    31
village-desc    4
villagetext    9
}collapse    1
}collapse-nav    1
Logged

Nightborn
Guest
« Reply #28 on: September 28, 2006, 12:26:38 PM »

if you want to know what modules are executed there, do:
Code:
select * from module_hooks where location='LOCATION';

where LOCATION = the location you want.

just a quick glance:

adjuststats    3 <-- check this, who this needs (without further checking I don't know if it is called every pagehit, but I think so.
battle    2 <--called every single battle page in the forest, see if it is necessary
battle-defeat    3 <-- dito, after a defeat
battle-victory    2 <-- dito, after a win
charstats    18 <-- 18 modules are executed every single pagehit there...
everyfooter    2 <-- check if it necessary, normally there are ads
everyheader    1 <-- check if necessary
everyhit    2 <--bad bad, try to remove it if it is not necessary (i.e. lotgd-utils don't need this, I modified my version before I stopped using it to the village hook there which it already used)
footer-runmodule    5 <--very very bad... check them out and if you use 1.1.0 suggest the author an upgrade to use footer-$modulename hook

just 2 cents.
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #29 on: September 28, 2006, 12:40:51 PM »

adjuststats    3 <-- check this, who this needs (without further checking I don't know if it is called every pagehit, but I think so.
This is only used in the Dark Hose tavern and at the beginning of PvPs...

battle    2 <--called every single battle page in the forest, see if it is necessary
Not necessarily every battle page... Maybe even every round! (5, or 10 times each page load!)

battle-defeat    3 <-- dito, after a defeat
battle-victory    2 <-- dito, after a win
Should definately check, if these are necessary for every fight... or if there's an exit-early-condition triggered (see newbieisland.php for what I'm talking about...)

charstats    18 <-- 18 modules are executed every single pagehit there...
Each race does (in pre1.1.1), every charstat module (won forest fight, showcharm, expbar, newdaybar, custumeq ...)

everyfooter    2 <-- check if it necessary, normally there are ads
everyheader    1 <-- check if necessary
should be checked... most of the times they might be recoded (if no ads..)
everyhit    2 <--bad bad, try to remove it if it is not necessary (i.e. lotgd-utils don't need this, I modified my version before I stopped using it to the village hook there which it already used)
As Nightborn said... there are only two modules I know, which really need this... One is not publically released (captcha) and on is the newbieisland (although this might trigger at some other place as well... village and / or news, for example...)

footer-runmodule    5 <--very very bad... check them out and if you use 1.1.0 suggest the author an upgrade to use footer-$modulename hook
nothing to add. Smiley
Logged

Running for more than three years now:
Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
19 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search