Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    89

    renice and Mysql

    I read the following at http://dev.mysql.com/doc/mysql/en/li...-install.html:

    We have discovered that it is essential to run the mysqld process with the highest possible priority on the 2.4 kernel to achieve maximum performance. This can be done by adding a renice -20 $$ command to mysqld_safe. In our testing on a four-CPU machine, increasing the priority resulted in a 60% throughput increase with 400 clients.
    Does this still apply? If so, why haven't I heard this being discussed on WHT or elsewhere as I would think this could have a big impact on performance.

    Should "renice -20 $$" be placed in my.cnf?

    Thanks.

  2. #2
    Join Date
    Oct 2003
    Location
    Long Island, New York
    Posts
    220
    I would advise against it, as this could cause your server to go downhill very quickly if a stray malformed query floats through. Then again, if this is a machine dedicated to hosting a forum, you may not have this problem as much as a shared hosting provider.
    TWSites.com - Business Web Hosting Solutions & Server Management Since 2003

  3. #3
    Join Date
    Oct 2003
    Posts
    89
    It's a dedicated machine for Mysql for one site, but the site is part forum, part gallery etc, and custom written. That makes me nervous so I guess I'll just leave it as is. Thanks.

  4. #4
    I don't think there's anything to worry about having MySQL run nice -20. I've ran it this way several times on very busy servers. Regarding what DoCk said, a bad query can kill your server no matter what priority MySQL is running at. Furthermore, on a dedicated MySQL server, there's really no scheduling contention between MySQL and other processes anyway--MySQL is the only thing running. Priority (nice) values for processes don't mean they run faster or more aggressive, it simply gives a process higher/lower preference of when it's ran when it has to compete with other processes that want to run at the same time too.

    Notice the wording in the MySQL manual says "throughput" increase, not speed or query execution time increase. As the word implies, a nice -20 MySQL process gets "through" the kernel's waiting line and to a CPU's attention quicker. Once there, the CPU will run it as quick as it can whether it's nice -20 or nice 20.

Posting Permissions

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