Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to limit cpu usage on Linux CentOS per Stata process?

    You can set maximum memory for Stata. But how about cpu usage? Sometimes Stata will eat up 100% cpu usage for several hours, which is not healthy. What is the proper Linux command to deal with it? Or any Stata built-in command can be used?

  • #2
    There are probably some ways to do this, but if that much computing power is being used it is likely due to the complexity of the models/processes. You can renice the process to set a lower priority for the Stata processes, but I'm not sure about setting explicit caps on the processing power allowed to be consumed. Is there some reason why you need to limit Stata to a specific cap?

    Comment


    • #3
      I will try with "renice" command, Thank you. It occurs once that after total cpu usage I can not login remotely temporarily. Not healthy.

      Comment


      • #4
        Did the server go down perhaps? I used to get bizarre looks from one of my sys admin buddies when I would run computationally heavy tasks since the infrastructure would move the different VMs to different physical machines to free up resources but never had any issues ssh'ing into the server while those processes were running (and consuming all processing power and all the available RAM). Keep in mind also that renice just sets the priority for scheduling the tasks (e.g., the order in which the kernel will process the queue).

        Comment


        • #5
          The probable reason might be server swap disk for RAM like crazy with cpu 100% usage. It did not go down, but I had IT guy went back to facilities to reboot the server. After that, I add another stick of 8G RAM. And now it is stable.

          Comment

          Working...
          X