Ad Widget

Collapse

InnoDB : ibdata growing growing and growing !

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • n0mad44
    Junior Member
    • Jan 2008
    • 8

    #1

    InnoDB : ibdata growing growing and growing !

    Hi,

    I'm using zabbix with mysql 5.0.22 and InnoDB (as recommended). However my ibdata is growing every day (insteed of housekeeper and other regulation processes).

    I read that's due to InnoDB : it's not able to reuse freed space (or something like that )

    For now the only solution I have is to dump my base, stop mysql, erase ibdata and restore the dump.

    Have you any information/trick to make my ibdata smaller ? I don't think I'm the only one with this problem.. how do you do ?

    Thanks,
    n0mad.
  • eli.stair
    Junior Member
    • May 2006
    • 20

    #2
    Setting InnoDB 'file per table'

    You're looking for 'innodb_file_per_table' in my.cnf. You'll find more detailed info on the mysql site when you search for it.

    Cheers,

    /eli

    Comment

    • Niels
      Senior Member
      • May 2007
      • 239

      #3
      You're right that the file wont shrink, and even innodb_file_per_table wont help you with that. I still like to use it to keep the file system more manageable, but that's personal taste.

      The trick you're looking for is what you've already stated: dump and restore.

      You _may_ be able to change some tables from innodb to myisam, but that's a lot of bother with unknown consequences.

      My advice is: Buy large discs, dump and restore if needed.

      Comment

      • just2blue4u
        Senior Member
        • Apr 2006
        • 347

        #4
        i had a similar issue.
        Already fount this thread? http://www.zabbix.com/forum/showthread.php?t=8641
        Big ZABBIX is watching you!
        (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

        Comment

        • pierre-hoffmann
          Senior Member
          • Jan 2008
          • 133

          #5
          Hi,

          However my ibdata is growing every day
          Make an
          mysql zabbix -u root -p
          OPTIMIZE TABLE xxxx
          on each table this defrag tablespace but lock table ...

          Regards,
          Pierre.
          P.Hoffmann
          System & Network Admin.
          __________________________
          Zabbix version 1.8.1
          Hosts monitored 1300
          OS Novell SLES 10 SP2
          __________________________

          Comment

          • xs-
            Senior Member
            Zabbix Certified Specialist
            • Dec 2007
            • 393

            #6

            Comment

            • just2blue4u
              Senior Member
              • Apr 2006
              • 347

              #7
              here's what i do:
              Code:
              [root@server ~]# crontab -l
              # taeglich: MySQL-Backup aller DBs
              0 0 * * * nice mysqldump --flush-logs --delete-master-logs --all-databases -p'geheim' > /root/mysql-db-dump-imv.sql && echo "DB-Backup erstellt"|| echo "FEHLER BEIM ERSTELLEN DES DB-DUMP"
              
              # Montags morgens: MySQL-DBs optimieren
              0 5 * * 1 /etc/init.d/zabbix_server stop && mysqlcheck -Aoqp'geheim' && /etc/init.d/zabbix_server start || echo "FEHLER BEIM CHECKEN DER MYSQL-DBs"
              [root@server ~]#
              Big ZABBIX is watching you!
              (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

              Comment

              • Jason
                Senior Member
                • Nov 2007
                • 430

                #8
                Is is possible to run the mysqlcheck -o without it crashing zabbix_server? I really don't want to restart zabbix_server often as it resets all my triggers on stuff such as event logs etc...

                I'd ideally like to run it as a nightly cron script, but can't if it means a zabbix_server restart

                Comment

                Working...