Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to set the router to start with C3 as the default lowest possible C state?

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 2.9k Views
    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.
    • N
      nexusN
      last edited by

      Hi,

      Another strange question,
      To save power(or not?), I tried to set both core to C3 state to save some power.
      I read from some websites that with this configured the power consumption can be further lowered, thought I can't confirm it for I don't have a power meter.

      Using Celeron G530, I implemented a setting as below:
      The default C state without setting:
      Code:

      [2.0.1-RELEASE][admin@nchannel.nelsewhere.com]/root(5): sysctl dev.cpu |grep cx
      dev.cpu.0.cx_supported: C1/1 C2/80 C3/104
      dev.cpu.0.cx_lowest: C1
      dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 500us
      dev.cpu.1.cx_supported: C1/1 C2/80 C3/104
      dev.cpu.1.cx_lowest: C1
      dev.cpu.1.cx_usage: 100.00% 0.00% 0.00% last 500us
      

      To get C3 state works, the little tweak is:
      Code:

      # sysctl dev.cpu.0.cx_lowest=C3
      

      then you'll see:
      Code:

      dev.cpu.1.cx_lowest: C1 -> C3
      

      Do this for all cores.
      Verify by:
      Code:

      [2.0.1-RELEASE][admin@nchannel.nelsewhere.com]/root(12): sysctl dev.cpu | grep cx
      dev.cpu.0.cx_supported: C1/1 C2/80 C3/104
      dev.cpu.0.cx_lowest: C3
      dev.cpu.0.cx_usage: 2.76% 8.00% 89.22% last 306us
      dev.cpu.1.cx_supported: C1/1 C2/80 C3/104
      dev.cpu.1.cx_lowest: C3
      dev.cpu.1.cx_usage: 2.86% 10.01% 87.12% last 223us
      

      Suggested setting (one with C2 state, other as deep as possible) by vermaden if you have problems on not responding, but unlikely to be an issue for router as I experienced.

      Here is the problem.
      To permanently set the lowest C state, add the lines in /etc/sysctl.conf.
      "Update: I can't make it to run with booting even with the above lines added to sysctl.conf nor /etc/rc.conf,
      is there any other ways?
      Thanks."

      Ref-ed from below links:
      http://forums.freebsd.org/showthread.php?t=172
      http://wiki.freebsd.org/TuningPowerConsumption

      1 Reply Last reply Reply Quote 0
      • W
        wallabybob
        last edited by

        On startup pfSense regenerates a number of system configuration files from the pfSense master configuration file. So use System -> Advanced click on System Tunables to cause pfSense startup to set the sysctl variables from its master configuration file.

        1 Reply Last reply Reply Quote 0
        • N
          nexusN
          last edited by

          @wallabybob:

          On startup pfSense regenerates a number of system configuration files from the pfSense master configuration file. So use System -> Advanced click on System Tunables to cause pfSense startup to set the sysctl variables from its master configuration file.

          That's the point, no wonder everytime my setting is gone and even the config file ::)
          Thanks and I will try.

          1 Reply Last reply Reply Quote 0
          • N
            nexusN
            last edited by

            @nexusN:

            @wallabybob:

            On startup pfSense regenerates a number of system configuration files from the pfSense master configuration file. So use System -> Advanced click on System Tunables to cause pfSense startup to set the sysctl variables from its master configuration file.

            That's the point, no wonder everytime my setting is gone and even the config file ::)
            Thanks and I will try.

            Sorry for not being familiar with it,
            how do I achieve the setting?

            In that page, there are three parameter to set, apart from Description, what does "Tunable Name" and "Value" stand for?
            For example, the code I need to set is

            sysctl dev.cpu.0.cx_lowest=C3
            

            Should I add a new entry with
            Tunable Name = sysctl dev.cpu.0.cx_lowest
            Value = C3

            Thanks a lot.

            Sorry but another question not related, appreciate if you can help on it.
            "Firewall Maximum Table Entries" what does its value base on and how should I set it?
            For "Firewall Maximum States" I am setting it according to the RAM size, 4GB so it is set as 3.82M states.
            How about the Entries? According to RAM or something else?

            Thanks.

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Tunable name should be: dev.cpu.0.cx_lowest

              I wouldn't worry about the firewall values unless you have a specific problem.

              Steve

              1 Reply Last reply Reply Quote 0
              • N
                nexusN
                last edited by

                @stephenw10:

                Tunable name should be: dev.cpu.0.cx_lowest

                I wouldn't worry about the firewall values unless you have a specific problem.

                Steve

                Thanks for the clarification ;D

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.