Ad Widget

Collapse

MySQL vs PostgreSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Blinkiz
    Junior Member
    • Mar 2011
    • 27

    #1

    MySQL vs PostgreSQL

    In about a month I will reinstall zabbix on a new machine. I currently have 60GB MySQL database and according to Zabbix frontend about 300 new values per second.
    My current MySQL database is on a DRBD block device that is synchronized to another machine (corosync and so on). It is not working perfectly so I do not know if I will continue using DRBD.

    So, back to the main question. MySQL vs PostgreSQL?
  • walterheck
    Senior Member
    • Jul 2009
    • 153

    #2
    Looking at most of the larger installations of zabbix, they almost all run on MySQL. I would recommend you do the same. If you need HA, have a look at MMM for MySQL: http://mysql-mmm.org. That works on the MySQL level and is a lot more stable then DRBD.

    If you need tuning or other advice for mysql, I can definitely recommend you to take a look at some mysql consulting, even if it is just for a few hours a month. In my other work I do some consulting for http://openquery.com, but there are others as well.
    Free and Open Source Zabbix Templates Repository | Hosted Zabbix @ Tribily (http://tribily.com)

    Comment

    • Blinkiz
      Junior Member
      • Mar 2011
      • 27

      #3
      Thanks for the response walterheck

      Comment

      • Blinkiz
        Junior Member
        • Mar 2011
        • 27

        #4
        MMM (Multi-Master Replication Manager for MySQL) seems like a nice collections of scripts to manage MySQL.
        I will run Zabbix and MySQL on the same host. No need to separate these two quite yet.

        MMM wants to run in a Master-Master set up and only changing IP address depending on which one that should be the real master. Seems like stable solution.
        Okay, I need to start and stop Zabbix depending on which node is primary. MMM can probably trigger a script or something when it is adding or removing IP address, so this should probably be possible.

        Am I thinking right?

        Comment

        • walterheck
          Senior Member
          • Jul 2009
          • 153

          #5
          Originally posted by Blinkiz
          MMM (Multi-Master Replication Manager for MySQL) seems like a nice collections of scripts to manage MySQL.
          Yes, that is the beauty of MMM: it doesn't interfere with MySQL itself, it just does smart foo with the replication management and adds a virtual IP.

          Originally posted by Blinkiz
          I will run Zabbix and MySQL on the same host. No need to separate these two quite yet.
          For MMM, you'll need at least three machines: two masters for MySQL and one monitor (this can be a light-weight machine)

          MMM wants to run in a Master-Master set up and only changing IP address depending on which one that should be the real master. Seems like stable solution.
          Okay, I need to start and stop Zabbix depending on which node is primary. MMM can probably trigger a script or something when it is adding or removing IP address, so this should probably be possible.

          Am I thinking right?
          Do you want a nice answer or an honest answer?
          the way it works is this: in MMM's config you define a virtual IP, and that is the IP you use to connect zabbix to. Now, if the active master fails, MMM will love the virtual IP to the other server and zabbix can just keep writing to that IP without noticing any difference. It's agnostic of the underlying physical MySQL node it writes to.
          This allows you to not only have failover, but also gains you the ability to do maintenance on the non-active MySQL node like altering large tables or upgrading MySQL/Linux versions. That is where the true value of this kind of setup comes to the surface
          Free and Open Source Zabbix Templates Repository | Hosted Zabbix @ Tribily (http://tribily.com)

          Comment

          • Blinkiz
            Junior Member
            • Mar 2011
            • 27

            #6
            Yeah, I also like MMM. Seems simple but effective.
            No problem running a virtual machine where the monitor part is located..

            I get the feeling that MMM is not for me. I need to have two Zabbix servers so one can fail. MMM does not solve this.
            MMM can probably be a part in a solution.

            Anyway, this discussion is not for this thread. It is about MySQL vs PostgreSQL.
            I will open another thread about HA if needed.

            Comment

            • Colttt
              Senior Member
              Zabbix Certified Specialist
              • Mar 2009
              • 878

              #7
              we use PostgreSQL 8.4 @~63vps.. all works fine.. DB-size is 50GB..

              we have some trouble with mysql (very slow) and after change the DB-Backend all works fine..
              Debian-User

              Sorry for my bad english

              Comment

              • f.koch
                Member
                Zabbix Certified Specialist
                • Feb 2010
                • 85

                #8
                Hi,

                we use postgresql 9.0 in our setup.

                ~1100 Hosts
                ~ 300GB Database
                ~ 280vps

                works fine, no big problems (only the problems do you have with such a big database) so i recommend postgresql to use with zabbix.

                Previously we used mysql , the database crashes at 250GB and can't repaired (i don't know why).

                rgds flo

                Comment

                Working...