CPU %usage restriction for a process

  • Is there a way to restrict a certain process so that is uses only a certain percentage of CPU time.

    There is a process that generates OLAP Cubes and is using 100% of the CPU time. This just completely stops me from doing anything else on the server. I would like to allocate a designated percentage of CPU time to this process, or even make it run in the background as a lower priority process, so we can do other things on the database.

  • The answer is no. You can prevent a specific CPU from being used on a multi-processor by turning it off in the server properties.

  • If you can command-line the process, you may be able to reduce it's priority by using the start command. I've never tried it for a non-interactive process, though. Executing a start /? from the command-line will give you the options available.

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/

    K. Brian Kelley
    @kbriankelley

  • Thanks for the answers guys.

    I have never used the 'Start'. It is a DTS package that is running and hogging all the CPU time. I am not sure if I can run it from a command line???

  • DTS you might try running from a separate machine. Have to make sure paths and permissions are there, but that way you move some of the load. Still have data access time, network, sql cpu usage, but some of the churning could be done on a workstation.

    Andy

    http://qa.sqlservercentral.com/columnists/awarren/

  • If it is a multi processor box you can use the MAXDOP query hint to ensure that that query only uses 1 processor.

  • Running a DTS is nothing but an OS command called dtsrun (with paramaters for DTS). You can change the command to be

    start /LOW dtsrun.exe

    followed by usual parameters for DTS.

    this means Windows will start this process in a LOW priority OS process.


    -- Amit



    "There is no 'patch' for stupidity."



    Download the Updated SQL Server 2005 Books Online.

  • ...and of course you could directly go into Properties of the DTS package and set the Priority Class to 'Low'.

    Regards, HansLindgren

  • Use the affinity mask option to increase performance on symmetric multiprocessor (SMP) systems (with more than four microprocessors) operating under heavy load. You can associate a thread with a specific processor and specify which processors Microsoft SQL Serverâ„¢ will use. You can exclude SQL Server activity from processors given specific workload assignments by the Windows NT 4.0 or Windows 2000 operating system.

    For details, See BOL "affinity mask Option"

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply