Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Any optimizations I can make for a new server?

  1. #1
    Join Date
    Feb 2007
    Location
    Bucharest
    Beans
    460
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Any optimizations I can make for a new server?

    My brother is getting a development server for a project of his. So I'm in charge of setting up the new server, and I think I'm going to use Ubuntu Server. Here are the server specs:
    Code:
    Case: Asus TA-851 MiddleTower ATX ASUS, 2 USB 2.0 Fan 80mm, 4bay, Screw-less design; W-out PS Black-Silver
    Power Supply: Sirtec 400W HP-400-A12S
    DVD-RW Pioneer DVR-216DBK 20xDVDRW SATA Dual Bare Bulk Black
    Memory: A-Data (2x1GB) 2GB-DDR2-800-Vitesta-Extreme-Dual
    Motherboard: Gigabyte EG31MF-S2 Intel G31, s.775, LAN, 4xSATA2, 4xDDRII 800, mATX
    Intel Core2 Quad Q8200 2,330 GHz FSB1333 4MB QuadCore
    HDD WD VelociRaptor SATA-2 300 GB, 2.5" ThermalRadiator 3.5", 10.000rpm, 16MB, Read Seek Time 4.2 ms / Write Seek Time 4.7 ms
    As you can see, the processor and the HDD are quite powerful and my brother needs to squeeze all the power he can from the two. The server will run Apache (not so used), MySQL (really heavily used) and PHP5 (heavily used) and sshd for file sharing and remote administration.

    My question is: are there any tweaks I could do to squeeze more power and to make sure he uses it at its full potential? HDD tweaks especially -- it's going to be under heavy fire .

    Also, since the server is going to live in our home, we are probably going to use it for file storage, too (backups, music, movies etc.). So, what partitioning scheme do you recommend? I was thinking three partitions: /, /home and /mysql. Now, I'm not sure if a /mysql partition would be efficient but I'm thinking that because MySQL will be bashed a lot a separate partition for it might prove a bit of a performance boost. Also, if the system crashes for some reason, the /mysql partition will hopefully stay more or less intact.

    Any other advice would be really nice. Although I've never done a professional server setup before, I have installed Ubuntu + Apache + MySQL + PHP a few times so I sort of know my way around these. I'm not too much of a stranger to command line, either. Basically I'm just going to pop an Ubuntu Server CD in the machine and go from there.
    [ Blog # A Programmer's Ride ]
    Linux: it really whips the penguin's butt.

  2. #2
    Join Date
    Mar 2008
    Beans
    1,755

    Re: Any optimizations I can make for a new server?

    Honestly, if you are trying to squeeze every ounce of power out of your hardware, you want a much smaller kernel than Ubuntu has to offer. Specifically, a kernel you have compiled yourself.

    Often distros that support running on a vanilla kernels are less used as production servers. There is much that can go wrong when most to all configuration is done manually, as well as the long amounts of time needed to setup and maintain them.


    In short you really need to ask yourself some questions:


    Is performance more important that stability?

    Will it be cost-effective to spend the time to set up a server in gentoo or arch linux given the long time setup and its given performance increases?

    Do I need to learn new skills while setting up a server that is going in to production?

  3. #3
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    8,426

    Re: Any optimizations I can make for a new server?

    Spend $50 more on a faster machine and save thousands in configuration and maintenance effort...

    Cheers,

    Herman

  4. #4
    Join Date
    Feb 2007
    Location
    Bucharest
    Beans
    460
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Any optimizations I can make for a new server?

    HermanAB: $50? Huh. My brother had to choose between that HDD and one that had 8ms access time (compared to this one's 4ms) and that had 7200rpm (compared to this one's 10,000). The cost difference was $250. That's quite something, the HDD is almost half of the whole machine cost (the HDD alone is about $325). It would be a pitty if he wouldn't get to use the whole potential of the HDD.

    Titan8990: The machine is not a production server, it's a development server. I don't think I'm going to go as far as installing Archlinux (although I've played with it before, I think I still have a VM around here somewhere...) mainly because I don't have a lot of time on my hands and I don't have a couple or more days just to set it up (I'm hoping I'll be done in a few hours). I would have loved to toy around with it, though, but I think I'm going to go for the huge support and stability Ubuntu offers.

    So, any tweaks? Any "edit this file set this hdd parameter and get 0.01ms less access time"? Or should I expect Ubuntu to go at full speed straight away?
    [ Blog # A Programmer's Ride ]
    Linux: it really whips the penguin's butt.

  5. #5
    Join Date
    Mar 2008
    Beans
    1,755

    Re: Any optimizations I can make for a new server?

    As a development server, stock ubuntu will be much faster than you will ever need on that hardware.

  6. #6
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Any optimizations I can make for a new server?

    Quicker hard drive access times aren't going to help if you can't get the data to the network, optimize your network connection, because that is the bottle neck. Have a look here.

    Jim

  7. #7
    Join Date
    Dec 2006
    Location
    Oregon, US
    Beans
    1,541
    Distro
    Ubuntu Development Release

    Re: Any optimizations I can make for a new server?

    When you say it's going to be heavily used, what's your definition of that? What's he doing?

  8. #8
    Join Date
    Feb 2007
    Location
    Bucharest
    Beans
    460
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Any optimizations I can make for a new server?

    cariboo907: My brother doesn't need it to just serve files really quickly. As I said, MySQL is going to be the one to force the HDD to its limit, so network speed has nothing to do with it.
    jimv: By heavily used I mean millions of MySQL queries issued one after another (programatically, of course) on tables as large as 2GB+.

    From what I've read on the net pretty much the only thing you can do is increase the readahead value using hdparm. Any other suggestions?

    Also, what's your take on my partitioning scheme? Do you think a /mysql partition would be efficient?

    Thanks
    [ Blog # A Programmer's Ride ]
    Linux: it really whips the penguin's butt.

  9. #9
    Join Date
    Nov 2006
    Beans
    124
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Any optimizations I can make for a new server?

    Quote Originally Posted by Znupi View Post
    cariboo907: My brother doesn't need it to just serve files really quickly. As I said, MySQL is going to be the one to force the HDD to its limit, so network speed has nothing to do with it.
    jimv: By heavily used I mean millions of MySQL queries issued one after another (programatically, of course) on tables as large as 2GB+.

    From what I've read on the net pretty much the only thing you can do is increase the readahead value using hdparm. Any other suggestions?

    Also, what's your take on my partitioning scheme? Do you think a /mysql partition would be efficient?

    Thanks

    if you are going to run huge mysql queries, then the fastest way to have a lot of ram and try to keep mysql in the RAM.
    and optimizing mysql would be much more critical then "squeezing" hardware

  10. #10
    Join Date
    Jul 2005
    Location
    North Carolina
    Beans
    91
    Distro
    Ubuntu 6.10 Edgy

    Re: Any optimizations I can make for a new server?

    1. Upgrade the ram to >4gb.
    2. Update your PHP database API to cache with memcached.
    3. Watch your database load go to nill (if you cache correctly).

    As far as your partition scheme, nothing wrong with the default. I don't think you would get much improvement (if any).

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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