Results 1 to 10 of 10
Thread: Expert advice needed!
-
12-22-2006, 10:02 PM #1Newbie
- Join Date
- Dec 2006
- Posts
- 19
Expert advice needed!
Hi, currently my VPS seems to be getting very heavy traffic (as I am mirroring autopatcher)
Well its heavy for me, nearing 15 gigs today and thats while its been having problems due to the load. It might not be the bandwidth though that is the actual problem.
I am getting QOS errors on tcpsndbuf and kmemsize
I am still trying to develop the skills to understand how specific parts of my website handle the load (ie which parts are using most cpu resources, memory resources etc).
People are directed onto my site at filevortex.net/files/upload/autopatcher.php
I understand things are set up simply at the moment. I am totally redesigning the site (and looking at tailoring some CMS systems: trying both typo3 and Joomla, and I can write moderately complex php code etc). Anyway I won't have time to put up my new site design for at least 1 week.
Well when traffic hits that page I mentioned, a simple PHP scripts handles the file download information but I have got it linking directly to the file.
I have used .htaccess to try and prevent any leeching by at least checking the http referer is from my site.
I suspect a problem with download managers making large amounts of concurrent connections...
Now I thought if I use a php script to handle this, won't it get flooded? For example each time the download manager tries to form a connection, won't the php script be executed, potentially trying to restore a session or something (if i use sessions etc), causing much load via PHP? What I mean is if the download manager tries to connect 20 times, then the php code will have to be executed 20 times... if I have 5 download managers trying to connect at once...
I did try and optimize apache, thats an issue in itself, but if you have any tips thats appreciated.
I am not sure what apache mods might help control concurrent connection per ip?
Also I am thinking of turning off non critical services at the moment.
I only have a 256 megs (512 burstable) VPS, fedora core 5, plesk
I understand I should probably upgrade for this sort of situation, that is something I am considering, but I need to get my head around what is going on.. I am on a heavy learning curve I also need to keep costs as low as I can.
Being a mirror for autopatcher means I get much heavier resource usage at one time of the month, and then near the end of the month the resource usage is typically about 1/10th (or less) of peak. Typically only the first 5 days are heavy.
Any advice, links, etc is *very* appreciated. I will submit a sys admin request for help soon, but I want to be specific about what I need done.
Thanks,
Michael
PS Of course you are all probably sitting on the knee of Santa Claws at the moment, saying "Santa, please upgrade my CPU and give me another gig of memory for christmas. Please find me a girlfriend (or boyfriend!) that I can plug into the spare PC on the other side of my bedroom"Last edited by MichaelN2006; 12-22-2006 at 10:06 PM.
filevortex.net
My site. Mostly just a mirror for Autopatcher at the moment, but I will add a LOT more content over the next few weeks.
-
12-22-2006, 10:24 PM #2Newbie
- Join Date
- Dec 2006
- Posts
- 19
"I am getting QOS errors on tcpsndbuf and kmemsize"
Just thought I would clarify- tcpsndbuf is getting black alerts in Virtuozzo but kmemsize is only generating some yellow alerts.filevortex.net
My site. Mostly just a mirror for Autopatcher at the moment, but I will add a LOT more content over the next few weeks.
-
12-22-2006, 11:32 PM #3Web Hosting Master
- Join Date
- Aug 2000
- Posts
- 2,754
Paste the results of:
cat /proc/user_beancounters
-
12-22-2006, 11:34 PM #4Newbie
- Join Date
- Dec 2006
- Posts
- 19
Hmm.. (Sorry to reply to myself again but editing seems to have expired)
I think the following apache mod: Mod_evasive might be the solution.
When typing in netstat i get a list of IP addresses with many IP addresses repeated OVER AND OVER again with various ports like: 41672, 20468 etc etc
One of the IP addresses is listed over 50 times. I'll look into this more (this sort of stuff is not my strong point) but i have to suspect that is an actual download manager flooding me?filevortex.net
My site. Mostly just a mirror for Autopatcher at the moment, but I will add a LOT more content over the next few weeks.
-
12-22-2006, 11:39 PM #5Newbie
- Join Date
- Dec 2006
- Posts
- 19
Originally Posted by Smooth
I am very much thinking though that this may mostly be a problem of too many concurrent connections.filevortex.net
My site. Mostly just a mirror for Autopatcher at the moment, but I will add a LOT more content over the next few weeks.
-
12-22-2006, 11:46 PM #6Newbie
- Join Date
- Dec 2006
- Posts
- 19
Okay its slow again. I was getting around 2KBPS
Here at the results
uid resource held maxheld barrier limit failcnt
502: kmemsize 8548203 8566592 24372700 24790164 2055
lockedpages 0 0 256 256 0
privvmpages 71349 71369 278528 278528 0
shmpages 6409 6409 21504 21504 0
dummy 0 0 0 0 0
numproc 67 67 240 240 0
physpages 18993 18997 0 2147483647 0
vmguarpages 0 0 33792 2147483647 0
oomguarpages 18993 18997 26112 2147483647 0
numtcpsock 95 95 360 360 0
numflock 7 7 188 206 0
numpty 1 1 16 16 0
numsiginfo 0 1 256 256 0
tcpsndbuf 2940528 2940528 2920320 3903360 93798882
tcprcvbuf 207324 207324 1720320 2703360 0
othersockbuf 24152 31764 1126080 2097152 0
dgramrcvbuf 0 700 262144 262144 0
numothersock 19 19 360 360 0
dcachesize 525207 528152 3409920 4624960 0
numfile 1762 1771 11312 11312 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
numiptent 14 14 128 128 0filevortex.net
My site. Mostly just a mirror for Autopatcher at the moment, but I will add a LOT more content over the next few weeks.
-
12-23-2006, 03:40 AM #7Newbie
- Join Date
- Dec 2006
- Posts
- 19
Well I am new to linux but tried installing "dos deflate" on my fedora 5 VPS. Its an anti Denial of Service script but i thought it might be useful cause it can limit concurrent connections from the same IP (I have noticed some people seem to keep having up to 50 connections, and 10-20 is not uncommon)
It seems to be shell (sh) script.
It seemed to install fine, and the install is a install.sh file, and it worked
It tries to set a cron to occur every minute but when listing cron tasks it is not there?
trying to manually execute the script comes up with all these errors that don't make sense. It even seems to complain of errors on lines that just contain commented out code.
I also tried to install mod_evasive for apache but couldn't it came up with many warnings and I couldn't seem to find any docs for how to install this on fedora (the various file paths etc certainly don't match mine in the installation instruction)
I realize I need to do a lot of reading (when I have such time) but for now I am just trying to solve this problem so I can rest.
I will await some comments, someone must be able to give me some sort of hint I have felt close at times to a solutionm but the solution so far eludes mefilevortex.net
My site. Mostly just a mirror for Autopatcher at the moment, but I will add a LOT more content over the next few weeks.
-
12-23-2006, 04:01 AM #8Newbie
- Join Date
- Dec 2006
- Posts
- 5
MichaelN2006 where you buy VPS which company
-
12-23-2006, 09:33 AM #9Newbie
- Join Date
- Dec 2006
- Posts
- 19
muniery,
You have found them now.. Support said you were talking to them
As for my prob well I have figured out solution and did manage to install an apache mod (mod_limitipconn), which is an *okay* mod I guess, but would like solution lighter on resources perhaps. Everything is functioning fine now though.filevortex.net
My site. Mostly just a mirror for Autopatcher at the moment, but I will add a LOT more content over the next few weeks.
-
12-23-2006, 09:50 AM #10Newbie
- Join Date
- Dec 2006
- Posts
- 5
Micheal..
Yes i was found...them
so how about their services. ok or not michealN2006
please review your experience about vps zone to me.