ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How to tune or optimize MySQL or MariaDB ?

    IT Discussion
    3
    13
    772
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Integrated databases are often much faster. Especially at small sizes. If you are heavily constrained, I would expect SQLite to be faster since the RDBMS doesn't need to be loaded and no network overhead is needed.

      Emad RE 1 Reply Last reply Reply Quote 2
      • scottalanmillerS
        scottalanmiller
        last edited by

        Are you sure that the delays are coming from the database and not the application? MariaDB is screaming fast. Perhaps you have an IOPS problem and the system is blocked on the operation. There is not way that the database is taking five seconds to respond. That's not a reasonable assumption. Something else is wrong.

        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller
          last edited by

          Perhaps you are out of memory? This could be extreme swapping?

          Emad RE 1 Reply Last reply Reply Quote 0
          • Emad RE
            Emad R @scottalanmiller
            last edited by

            @scottalanmiller said in How to tune or optimize MySQL or MariaDB ?:

            What kind of extreme resource limits are you under to produce this concern?

            the fact that the web is wealthy with documents and variables to speed up mariadb/mysql

            things like:
            innodb_buffer_pool_size
            innodb_log_file_size
            innodb_file_per_table
            innodb_flush_log_at_trx_commit
            query_cache_size
            ...etc

            All this got me thinking what are the defaults of Centos MariaDB installation, and are they enough to handle any load ?

            And the VM have 2GB of RAM btw.

            scottalanmillerS 1 Reply Last reply Reply Quote 0
            • Emad RE
              Emad R @scottalanmiller
              last edited by

              @scottalanmiller

              using free -m I am using 512 of 2GB ram

              1 Reply Last reply Reply Quote 0
              • Emad RE
                Emad R @scottalanmiller
                last edited by

                @scottalanmiller said in How to tune or optimize MySQL or MariaDB ?:

                Integrated databases are often much faster. Especially at small sizes. If you are heavily constrained, I would expect SQLite to be faster since the RDBMS doesn't need to be loaded and no network overhead is needed.

                I guess this is it really then, to be honest it is more like 3 seconds, but with the integrated database it was very fast, thus I noticed it.

                scottalanmillerS 2 Replies Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @Emad R
                  last edited by

                  @msff-amman-Itofficer said in How to tune or optimize MySQL or MariaDB ?:

                  @scottalanmiller said in How to tune or optimize MySQL or MariaDB ?:

                  What kind of extreme resource limits are you under to produce this concern?

                  the fact that the web is wealthy with documents and variables to speed up mariadb/mysql

                  things like:
                  innodb_buffer_pool_size
                  innodb_log_file_size
                  innodb_file_per_table
                  innodb_flush_log_at_trx_commit
                  query_cache_size
                  ...etc

                  All this got me thinking what are the defaults of Centos MariaDB installation, and are they enough to handle any load ?

                  And the VM have 2GB of RAM btw.

                  You haven't even mentioned what database engine you are using. I'm assuming InnoDB but that's not the most common with MariaDB. But just because the Internet is full of people talking about it doesn't tell us that it is appropriated or useful. The web is full of people recommended RAID 5 for databases but we know that's crazy (till SSD).

                  1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @Emad R
                    last edited by

                    @msff-amman-Itofficer said in How to tune or optimize MySQL or MariaDB ?:

                    @scottalanmiller said in How to tune or optimize MySQL or MariaDB ?:

                    Integrated databases are often much faster. Especially at small sizes. If you are heavily constrained, I would expect SQLite to be faster since the RDBMS doesn't need to be loaded and no network overhead is needed.

                    I guess this is it really then, to be honest it is more like 3 seconds, but with the integrated database it was very fast, thus I noticed it.

                    But you changed everything, not just the database. It's not reasonable to think that the database is the factor in question. Possible, yes. Likely? Not at all.

                    1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller @Emad R
                      last edited by

                      @msff-amman-Itofficer said in How to tune or optimize MySQL or MariaDB ?:

                      @scottalanmiller said in How to tune or optimize MySQL or MariaDB ?:

                      Integrated databases are often much faster. Especially at small sizes. If you are heavily constrained, I would expect SQLite to be faster since the RDBMS doesn't need to be loaded and no network overhead is needed.

                      I guess this is it really then, to be honest it is more like 3 seconds, but with the integrated database it was very fast, thus I noticed it.

                      No. There is no realistic possibility that this is it. Not even slightly.

                      JaredBuschJ 1 Reply Last reply Reply Quote 0
                      • JaredBuschJ
                        JaredBusch @scottalanmiller
                        last edited by

                        @scottalanmiller said in How to tune or optimize MySQL or MariaDB ?:

                        @msff-amman-Itofficer said in How to tune or optimize MySQL or MariaDB ?:

                        @scottalanmiller said in How to tune or optimize MySQL or MariaDB ?:

                        Integrated databases are often much faster. Especially at small sizes. If you are heavily constrained, I would expect SQLite to be faster since the RDBMS doesn't need to be loaded and no network overhead is needed.

                        I guess this is it really then, to be honest it is more like 3 seconds, but with the integrated database it was very fast, thus I noticed it.

                        No. There is no realistic possibility that this is it. Not even slightly.

                        Exactly. The ScreenConnect server performs like crap on Linux compared to Windows. But the problem is not the database. It is the .NET framework.

                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                        • scottalanmillerS
                          scottalanmiller @JaredBusch
                          last edited by

                          @JaredBusch said in How to tune or optimize MySQL or MariaDB ?:

                          Exactly. The ScreenConnect server performs like crap on Linux compared to Windows. But the problem is not the database. It is the .NET framework.

                          Right, I could totally see there being an application layer issue. Or a hardware problem. Or the system just being over-taxed. So many options. But that MariaDB isn't "tuned" for this, that's not a possibility. We'd measure the database response time for this in milliseconds, not seconds. And only sixty records? I've got MySQL on ancient systems with a fraction of these resources that will return literally millions of records in less time than that.

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post