AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > AnimeSuki & Technology > Tech Support

Reply
 
Thread Tools
Old 2004-03-10, 13:36   Link #1
SirJeannot
AT Field
 
 
Join Date: Apr 2003
Location: #animesuki
Age: 16
web server load

i just got a massive load on my server yesterday thanks to some advertisment
the problem is that i got more than 600 hits per hour (including the bt tracker), and my comp got beaten after 24h saying (the web server and every network oriented app) "no more buffer to create connections" or "socket operation error"

so i tweaked a little bit the apache conf file, reducing the timeouts, allowing more threads per child, by cutting persistent connection with the tracker.
will it do the trick? is there anything else to do (i don't want to hear about "use *nix plz", i can't atm, and my hdd performance is way too poor)?

thx
__________________
"facts Jeremy, facts!"
- non factual Jeremy.
SirJeannot is offline   Reply With Quote
Old 2004-03-10, 14:08   Link #2
Forse
r00t for life
 
Join Date: Jun 2003
Location: /dev/null
yey apache thread =)


Anyway why you keep server on that kinda hardware? From my experience here are some things you can do:

-Well load balancing. There are hardware load balancers out there which work very well at place I work.

-Round robin DNS can be used too, but it's not as good

Okey those are for enterprise (somehow I sense u don't have much cash to spend), here are some "home" remedies:

-Make sure you have OS that allows many file descriptors and sockets (I am not sure how it is on windows side...I am using *nix for servers).

-Get more ram if you can

-Use apache2 with mod_cache to cache none changing pages to RAM for quick access

-Use memory mapping derective if OS supports it

-Use sendfile directive if possible

-Choose right MPM for your OS, if your OS supports threading well then use worker or prefork

-Compile apache yourself and deselect modules you won't use. Compile apache2 with --enable-nonportable-atomics=yes to give u a little boost in speed.

-Make sure u have HostnameLookups set to OFF

-Make sure you don't use symlinks as it's bad for performance.

-Try setting KeepAliveTimeout to something around 15

-Get some php caching soft


I can go on and on, but I'll stop here. Many things I said are *nix related, but some should apply everywhere. BTW this is happens when everyone is allowed to run own httpd -_-;;
__________________
Forse is offline   Reply With Quote
Old 2004-03-10, 14:49   Link #3
SirJeannot
AT Field
 
 
Join Date: Apr 2003
Location: #animesuki
Age: 16
great, thx for the directives!

i've applied to simple one like hostnamelookups, symlinks, keepalive

i'll look around for php caching and the mod_cache module. i'm afraid i won't be able to use mpm, since i have nothing to compile apache :/
well anyway, the two caching utilities will help a lot

my system is a
p3-500, 320MB ram, 2*20GB
apache2, php & mysql
__________________
"facts Jeremy, facts!"
- non factual Jeremy.
SirJeannot is offline   Reply With Quote
Old 2004-03-10, 16:15   Link #4
ato
Oups...
 
 
Join Date: Jan 2003
Hmmm, 600 hits per hour? That is no more than one hit every six seconds, provided they are evenly distributed... As your server can serve static content way, way faster than that, I'll assume that you have some performance issues with your server side scripts (PHP?).

Also, even with a massive timeout of 5 minutes, you'll have no more than 50 open connections at this rate. There seems to be something wierd going on with your TCP/IP stack and the resources it consumes per connection. But you stated that changing OS is not an option, so...

Anyways. Try figuring out what page requests generate most load on your server. Optimize and go again. Repeat until no single request takes longer to process than 0.5 seconds. This might mean you need to rethink your page and database design, but it's all for a good cause, eh?

A little more work than optimizing hardware and tweaking your resource, but a good learning experience in tight programming
ato is offline   Reply With Quote
Old 2004-03-10, 16:40   Link #5
SirJeannot
AT Field
 
 
Join Date: Apr 2003
Location: #animesuki
Age: 16
it's an average
sometimes i get 10+ requests per second
but my bt program to seed is a whore and requires quite a load of ressources

edit; it seems that mysql somehow went wrong. since i've rebooted, i don't get any "aborted connection" anymore
__________________
"facts Jeremy, facts!"
- non factual Jeremy.
SirJeannot is offline   Reply With Quote
Old 2004-03-10, 16:55   Link #6
Forse
r00t for life
 
Join Date: Jun 2003
Location: /dev/null
Quote:
Originally Posted by SirJeannot
it's an average
sometimes i get 10+ requests per second
but my bt program to seed is a whore and requires quite a load of ressources

edit; it seems that mysql somehow went wrong. since i've rebooted, i don't get any "aborted connection" anymore

If persistent connection when connecting to mySQL, in php it's done using mysql_pconnect(). That should reduce load a little on mysql.

P.S. 10+ requests per second is NOTHING, one of my servers gets about 100 requests per second and it's doing just fine =)
__________________
Forse is offline   Reply With Quote
Old 2004-03-10, 17:24   Link #7
SirJeannot
AT Field
 
 
Join Date: Apr 2003
Location: #animesuki
Age: 16
the point is that i have a small connection ... so handling timeouts is not t3h best thing
and it's a small comp doing many other things

unfortunately, those aren't persistent connections :|
__________________
"facts Jeremy, facts!"
- non factual Jeremy.
SirJeannot is offline   Reply With Quote
Old 2004-03-10, 17:39   Link #8
u&t
Senior Member
 
Join Date: Nov 2003
and kernel 2.6 helps alot on bringing down the load on apache. Do an upgrade.
u&t is offline   Reply With Quote
Old 2004-03-10, 17:40   Link #9
SirJeannot
AT Field
 
 
Join Date: Apr 2003
Location: #animesuki
Age: 16
i'm on w2k ... :|
__________________
"facts Jeremy, facts!"
- non factual Jeremy.
SirJeannot is offline   Reply With Quote
Old 2004-03-10, 18:02   Link #10
Forse
r00t for life
 
Join Date: Jun 2003
Location: /dev/null
Quote:
Originally Posted by u&t
and kernel 2.6 helps alot on bringing down the load on apache. Do an upgrade.
It's still not recommended to use 2.6 on productional server
__________________
Forse is offline   Reply With Quote
Old 2004-03-11, 10:21   Link #11
u&t
Senior Member
 
Join Date: Nov 2003
Quote:
Originally Posted by Forse
It's still not recommended to use 2.6 on productional server
Of course it is! 2.6 has been out for 3 months now. While your mission critical stuff shouldn't depend on it my guess is this is not the case here.

Ahem. Anyway, bad suggestion as it might be kernel 2.6 seems pretty stable right now. It think the developers haven't forgotten the problems with the 2.4 release and concentrate more on stability this time.

This is a fairly low end server. I would move it over to linux/BSD. Should increase performace a bit (but I'm a windows hater so don't listen to me).
u&t is offline   Reply With Quote
Old 2004-03-11, 11:32   Link #12
SirJeannot
AT Field
 
 
Join Date: Apr 2003
Location: #animesuki
Age: 16
it seems to work great!

for a 24h cycle, i get
58 seconds for apache
1min 50seconds for mysql
__________________
"facts Jeremy, facts!"
- non factual Jeremy.
SirJeannot is offline   Reply With Quote
Old 2004-03-13, 15:12   Link #13
SirJeannot
AT Field
 
 
Join Date: Apr 2003
Location: #animesuki
Age: 16
apache crashed again *slap*
it happens that i was using apache2 ... and it really sucks on windows ....

so i got the last 1.3 version. it seems to be faster from what i just tested.
__________________
"facts Jeremy, facts!"
- non factual Jeremy.
SirJeannot is offline   Reply With Quote
Old 2004-03-13, 15:26   Link #14
Forse
r00t for life
 
Join Date: Jun 2003
Location: /dev/null
Quote:
Originally Posted by SirJeannot
apache crashed again *slap*
it happens that i was using apache2 ... and it really sucks on windows ....

so i got the last 1.3 version. it seems to be faster from what i just tested.
I dunno, but apache2 is a lot better then apache1 on *nix atleast Why u can't install *nix again?
__________________
Forse is offline   Reply With Quote
Old 2004-03-13, 15:52   Link #15
SirJeannot
AT Field
 
 
Join Date: Apr 2003
Location: #animesuki
Age: 16
i'd like very much, but the fact that i can't control the remote X screen through vnc like in windows annoys me.
and i get really poor hdd performance (i get errors when i activate the dma mode with hdparm) :/
__________________
"facts Jeremy, facts!"
- non factual Jeremy.
SirJeannot is offline   Reply With Quote
Old 2004-03-13, 22:18   Link #16
Nevion
/dev/random
 
Join Date: Jan 2004
Age: 27
Quote:
Originally Posted by SirJeannot
i'd like very much, but the fact that i can't control the remote X screen through vnc like in windows annoys me.
and i get really poor hdd performance (i get errors when i activate the dma mode with hdparm) :/
o_O I use vnc on both windows and anything that uses xwindows and haven't noticed any difference besides no sound... it acts usually the exact way it normally would :/

as for your dma errors, hdparm -d 1 is considered to be a dangerous manuever and won't work right in many cases causing all kinds of stuff to happen... sounds like something in bios... you might check what dma your motherboard and hd's are capable of running(hdparm -i /dev/hdx) and setting it manually in bios utility if your bios supports manually setting it or making sure its set to auto (most hd's automatically select the top mode they can do). OR I have seen a few drives (eg one of my wd's) that require you to d/l a utility disk to turn on its dma features (wtf >_>)
__________________
configure: WARNING: `missing' script is too old or missing
Nevion is offline   Reply With Quote
Old 2004-03-22, 18:58   Link #17
SirJeannot
AT Field
 
 
Join Date: Apr 2003
Location: #animesuki
Age: 16
my hdds are wayyy to old to have such programs written for those

anyway, it was an apache2 issue. not a single glitch since i moved to apache1. it needs twice as much memory, but runs faster
__________________
"facts Jeremy, facts!"
- non factual Jeremy.
SirJeannot is offline   Reply With Quote
Old 2004-05-03, 18:59   Link #18
SirJeannot
AT Field
 
 
Join Date: Apr 2003
Location: #animesuki
Age: 16
after a month of uptime and some traffic (website + tracker), i didn't have a single problem

windows users, use apache 1.3!
__________________
"facts Jeremy, facts!"
- non factual Jeremy.
SirJeannot is offline   Reply With Quote
Reply

Thread Tools

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 -5. The time now is 01:03.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
We use Silk.