Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Small/medium forum: 512MB VPS, or 256MB VPS w/offloaded MySQL?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Small/medium forum: 512MB VPS, or 256MB VPS w/offloaded MySQL?

DylanDylan Member
edited December 2012 in General

Hey all,

I'm planning on moving a small (I guess maybe it'd be considered medium) forum from shared hosting to a VPS, and I'm wondering what people think would be the better option: a 256MB VPS running nginx and PHP-FPM but with offloaded MySQL, or a 512MB VPS with everything local.

The former would probably be a bit cheaper, but I'm not overly concerned with the price difference -- I'm more wondering which people think would be a better choice overall and which would be likely to better handle any traffic spikes.

Thanks!

«1

Comments

  • Well if you get 2-3 hits/second during peak times even a 128mb LEB will do

  • All depends my man, the biggest question!!!!!

    What forum software? :D

    If you got the typical LEB style setup like you have, you'll have no problem, the only issue might arise is your concurrent connections, but how many do u estimate?

  • DylanDylan Member
    edited December 2012

    @gsrdgrdghd
    That's true, but considering how inexpensive LEBs are I'd rather just go with something more capable of handling spikes and future traffic growth from the start.

  • @Dylan said: That's true, but considering how inexpensive LEBs are I'd rather just go with something more capable of handling spikes and future traffic growth from the start.

    You should be able to easily upgrade plans from the provider self served and the downtime would be minimal.

  • It depends on the MySQL RAM and disk usage and how much hitting the database you are doing.

    I'd say start locally all in one VPS. Have a plan to grow in the future though. Either a bigger VPS with more IOPs or an offloaded MySQL or just a second VPS on the same server or LAN.

  • I vote for 256mb vps + offloaded MySql, because somebody else will manage the database for you, which saves your time. And time is money.

  • **Dodges my question :(

  • @Nexus
    Not the lightest software; SMF. Concurrent connections... maybe 15-20, sometimes a bit higher, on average peak times.

  • There isn't much to "managing" a database at these sizes usually. It's setting up MySQL which comes out of the box sufficient for most folks. To make it fit in limited RAM search on here for docs about that.

    Other than that, backups you should be doing. PHP based tools or commandline to do that. Cronjob to automate the pain.

    Let the provider hold your data and who knows what could happen. Only saves that initial setup time which is about 5 minutes. Probably 30 minutes of research. 35 minutes saved.

  • NexusNexus Member
    edited December 2012

    @Dylan said: Not the lightest software; SMF. Concurrent connections... maybe 15-20, sometimes a bit higher, on average peak times.

    15-20 Concurrent on smf?

    Sht... I don't know to be honest, that is quite a bit really. Start with a 256 for sure.

    Just simply upgrade when needed, you should be making enough for a dedicated if you got 15-20 concurrent and ad's :P

  • SMF has a bunch of crazy MySQL activity - or so I've seen people falling down from such.

    Since it's out of the box, pre made software doubt you'll be optimizing it and caching might be problem too, in such limited RAM.

    Offload the MySQL.

  • DylanDylan Member
    edited December 2012

    @pubcrawler
    That's good to know, thanks. I did notice MySQL's memory usage seemed a bit oddly high, even switched to MyISAM, when I played around with SMF on a 256MB sandbox.

  • 128mb + offload mysql

  • NexusNexus Member
    edited December 2012

    Don't browse the source of SMF, be prepared to kill yourself after. (Or the page source, once u got it installed :))

    hehehe

  • I'm not a big fan of SMF anymore and wouldn't choose it again, but the site's been running for years and it'd be a big hassle to switch software now because of how modded it is. Someday, though...

  • I remember someone posting here months back about a crazy server issue and the culprit was SMF. Something like 10Mbps of activity sustained to the database.

  • what is your budget and we can recommend what to get.

  • I run esoTalk and it runs pretty good on my 512mb forum.

    I intend on having more people sign up so that's why I went with 512mb RAM.

  • Nick_ANick_A Member, Top Host, Host Rep

    SSD VPS, local MySQL, BOOM, you're done.

  • @Nick_A loves him some SSD :)

    Problem with SSD VPS is finding one that has enough disk to be useful. In my opinion, the closest that might do would be a 10GB space plan which with RamNode is $7.50 monthly.

    10GB isn't much. Hate to pack OS, database, site files, etc. in there and still contemplate about data dumps and backups.

    Depends on size of data set though.

  • dmmcintyre3dmmcintyre3 Member
    edited December 2012

    From the VPS running FreeVPS.us (Traffic stats):

    [[email protected] ~] free -m
                 total       used       free     shared    buffers     cached
    Mem:            96         93          2          0          0         55
    -/+ buffers/cache:         37         58
    Swap:           96         16         79
    [[email protected] ~] df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/simfs            5.0G  2.9G  2.2G  58% /
    none                   48M  4.0K   48M   1% /dev
    tmpfs                  48M     0   48M   0% /dev/shm
    [[email protected] ~] ps_mem.py
     Private  +   Shared  =  RAM used       Program 
    
      0.0 KiB +  60.0 KiB =  60.0 KiB       udevd (3)
    100.0 KiB +  44.0 KiB = 144.0 KiB       crond
    140.0 KiB +  49.0 KiB = 189.0 KiB       init
     20.0 KiB + 364.0 KiB = 384.0 KiB       mysqld_safe
    464.0 KiB +  85.0 KiB = 549.0 KiB       syslog-ng (2)
    396.0 KiB + 370.0 KiB = 766.0 KiB       bash
    648.0 KiB + 386.0 KiB =   1.0 MiB       scrd
      1.0 MiB + 634.0 KiB =   1.6 MiB       sshd (2)
      1.7 MiB + 665.5 KiB =   2.3 MiB       nginx (2)
      6.8 MiB + 297.5 KiB =   7.1 MiB       mysqld
      9.0 MiB + 417.5 KiB =   9.4 MiB       php-fpm (2)
    ---------------------------------
                             23.5 MiB
    =================================
    
     Private  +   Shared  =  RAM used       Program
    [[email protected] ~] web-status
    
    Nginx up 10.0 days
    
    Active connections: 89 
    Reading: 5 Writing: 1 Waiting: 83 
    
    Connections Accepted:  656677
     Connections Handled:  656677
          Total Requests: 2471433
    
     Requests/Connection: 3.8
         Requests/Second: 2.9
    
    PHP-FPM Status
    pool:                 www
    process manager:      ondemand
    start time:           09/Dec/2012:14:13:33 -0500
    start since:          862482
    accepted conn:        1364021
    listen queue:         0
    max listen queue:     17
    listen queue len:     128
    idle processes:       0
    active processes:     1
    total processes:      1
    max active processes: 5
    max children reached: 713 
  • 20.0 KiB + 364.0 KiB = 384.0 KiB mysqld_safe

    How in the world? Can't say I believe MySQL will fit in 384k.

    Your numbers are very interesting.

    Should consider doing a write up about you minified your installation.

  • @dmmcintyre3 said: 6.8 MiB + 297.5 KiB = 7.1 MiB mysqld

    @pubcrawler i think their mysql use 7MB RAM

  • Nick_ANick_A Member, Top Host, Host Rep

    @pubcrawler, I was also intending to imply SSD-cached systems.

  • I think you should keep them separate.
    This has many advantages.

    Get a provider who provides you VM on two different physical nodes one with SSD and other can be normal.

    1. Webserver can be configured on a gbit VM. Utilize asking from your provider to get the allocated combined bandwidth of both VM to this one.
    2. MySQL is configured to run over SSD space. Makes Read/Write Faster.
    3. DDOS attacks and hack attacks only keep up to your main VM, your MySQL is isolated.
    4. You can load balance the web server between different VM instances keeping MySQL offloaded.
    5. You can also cluster MySQL without affecting your web server.
  • @arieonline, correct :) thanks. tired eyes here.

  • A 7MB MySQL runtime still is downright impressive.

    Interested in hearing more about this trimmed install.

  • @pubcrawler said: A 7MB MySQL runtime still is downright impressive.

    Interested in hearing more about this trimmed install.

    InnoDB disabled and less cached queries/tables make a lot of difference in ram usage

  • [[email protected] ~] cat /etc/my.cnf
    [mysqld]
    default-storage-engine = myisam
    key_buffer = 1M
    query_cache_size = 1M
    query_cache_limit = 128k
    max_connections=25
    thread_cache=1
    skip-innodb
    query_cache_min_res_unit=0
    tmp_table_size = 8M
    max_heap_table_size = 8M
    table_cache=256
    concurrent_insert=2 
    max_allowed_packet = 1M
    sort_buffer_size = 64K
    read_buffer_size = 256K
    read_rnd_buffer_size = 256K
    net_buffer_length = 2K
    thread_stack = 64K
    bind_address=127.0.0.1
    tmpdir=/dev/shm
  • I use a 512 MB / 1GB burst OpenVZ VPS for a SMF forum with up to 400 online (closer to 150 average) at a time, and it does just fine. No offloaded MySQL or anything like that.

Sign In or Register to comment.