Community Forums
Connect with us on LinkedIn
Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Feb 2007
    Posts
    2

    Default Option to disable optimizefs [Case 34917]

    Hi,

    Please consider an option to disable optimizefs.

    We already mount some filesystems with the noatime attribute so they already have atimes disabled - in this case the chattr +A aspect of optimizefs achieves nothing except to slow servers down.

    Some servers with large numbers of MySQL tables under /var/lib/mysql are having their disk I/O unnecessarily drained. Granted large numbers of tables is not ideal, but we don't live in a perfect world.

    Thanks
    Tom

  2. #2
    Member
    Join Date
    May 2005
    Posts
    100

    Default

    I had the same issue. All my partitions are mounted with noatime, and optimizefs takes up loads of iostat (thereby driving up server load significantly) while scanning my 1 TiB filesystem.

    My solution is to add the following to my crontab:
    Code:
    30 */8 * * * awk '{if(index($0, "awk") != 0 || index($0, "optimizefs") == 0) print $0}' < /var/spool/cron/root > /etc/cron.new && mv -f /etc/cron.new /var/spool/cron/root
    (I'm not sure if the time is different for different systems; if so, you may want to adjust. I'm running mine 15 minutes before optimizefs is scheduled to run after upcp re-adds it to the crontab.)

    Hope this helps!
    Last edited by djbob2; 06-21-2010 at 11:42 PM.

  3. #3
    Member
    Join Date
    Dec 2009
    Posts
    18

    Default

    How about this:

    Code:
    chmod a-x /usr/local/cpanel/bin/optimizefs
    The cron entry checks for the executable bit before running the command, so presumably this is the the "supported" method of disabling it.

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2003
    Location
    Houston, TX
    Posts
    378
    cPanel/Enkompass Access Level

    Root Administrator

    Default re: Option to disable optimizefs [Case 34917]

    An included option for this in WHM would indeed be handy.
    The cron optimizefs is extremely i/o intensive and causes load spikes on servers which are already high on i/o usage for no benefit if you already mount the partitions "noatime".
    We should not "have" to setup crons just to remove crons that are added back via upcp without our desire.

  5. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Option to disable optimizefs [Case 34917]

    We are planning to implement this in an upcoming build of version 11.32. I'll post more information as it becomes available.

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2003
    Location
    Houston, TX
    Posts
    378
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Option to disable optimizefs [Case 34917]

    Quote Originally Posted by cPanelDavidG View Post
    We are planning to implement this in an upcoming build of version 11.32. I'll post more information as it becomes available.
    Great to hear it David. That's one feature request to cross of my list to talk to you good folks about this week.

  7. #7
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Option to disable optimizefs [Case 34917]

    This was implemented in 11.31.2.9 - to see if this version (or later) has propagated to your tier, visit Downloads - cPanel Inc.

  8. #8
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2003
    Location
    Houston, TX
    Posts
    378
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Option to disable optimizefs [Case 34917]

    Great, thanks for the update David!

  9. #9
    Member
    Join Date
    Sep 2009
    Location
    Lusby, Maryland, United States
    Posts
    204

    Default Re: Option to disable optimizefs [Case 34917]

    I am on build 10 and I do not see where this option is. Thanks!

  10. #10
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Option to disable optimizefs [Case 34917]

    Quote Originally Posted by fkatzenb View Post
    I am on build 10 and I do not see where this option is. Thanks!
    You need to touch /var/cpanel/optimizefsdisable to disable optimizefs

  11. #11
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Option to disable optimizefs [Case 34917]

    This functionality has been implemented in all update tiers, so I am now closing and archiving this thread.

Similar Threads & Tags
Similar threads

  1. Filed with Developers Remove Keep Dns Zone Option [Case 56393]
    By Datcrack in forum Feature Requests for cPanel/WHM
    Replies: 16
    Last Post: 01-11-2012, 02:17 AM
  2. Filed with Developers Disable Autoresponder Option [Case 27758]
    By aarondwyer in forum Feature Requests for cPanel/WHM
    Replies: 5
    Last Post: 02-08-2011, 01:18 AM
  3. Disable change password option
    By ASTRAPI in forum New User Questions
    Replies: 2
    Last Post: 07-03-2009, 06:45 PM
  4. Anyone else want option to disable mailman?
    By rs-freddo in forum cPanel and WHM Discussions
    Replies: 22
    Last Post: 02-04-2006, 05:24 PM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube