Results 1 to 11 of 11
  1. #1
    Join Date
    Mar 2004
    Posts
    40

    Single Proc Multi Core vs Multi Proc Single Core

    This is kind of a followup of our thread
    "More RAM or better CPU?" (http://www.webhostingtalk.com/showthread.php?t=660395).

    Sorry if we were supposed to post in that thread in stead, but this is a different question that in that post.

    Our server is still crashing a lot and unfortunately we can't afford a multi processor with multi cores.

    So the question is as follows:
    For a site with a lot of database activity, what would be the best thing to go for:

    a) Single processor with multiple cores, or
    b) Multiple processors with a single core.

    a = Intel Xeon 3060 Dual Core Conroe Processor (2.4GHz)
    b = 2x Intel Dual Xeon 2.8GHz Processors

  2. #2
    Join Date
    Jun 2007
    Location
    UK
    Posts
    219
    In theory multiple cores should be more efficient than multiple processors (as they can be more closely integrated). In reality however I doubt you'd be able to identify the difference between a dual-core processor vs 2 processors at the same speed.

    As for which would be a better choice - you need first to find out where your bottlenecks are under load. I personally would suspect I/O is your most likely culprit as your other thread says you're running the OS, MySQL and the database itself off a single disk.
    I think the server saw what was required of it and just committed suicide instead.

  3. #3
    Join Date
    Mar 2004
    Posts
    40
    The current server has one "10K RPM SCSI/SAS Hard Drive".

    Example A and B will get two "146GB 10K RPM SCSI/SAS" drives. ThePlanet only supports RAID 1 or 5 on that server, and with RAID 1, I honestly have no idea if mySQL and/or apache supports split seeks and if it will help. RAID 5 requires us to get another drive as well.

  4. #4
    Join Date
    Jan 2004
    Posts
    1,183
    I would get the dual core system over the dual proc.

  5. #5
    Join Date
    Jun 2007
    Location
    UK
    Posts
    219
    Quote Originally Posted by IceKickz View Post
    The current server has one "10K RPM SCSI/SAS Hard Drive".

    Example A and B will get two "146GB 10K RPM SCSI/SAS" drives. ThePlanet only supports RAID 1 or 5 on that server, and with RAID 1, I honestly have no idea if mySQL and/or apache supports split seeks and if it will help. RAID 5 requires us to get another drive as well.
    Well, it'll be down to the RAID card/software to handle the disk I/O, not the software you're running.

    Can you get them as single disks (ie no RAID)? If not, what's your ratio of reads to writes? If you're write intensive then RAID5 has some overheads that you may want to avoid
    I think the server saw what was required of it and just committed suicide instead.

  6. #6
    Join Date
    Mar 2004
    Posts
    40
    I can get them without RAID as well. To be honest, I have no idea how it is when it comes to IO. Perhaps some of these results can help.

    Server crashed earlier, so it has just been up for 4 hours and 52 mins.

    Our vBulletin forums
    Currently Active Users: 446 (127 members and 319 guests)

    Apache status from WHM
    PHP Code:
    Server VersionApache/1.3.39 (UnixPHP/5.2.3 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.30 OpenSSL/0.9.7a
    Server Built
    Nov 4 2007 18:27:56
    Current Time
    Friday04-Jan-2008 23:01:19 GMT
    Restart Time
    Friday04-Jan-2008 18:04:43 GMT
    Parent Server Generation

    Server uptime
    4 hours 56 minutes 36 seconds
    Total accesses
    3043833 Total Traffic17.8 GB
    CPU Usage
    u6861.58 s884.48 cu.59 cs.34 43.5CPU load
    171 requests
    /sec 1.0 MB/second 6.1 kB/request
    233 requests currently being processed
    80 idle servers 
    From phpMyAdmin
    PHP Code:
    This MySQL server has been running for 0 days5 hours0 minutes and 47 secondsIt started up on Jan 042008 at 06:04 PM.

    Query statisticsSince its startup5,981,008 queries have been sent to the server.

    Total     per hour     per minute     per second
    5
    ,981 k    1.19 M    19.88 k    331.41 
    free
    PHP Code:
    root@server [~]# free
                 
    total       used       free     shared    buffers     cached
    Mem
    :       2074692    1898244     176448          0      31660    1038760
    -/+ buffers/cache:     827824    1246868
    Swap
    :      2040212        192    2040020 
    iostat
    PHP Code:
    root@server [~]# iostat
    Linux 2.6.9-67.0.1.ELsmp (xxxxxxxxxxxx)     01/04/2008

    avg
    -cpu:  %user   %nice    %sys %iowait   %idle
               6.60   46.90    7.10    4.93   34.48

    Device
    :            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
    sda              69.33       519.81       975.19    9031276   16943108
    sda1              0.07         0.08         0.00       1332          4
    sda2             19.98       130.83       147.13    2273118    2556240
    sda3             57.44       294.45       225.88    5115838    3924456
    sda4              0.00         0.00         0.00          2          0
    sda5              3.31         3.06        25.42      53250     441656
    sda6             75.26        91.17       575.39    1584014    9996984
    sda7              0.19         0.09         1.34       1494      23336
    sda8              0.05         0.06         0.02       1076        384 
    5 first processes from top
    PHP Code:
    top 22:58:00 up  4:54,  2 users,  load average3.674.374.72
    Tasks
    415 total,   2 running412 sleeping,   0 stopped,   1 zombie
    Cpu
    (s):  6.5us,  6.9sy46.9ni34.5id,  5.0wa,  0.2hi,  0.0si
    Mem
    :   2074692k total,  1998764k used,    75928k free,    32340k buffers
    Swap
    :  2040212k total,      192k used,  2040020k free,  1052120k cached

      PID USER      PR  NI 
    %CPU    TIME+  %MEM  VIRT  RES  SHR S COMMAND
     4553 mysql     21   6   82 146
    :51.47  1.8  148m  36m 4136 S mysqld
    15318 nobody    20   4   23   0
    :06.18  0.8 28592  15m 3792 S httpd
    13143 nobody    20   4   14   0
    :00.59  0.7 27852  14m 2668 R httpd
     4996 nobody    20   4   12   0
    :44.18  0.5 21576 9548 3852 S httpd
     7648 nobody    20   4    8   0
    :06.86  0.5 21564 9508 3836 S httpd 
    Last edited by IceKickz; 01-04-2008 at 07:08 PM.

  7. #7
    Join Date
    Jun 2007
    Location
    UK
    Posts
    219
    It would help to know where your database is, if it's sda6 then you're very write intensive (about 6 writes per read). On the other hand, your %iowait figure is pretty low so I'd worry about that later.

    Assuming you're running on a dual processor/core system currently then the load averages suggest you could do with about twice the processing power. You're probably ok for memory (the figures from top suggest that half your RAM is being used for disk caching).
    I think the server saw what was required of it and just committed suicide instead.

  8. #8
    Join Date
    Mar 2004
    Posts
    40
    Yeah, it would seem like we're almost at 200% of the recommended max load.

    We have a single processor with dual core (Intel Xeon 3060 Dual Core Conroe Processor @ 2.4GHz) and as you could see from the stats, 2GB RAM.

    I have no idea where the database is located. But I do have SSH access and could look it up if I get the required commands. I would assume it's at the place where it's most activity. The server is dedicated to one website.

    It just seems like "everybody else" can have much more visitors on their forums and sites with the same specs. The vBulletin installation is clean and doesn't have any resource demanding hacks installed either. The CMS has been coded by me (I'm an educated programmer) and I've optimized everything as much as possible and also had a team to look at everything to get second opinions on the code.

  9. #9
    Join Date
    Jun 2007
    Location
    UK
    Posts
    219
    I'm not terribly familiar with MySQL, but ISTR somewhere under /var is the default in at least some versions.

    As to your specs, how big is the DB? If it's small enough you could pre-load the thing into the GB of RAM that's currently acting as disk cache. There's probably a lot of other things that could be done, but diagnosis this way isn't easy

    Finally, don't take offence, but it's entirely possible that your CMS isn't as optimized as you think it is - Apache is chewing up 45% of the CPU after all. The fact that you say others can cope with higher loads on the same hardware suggests that you need to look at what's different and if that's the only difference...
    I think the server saw what was required of it and just committed suicide instead.

  10. #10
    Join Date
    Mar 2004
    Posts
    40
    The vB is about 800MB and the main pages around 185MB.

    Oh of course. Didn't imply I was the best coder around. An outside team, a class of approx 30 students and all my teachers went through the source thoroughly as it was my thesis(?) for my bachelor degree in computer programming. Got a lot of tips and changed a lot as well. I would assume it's as good as it can be.

  11. #11
    Join Date
    Jun 2007
    Location
    UK
    Posts
    219
    With that size it's probably practical to pre-load the entire thing into RAM, assuming of course MySQL supports this.

    I'd also suggest a quick read through the section of the MySQL docs that cover optimisations. Particularly:

    http://dev.mysql.com/doc/refman/6.0/...iguration.html

    and the section after the variable list in:

    http://dev.mysql.com/doc/refman/6.0/...arameters.html

    As for code being as good as it can be, look at how long it's taken for the likes of the Linux kernel to get where it is, and how many changes have gone into it. There's always room for improvement
    I think the server saw what was required of it and just committed suicide instead.

Posting Permissions

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