TCP variants under lsmod

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I was reading about how TCP congestion variants are implemented in Linux. Each variant is implemented as a separate module.



When I had read this question: Add TCP congestion control variant to Linux Ubuntu



I understood that the variant can be loaded using modprobe.



Does that mean when lsmod is running, TCP cubic must show as default-loaded? When I run lsmod, I cannot find the loaded module associated with congestion control. Are there specific types of kernel modules are listed under lsmod?










share|improve this question



























    up vote
    1
    down vote

    favorite












    I was reading about how TCP congestion variants are implemented in Linux. Each variant is implemented as a separate module.



    When I had read this question: Add TCP congestion control variant to Linux Ubuntu



    I understood that the variant can be loaded using modprobe.



    Does that mean when lsmod is running, TCP cubic must show as default-loaded? When I run lsmod, I cannot find the loaded module associated with congestion control. Are there specific types of kernel modules are listed under lsmod?










    share|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I was reading about how TCP congestion variants are implemented in Linux. Each variant is implemented as a separate module.



      When I had read this question: Add TCP congestion control variant to Linux Ubuntu



      I understood that the variant can be loaded using modprobe.



      Does that mean when lsmod is running, TCP cubic must show as default-loaded? When I run lsmod, I cannot find the loaded module associated with congestion control. Are there specific types of kernel modules are listed under lsmod?










      share|improve this question















      I was reading about how TCP congestion variants are implemented in Linux. Each variant is implemented as a separate module.



      When I had read this question: Add TCP congestion control variant to Linux Ubuntu



      I understood that the variant can be loaded using modprobe.



      Does that mean when lsmod is running, TCP cubic must show as default-loaded? When I run lsmod, I cannot find the loaded module associated with congestion control. Are there specific types of kernel modules are listed under lsmod?







      linux kernel-modules tcp






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 16 at 14:49









      Goro

      5,75252662




      5,75252662










      asked Sep 16 at 11:26









      Gautam Ramakrishnan

      82




      82




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          There's the question to address and a little clarification for this specific case (congestion).



          A kernel module is a part of the kernel that is optional and doesn't have to be present at kernel initial start nor later if not needed. It's a kind of plug-in. This allows to have most functionalities available on-demand, without using memory if never used. Most modules can be compiled as modules or built-in. If built-in, it implies you won't find a .ko module file because it's already in the initial kernel.



          You can check what was done:




          • either by knowing the configuration option (here CONFIG_TCP_CONG_CUBIC), having access to the configuration used, usually as a file in /boot/config-$(uname -r), and verifying what option was used:



            grep CONFIG_TCP_CONG_CUBIC /boot/config-$(uname -r)



          • or by knowing the module name and checking if the module is in the list of built-in modules:



            fgrep tcp_cubic.ko /lib/modules/$(uname -r)/modules.builtin


          Examples of likely results for your case since you didn't find the module, but with cubic the likely default it probably means it was built-in:



          $ grep _CUBIC /boot/config-$(uname -r)
          CONFIG_TCP_CONG_CUBIC=y
          CONFIG_DEFAULT_CUBIC=y
          $ fgrep tcp_cubic.ko /lib/modules/$(uname -r)/modules.builtin
          kernel/net/ipv4/tcp_cubic.ko


          So this answers the question: consider you have the module always loaded, because it's built-in. It makes sense to have the default be built-in (it's often required).



          The list of built-in module files you might expect to find somewhere in /lib/modules/$(uname -r) and be displayed with lsmod but that you won't, can be displayed with cat /lib/modules/$(uname -r)/modules.builtin. They are not special, but were chosen so (by your Linux distribution) often but not always because a default had to be chosen among a list of choices, to be built-in, including all related module dependencies.



          Now about the little clarification: of course a module has to be loaded (or built-in) to have its functionality available. But the Q/A you linked to didn't say you only had to load the tcp congestion module to have it activated. Quote:




          To try one of these you need to install it using modprobe -a
          tcp_westwood or whatever you want. You can then test it using this



          echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control



          Since this pseudo-file is read/write, you can just query it to know what congestion is in use with probably this result:



          $ cat /proc/sys/net/ipv4/tcp_congestion_control
          cubic


          Now to change the algorithm:



          # lsmod | grep tcp_westwood
          # echo westwood > /proc/sys/net/ipv4/tcp_congestion_control
          # lsmod | grep tcp_westwood
          tcp_westwood 16384 1


          The module was auto-loaded and is now in use (some systems might not auto-load).



          Anyway the adequate information for this specific case is in /proc/sys/net/ipv4/tcp_congestion_control, not lsmod's output.






          share|improve this answer






















          • Thanks for the clarification. It makes more sense now. Also, does that mean multiple tcp variants can me simultaneously loaded, but the one used will be based on the tcp_congestion_control file?
            – Gautam Ramakrishnan
            Sep 16 at 13:15










          • Yes. Now I don't know if there are options to use multiple ones at once (probably doesn't make much sense), but I can tell it's a per socket use: I now temporarily have sockets using cubic and others using westwood (until they close).
            – A.B
            Sep 16 at 13:18











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f469370%2ftcp-variants-under-lsmod%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          There's the question to address and a little clarification for this specific case (congestion).



          A kernel module is a part of the kernel that is optional and doesn't have to be present at kernel initial start nor later if not needed. It's a kind of plug-in. This allows to have most functionalities available on-demand, without using memory if never used. Most modules can be compiled as modules or built-in. If built-in, it implies you won't find a .ko module file because it's already in the initial kernel.



          You can check what was done:




          • either by knowing the configuration option (here CONFIG_TCP_CONG_CUBIC), having access to the configuration used, usually as a file in /boot/config-$(uname -r), and verifying what option was used:



            grep CONFIG_TCP_CONG_CUBIC /boot/config-$(uname -r)



          • or by knowing the module name and checking if the module is in the list of built-in modules:



            fgrep tcp_cubic.ko /lib/modules/$(uname -r)/modules.builtin


          Examples of likely results for your case since you didn't find the module, but with cubic the likely default it probably means it was built-in:



          $ grep _CUBIC /boot/config-$(uname -r)
          CONFIG_TCP_CONG_CUBIC=y
          CONFIG_DEFAULT_CUBIC=y
          $ fgrep tcp_cubic.ko /lib/modules/$(uname -r)/modules.builtin
          kernel/net/ipv4/tcp_cubic.ko


          So this answers the question: consider you have the module always loaded, because it's built-in. It makes sense to have the default be built-in (it's often required).



          The list of built-in module files you might expect to find somewhere in /lib/modules/$(uname -r) and be displayed with lsmod but that you won't, can be displayed with cat /lib/modules/$(uname -r)/modules.builtin. They are not special, but were chosen so (by your Linux distribution) often but not always because a default had to be chosen among a list of choices, to be built-in, including all related module dependencies.



          Now about the little clarification: of course a module has to be loaded (or built-in) to have its functionality available. But the Q/A you linked to didn't say you only had to load the tcp congestion module to have it activated. Quote:




          To try one of these you need to install it using modprobe -a
          tcp_westwood or whatever you want. You can then test it using this



          echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control



          Since this pseudo-file is read/write, you can just query it to know what congestion is in use with probably this result:



          $ cat /proc/sys/net/ipv4/tcp_congestion_control
          cubic


          Now to change the algorithm:



          # lsmod | grep tcp_westwood
          # echo westwood > /proc/sys/net/ipv4/tcp_congestion_control
          # lsmod | grep tcp_westwood
          tcp_westwood 16384 1


          The module was auto-loaded and is now in use (some systems might not auto-load).



          Anyway the adequate information for this specific case is in /proc/sys/net/ipv4/tcp_congestion_control, not lsmod's output.






          share|improve this answer






















          • Thanks for the clarification. It makes more sense now. Also, does that mean multiple tcp variants can me simultaneously loaded, but the one used will be based on the tcp_congestion_control file?
            – Gautam Ramakrishnan
            Sep 16 at 13:15










          • Yes. Now I don't know if there are options to use multiple ones at once (probably doesn't make much sense), but I can tell it's a per socket use: I now temporarily have sockets using cubic and others using westwood (until they close).
            – A.B
            Sep 16 at 13:18















          up vote
          0
          down vote



          accepted










          There's the question to address and a little clarification for this specific case (congestion).



          A kernel module is a part of the kernel that is optional and doesn't have to be present at kernel initial start nor later if not needed. It's a kind of plug-in. This allows to have most functionalities available on-demand, without using memory if never used. Most modules can be compiled as modules or built-in. If built-in, it implies you won't find a .ko module file because it's already in the initial kernel.



          You can check what was done:




          • either by knowing the configuration option (here CONFIG_TCP_CONG_CUBIC), having access to the configuration used, usually as a file in /boot/config-$(uname -r), and verifying what option was used:



            grep CONFIG_TCP_CONG_CUBIC /boot/config-$(uname -r)



          • or by knowing the module name and checking if the module is in the list of built-in modules:



            fgrep tcp_cubic.ko /lib/modules/$(uname -r)/modules.builtin


          Examples of likely results for your case since you didn't find the module, but with cubic the likely default it probably means it was built-in:



          $ grep _CUBIC /boot/config-$(uname -r)
          CONFIG_TCP_CONG_CUBIC=y
          CONFIG_DEFAULT_CUBIC=y
          $ fgrep tcp_cubic.ko /lib/modules/$(uname -r)/modules.builtin
          kernel/net/ipv4/tcp_cubic.ko


          So this answers the question: consider you have the module always loaded, because it's built-in. It makes sense to have the default be built-in (it's often required).



          The list of built-in module files you might expect to find somewhere in /lib/modules/$(uname -r) and be displayed with lsmod but that you won't, can be displayed with cat /lib/modules/$(uname -r)/modules.builtin. They are not special, but were chosen so (by your Linux distribution) often but not always because a default had to be chosen among a list of choices, to be built-in, including all related module dependencies.



          Now about the little clarification: of course a module has to be loaded (or built-in) to have its functionality available. But the Q/A you linked to didn't say you only had to load the tcp congestion module to have it activated. Quote:




          To try one of these you need to install it using modprobe -a
          tcp_westwood or whatever you want. You can then test it using this



          echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control



          Since this pseudo-file is read/write, you can just query it to know what congestion is in use with probably this result:



          $ cat /proc/sys/net/ipv4/tcp_congestion_control
          cubic


          Now to change the algorithm:



          # lsmod | grep tcp_westwood
          # echo westwood > /proc/sys/net/ipv4/tcp_congestion_control
          # lsmod | grep tcp_westwood
          tcp_westwood 16384 1


          The module was auto-loaded and is now in use (some systems might not auto-load).



          Anyway the adequate information for this specific case is in /proc/sys/net/ipv4/tcp_congestion_control, not lsmod's output.






          share|improve this answer






















          • Thanks for the clarification. It makes more sense now. Also, does that mean multiple tcp variants can me simultaneously loaded, but the one used will be based on the tcp_congestion_control file?
            – Gautam Ramakrishnan
            Sep 16 at 13:15










          • Yes. Now I don't know if there are options to use multiple ones at once (probably doesn't make much sense), but I can tell it's a per socket use: I now temporarily have sockets using cubic and others using westwood (until they close).
            – A.B
            Sep 16 at 13:18













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          There's the question to address and a little clarification for this specific case (congestion).



          A kernel module is a part of the kernel that is optional and doesn't have to be present at kernel initial start nor later if not needed. It's a kind of plug-in. This allows to have most functionalities available on-demand, without using memory if never used. Most modules can be compiled as modules or built-in. If built-in, it implies you won't find a .ko module file because it's already in the initial kernel.



          You can check what was done:




          • either by knowing the configuration option (here CONFIG_TCP_CONG_CUBIC), having access to the configuration used, usually as a file in /boot/config-$(uname -r), and verifying what option was used:



            grep CONFIG_TCP_CONG_CUBIC /boot/config-$(uname -r)



          • or by knowing the module name and checking if the module is in the list of built-in modules:



            fgrep tcp_cubic.ko /lib/modules/$(uname -r)/modules.builtin


          Examples of likely results for your case since you didn't find the module, but with cubic the likely default it probably means it was built-in:



          $ grep _CUBIC /boot/config-$(uname -r)
          CONFIG_TCP_CONG_CUBIC=y
          CONFIG_DEFAULT_CUBIC=y
          $ fgrep tcp_cubic.ko /lib/modules/$(uname -r)/modules.builtin
          kernel/net/ipv4/tcp_cubic.ko


          So this answers the question: consider you have the module always loaded, because it's built-in. It makes sense to have the default be built-in (it's often required).



          The list of built-in module files you might expect to find somewhere in /lib/modules/$(uname -r) and be displayed with lsmod but that you won't, can be displayed with cat /lib/modules/$(uname -r)/modules.builtin. They are not special, but were chosen so (by your Linux distribution) often but not always because a default had to be chosen among a list of choices, to be built-in, including all related module dependencies.



          Now about the little clarification: of course a module has to be loaded (or built-in) to have its functionality available. But the Q/A you linked to didn't say you only had to load the tcp congestion module to have it activated. Quote:




          To try one of these you need to install it using modprobe -a
          tcp_westwood or whatever you want. You can then test it using this



          echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control



          Since this pseudo-file is read/write, you can just query it to know what congestion is in use with probably this result:



          $ cat /proc/sys/net/ipv4/tcp_congestion_control
          cubic


          Now to change the algorithm:



          # lsmod | grep tcp_westwood
          # echo westwood > /proc/sys/net/ipv4/tcp_congestion_control
          # lsmod | grep tcp_westwood
          tcp_westwood 16384 1


          The module was auto-loaded and is now in use (some systems might not auto-load).



          Anyway the adequate information for this specific case is in /proc/sys/net/ipv4/tcp_congestion_control, not lsmod's output.






          share|improve this answer














          There's the question to address and a little clarification for this specific case (congestion).



          A kernel module is a part of the kernel that is optional and doesn't have to be present at kernel initial start nor later if not needed. It's a kind of plug-in. This allows to have most functionalities available on-demand, without using memory if never used. Most modules can be compiled as modules or built-in. If built-in, it implies you won't find a .ko module file because it's already in the initial kernel.



          You can check what was done:




          • either by knowing the configuration option (here CONFIG_TCP_CONG_CUBIC), having access to the configuration used, usually as a file in /boot/config-$(uname -r), and verifying what option was used:



            grep CONFIG_TCP_CONG_CUBIC /boot/config-$(uname -r)



          • or by knowing the module name and checking if the module is in the list of built-in modules:



            fgrep tcp_cubic.ko /lib/modules/$(uname -r)/modules.builtin


          Examples of likely results for your case since you didn't find the module, but with cubic the likely default it probably means it was built-in:



          $ grep _CUBIC /boot/config-$(uname -r)
          CONFIG_TCP_CONG_CUBIC=y
          CONFIG_DEFAULT_CUBIC=y
          $ fgrep tcp_cubic.ko /lib/modules/$(uname -r)/modules.builtin
          kernel/net/ipv4/tcp_cubic.ko


          So this answers the question: consider you have the module always loaded, because it's built-in. It makes sense to have the default be built-in (it's often required).



          The list of built-in module files you might expect to find somewhere in /lib/modules/$(uname -r) and be displayed with lsmod but that you won't, can be displayed with cat /lib/modules/$(uname -r)/modules.builtin. They are not special, but were chosen so (by your Linux distribution) often but not always because a default had to be chosen among a list of choices, to be built-in, including all related module dependencies.



          Now about the little clarification: of course a module has to be loaded (or built-in) to have its functionality available. But the Q/A you linked to didn't say you only had to load the tcp congestion module to have it activated. Quote:




          To try one of these you need to install it using modprobe -a
          tcp_westwood or whatever you want. You can then test it using this



          echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control



          Since this pseudo-file is read/write, you can just query it to know what congestion is in use with probably this result:



          $ cat /proc/sys/net/ipv4/tcp_congestion_control
          cubic


          Now to change the algorithm:



          # lsmod | grep tcp_westwood
          # echo westwood > /proc/sys/net/ipv4/tcp_congestion_control
          # lsmod | grep tcp_westwood
          tcp_westwood 16384 1


          The module was auto-loaded and is now in use (some systems might not auto-load).



          Anyway the adequate information for this specific case is in /proc/sys/net/ipv4/tcp_congestion_control, not lsmod's output.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Sep 16 at 13:13

























          answered Sep 16 at 12:52









          A.B

          3,5521723




          3,5521723











          • Thanks for the clarification. It makes more sense now. Also, does that mean multiple tcp variants can me simultaneously loaded, but the one used will be based on the tcp_congestion_control file?
            – Gautam Ramakrishnan
            Sep 16 at 13:15










          • Yes. Now I don't know if there are options to use multiple ones at once (probably doesn't make much sense), but I can tell it's a per socket use: I now temporarily have sockets using cubic and others using westwood (until they close).
            – A.B
            Sep 16 at 13:18

















          • Thanks for the clarification. It makes more sense now. Also, does that mean multiple tcp variants can me simultaneously loaded, but the one used will be based on the tcp_congestion_control file?
            – Gautam Ramakrishnan
            Sep 16 at 13:15










          • Yes. Now I don't know if there are options to use multiple ones at once (probably doesn't make much sense), but I can tell it's a per socket use: I now temporarily have sockets using cubic and others using westwood (until they close).
            – A.B
            Sep 16 at 13:18
















          Thanks for the clarification. It makes more sense now. Also, does that mean multiple tcp variants can me simultaneously loaded, but the one used will be based on the tcp_congestion_control file?
          – Gautam Ramakrishnan
          Sep 16 at 13:15




          Thanks for the clarification. It makes more sense now. Also, does that mean multiple tcp variants can me simultaneously loaded, but the one used will be based on the tcp_congestion_control file?
          – Gautam Ramakrishnan
          Sep 16 at 13:15












          Yes. Now I don't know if there are options to use multiple ones at once (probably doesn't make much sense), but I can tell it's a per socket use: I now temporarily have sockets using cubic and others using westwood (until they close).
          – A.B
          Sep 16 at 13:18





          Yes. Now I don't know if there are options to use multiple ones at once (probably doesn't make much sense), but I can tell it's a per socket use: I now temporarily have sockets using cubic and others using westwood (until they close).
          – A.B
          Sep 16 at 13:18


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f469370%2ftcp-variants-under-lsmod%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)