| Author |
Message |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Mon Apr 05, 2004 6:09 am |
  |
March saw 5.1 million page hits alone. Its not optimized for speed whatsoever, and the interesting thing is... for the most part the portal runs very fast, even with 1000 or more pages served in any previous 5 minute timeframe.
Curious, one would think at such volumes there would be a sustained slag, but... I have to remind myself... the answer to the slow slag has been hardware upgrades.
So what does this mean?
To solve slag:
- optimize code
- throw better hardware at it |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
Mesum
Support Staff


Joined: Mar 11, 2003
Posts: 842
Location: Chicago
|
Posted:
Mon Apr 05, 2004 7:11 am |
  |
Exactly, I learned it very fast with PakistaniMedia.com too, they site was only doing 600K hits a month and our shared server started to lag so much, it will unreal. As of right now, we get about 1.2 million page views and you can check out the site, no lag what so ever! The solution was same, optimized code and own server  |
_________________ Only FREE Dating site for Desis. |
|
       |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Mon Apr 05, 2004 10:00 am |
  |
The problem I'm running into now is having two high volume sites on the same server... it still causes issues when lots of visitors come in during peak times. Both sites would server better if they lived on their own boxes. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
Mesum
Support Staff


Joined: Mar 11, 2003
Posts: 842
Location: Chicago
|
Posted:
Mon Apr 05, 2004 10:21 am |
  |
Yeah that's what I was thinking... This site has started to lag already... Maybe time to move to a newer server.
I got mine from ServerMatrix.com, they seem to have nice prices. |
_________________ Only FREE Dating site for Desis. |
|
       |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Mon Apr 05, 2004 10:42 am |
  |
I see they have a 3 nines policy. However I'm happy with my current host... as my quote goes:
"My websites focus on computer security and content management development. Security is everyone's business and Computer Cops serves 4 million hits per month. Its needs are demanding: uptime, availability, responsive & engaging tech support, fast resolutions. JagPC ensures I get all these along with a great deal of personalization. The staff takes on a can-do attitude while delivering service above and beyond the call of duty to ensure ComputerCops.biz and NukeCops.com are up and running smoothly all the time."
-- Paul L. ::ComputerCops:: |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
steven111
Lieutenant


Joined: Dec 30, 2003
Posts: 283
|
Posted:
Sun May 09, 2004 11:33 pm |
  |
| Zhen-Xjell wrote: |
| The problem I'm running into now is having two high volume sites on the same server... it still causes issues when lots of visitors come in during peak times. Both sites would server better if they lived on their own boxes. |
Like you, I run multiple sites on one dedicated server. I would think that what makes such a config. slow is the lack of memory for mysql to cache indecis and tables required for two or more db's and applications. I don't think the limiting factor is CPU.
If I am right, then I would think adding memory, and dedicating that extra memory to mysql caching, would help a lot.
Any thoughts on that. |
_________________ ezClassifieds|Forums:Auto,Mac,Job,Win,HW |
|
    |
 |
djmaze
Captain


Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
|
Posted:
Sun May 09, 2004 11:46 pm |
  |
Run a
| Code: |
| $db->sql_freeresult($result); |
When you don't need the content of the query anymore.
This reduces the memmory which is used to generate the page.
That way on high load systems you have more memory free for mysql.
When there are only a few people online it's almost useless. |
_________________ Famous people never give their signature
http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please  |
|
    |
 |
steven111
Lieutenant


Joined: Dec 30, 2003
Posts: 283
|
Posted:
Sun May 09, 2004 11:54 pm |
  |
Hi dj,
Long time, no talk. Always appreciate your contributions, and your great distro.
I am wondering if running: $db->sql_freeresult($result);
has any benefit, since a page completes very quickly in any case. i.e. if you don't cleanup using that statement, would the used memory sit in limbo, and would then have to be collected back by some slow garbage collection process.
Am not too familiar with php internals to know if that makes a difference. Have you run some benchmarks?
steve |
_________________ ezClassifieds|Forums:Auto,Mac,Job,Win,HW |
|
    |
 |
djmaze
Captain


Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
|
Posted:
Mon May 10, 2004 1:07 am |
  |
I need to run memory benchmarks for that.
So i just changed my mainfile.php to run sql_freeresult() everywhere in that file.
Now i only need to keep an eye on my mysql mem usage for today and yesterday.
But it seems not to affect page generation times, it only frees mem where needed.
Have patients  |
_________________ Famous people never give their signature
http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please  |
|
    |
 |
djmaze
Captain


Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
|
Posted:
Wed May 19, 2004 2:40 pm |
  |
indeed my mem usage for MySQL dropped from 50 to 45 MB on occasions.
ofcourse the difference where not a lot in mainfile.php itself because we use your nice "static" tweak.
So i started modifying more files and it seems to work nicely. |
_________________ Famous people never give their signature
http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please  |
|
    |
 |
Coop
Nuke Soldier


Joined: Mar 03, 2004
Posts: 23
Location: Leeds, UK
|
Posted:
Thu May 20, 2004 5:46 pm |
  |
So you just put that after an sql query then? (one which I don't require anymore) Show me an example if possible please  |
_________________ My eyes! I'm not supposed to get pudding in them!
http://www.crooze-control.com |
|
      |
 |
djmaze
Captain


Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
|
Posted:
Fri May 21, 2004 1:11 am |
  |
$result = $db->sql_query("SELECT * FROM nuke_users WHERE username = 'bob'");
$userinfo = $db->sql_fetchrow($result);
$db->sql_freeresult($result); |
_________________ Famous people never give their signature
http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please  |
|
    |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Fri May 21, 2004 6:04 am |
  |
I've littered the entire codebase using the freeresult a few weeks back. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
djmaze
Captain


Joined: Nov 29, 2003
Posts: 566
Location: Netherlands
|
Posted:
Fri May 21, 2004 3:32 pm |
  |
| Zhen-Xjell wrote: |
| I've littered the entire codebase using the freeresult a few weeks back. |
Great ZX 3 thumbs up to you.
And what was the difference ? |
_________________ Famous people never give their signature
http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please  |
|
    |
 |
hamesh
Support Mod


Joined: Feb 13, 2003
Posts: 170
Location: Canada
|
Posted:
Fri May 21, 2004 4:46 pm |
  |
Perhaps a little, late, but I see that nukecops doesn't use compression. You could reduce server load and speed considerably by use mod_deflate (Apache 2.x) or mod_gzip (Apache 1.x) in combination with a php accelerator. I have a high volume site serving up around 3 million page views per month/500 GB in traffic and these and mod_expires reduce my server load considerably... |
_________________
 |
|
       |
 |
|
|