Page 1 of 2 12 LastLast
Results 1 to 25 of 31
  1. #1

    Server for 40k+ daily

    I run a myspace resource site and we are averaging around 40k+ uniques a day with a peak hours of 3,500 to 4,000 users. We are growing pretty good, roughy 75% compaired to last month so I want to get this taken care of before I have a problem.

    Right now I have:
    AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
    2GB Ram
    100Mb uplink
    300GB Ide I think.

    I'm looking to upgrade to a new server. I was looking at a dual opteron 280 with 4GB ram. Is that overkill you think?

    Any other suggestions for servers and where to get it?

  2. #2
    Join Date
    Apr 2005
    Posts
    537
    what sort of loads are you seeing on your current server during peak times ? maybe you could just use a scsi hdd

  3. #3
    I've seen it hover around 15% up to 60% server load. Lately it has seemed to higher than normal during non-peak hours also.

    The important thing is that I want to be able to grow without worrying about switching again for a while.

  4. #4
    Join Date
    Apr 2005
    Posts
    537
    is it a windows or linux server ?,

  5. #5
    The OS is CentOS 4

  6. #6
    Join Date
    Apr 2005
    Posts
    537
    can you try the command top -c and tell me wat the top half of the screen says (provided you have shell access)

  7. #7
    Join Date
    Dec 2006
    Posts
    480
    By resource site, do you mean you are serving static files? If so have you looked at using a reverse proxy server, or mod_cache in apache 2.2 to optimising serving the files from memory rather than reading them from disk?

  8. #8
    Here is a screenshot of the top portion. The server was rebotted last night after it hung around 70% load.

    As for the files part, they are all hosted off my server so it's mainly people just looking at my site. Usually around 250,000 page loads daily.
    Attached Thumbnails Attached Thumbnails server.JPG  

  9. #9
    Join Date
    Apr 2005
    Posts
    537
    im curious as to that screenshot, can you run cat /proc/cpuinfo and post the results (im not 100% but it looks like only one cpu is being shown - tho i think im wrong)

  10. #10
    Join Date
    Dec 2006
    Posts
    480
    250,000 pages doesn't seem a lot to trouble a dual core server with 2Gb of ram. Is the apache process eating the CPU time or do you have a database behind it which is causing the problem?

  11. #11
    Showing both cores to me. It's a 1 processor dual core server that I have right now.
    Attached Thumbnails Attached Thumbnails proc.JPG  

  12. #12
    Join Date
    Apr 2005
    Posts
    537
    yea thats fine, and im with rbbot, wat sort of coding etc are you running for site?

  13. #13
    The main site does not use a database, two parts of it do but aren't that popular. Last time I checked also, they were 100% indexed so I don't believe it is that.

    Google analytics reports 250,000 to 300,000 page loads. Awstats reports more like 4,000,000. I've never been able to figure out why they are so different from each other. I was told by someone else that having awstats turned off may make a difference so I turned it off today. I'll see if that makes a difference before I upgrade.

    Does something not seem right to you guys based on what I've given above?

  14. #14
    Join Date
    Dec 2006
    Posts
    480
    Are you paying for google analytics? Their free service shuts down at 5,000,000 hits a month so would under report high volumne. If 4,000,000 page loads is the accurate figure then the load is probably about right for that server and you do need something more powerful. awstats reads your log files direct so should be the more accurate of the two. If your unsure which is right, run "wc -l" on your access logs and look at what time span they cover to get your own estimate of hits (not page views).

    Awstats will only slow things down during the times of day you have it scheduled to parse the log files. If you do it in your quiet time of day periods it should not cause a hit in performance, especially if you have dns lookups off.

  15. #15
    Join Date
    Apr 2005
    Posts
    537
    next time you get high load try and find out what % i/o their is in top. if its high id look at getting a sata or scsi disk or maybe more than one in raid. i think the cpu should handle that many hits on static pages

  16. #16
    Join Date
    Apr 2005
    Posts
    537
    and yea 4000000 might be trouble for your server. id stil check io wait tho

  17. #17
    It's about the time for load to start going, here is a full screenshot for right now.

    I don't know how to tell I/O. I'm not a linux person at all. Can you tell me?

  18. #18
    Helps if I attach the screenshot
    Attached Thumbnails Attached Thumbnails server2.jpg  

  19. #19
    Join Date
    Dec 2006
    Posts
    480
    Well, the CPU usage of mysql at 142% out of 200% should tell you where the problem is. Also note it only has 34M of resident memory. It's one or both of two things.

    a) You may not have enough memory allocated to caches/buffers in mysql
    b) Your indexes are on the wrong columns or missing.

    Log in to mysql, run the following and add the output as an attachment - it will be too long for screenshots / post content.

    show variables;
    show global status;
    show processlist;

    p.s. the last of these may include some sensitive data in the output - you may want to censor it.
    Last edited by RBBOT; 01-15-2007 at 06:40 PM.

  20. #20
    I pm'd you the info. Thanks again for helping me with this.

  21. #21
    Quote Originally Posted by RBBOT
    a) You may not have enough memory allocated to caches/buffers in mysql
    Unlikely, he's not using much SWAP which would be the reason the load would shoot up in a memory shortage case.

    My bet is your I/O usage is high, I've managed a site with 70k+ uniques a day on a P4 2.8HT, 2GB DDR, 15k SCSI drive with fairly low loads, site wasn't very efficient and ran a database.

    Check your I/O wait times, your current system should be able to cope with the load. Just to clarify, load defines the number of processes waiting to be processed at any time, the load can shoot up if the disk can't process these fast enough as well as the CPU.
    BeeServe
    * Rock solid shared & reseller UK webhosting. No downtime™ *
    Now offering fully managed VPS servers

  22. #22
    Join Date
    Oct 2005
    Location
    US
    Posts
    308
    Have you optimized your server at all? Especially mysql?

    It appears your are running cPanel/WHM?

  23. #23
    Can someone tell me how to check the I/O wait times?

    I have not optimized it but I have Platinum Server Management set it up and optimize it I believe. I can always have them look at something that I don't know how to do if anyone has any ideas.

  24. #24
    Join Date
    Oct 2005
    Location
    US
    Posts
    308
    If you have PSM for management, why don't you just ask them to check it out for you? I would have them look at mysql.

    PSM does not optimize unless by request, so if you didn't ask them, do

    Optimization of mysql alone can easily bring the load down.

    I don't know how to check I/O, so maybe someone else can help you.

  25. #25
    Join Date
    Dec 2006
    Posts
    480
    Swap wont be used if the maximum mysql buffer sizes are too small in the config settings. It will cause I/O though and in some cases CPU load. Poor indexing looks a more likely culprit though.

    EDIT: Actually looking again at what you PM'd me it will be the table that holds the visitors for your world map - to prove it, temporarily disable the map.php script - I bet your load returns to normal. If so get your programmer to sort out the indexes on the table that holds the visitors and to rewrite the queries not to use OR in the where clause as mysql has problems using indexes when OR is used. A union of two queries will probably be faster.
    Last edited by RBBOT; 01-15-2007 at 08:37 PM.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •