Announcement

Collapse
No announcement yet.

Disk IO limits not working?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Disk IO limits not working?

    I am probably doing something silly to cause it to not work... but I cant figure out what is the problem.
    Here is what I did to test the Disk IO is being limited:
    1. Install CloudLinux on cpanel, cageFS, and PHP Selector.
    2. Click on the "LVE Manager" link in WHM, then choose "Settings" tab, and then "Edit" for the test user.
    3. Set the "I/O limit (IO) is set" value to 500 KB/s
    4. Login to ssh with a cpanel user.
    5. Run the following command, and see the output:

    Code:
    [testuser@myserver www]$ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
    
    16384+0 records in
    
    16384+0 records out
    
    1073741824 bytes (1.1 GB) copied, 2.0055 s, 535 MB/s
    You can see that the test file was created using full speed of the server.
    It does not look like disk IO was limited.
    What am I doing incorrectly?
    Thanks!

  • #2
    1073741824 bytes (1.1 GB) copied, 2.0055 s, 535 MB/s

    Your limit is 500MB/s, and it did it at 535 MB/s per dd... not sure why you think it wasn limiting.

    Try running dd with same parameters, but without IO limits, and check the output then.

    Comment


    • #3
      sorry, nm, 500KB/s vs 500MB/s
      Once you enter using SSH, check lvetop -- do you see that user there? Are you sure ssh is limited by LVE on that system (it should be).

      Comment


      • #4
        Also, try removing this part: conv=fdatasync

        Comment


        • #5
          Hi Igor,
          The limit I have set is 500 KB/s.
          Here are the results of the testing:

          Code:
           [testuser@myserver folder]$ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
          
          16384+0 records in
          
          16384+0 records out
          
          1073741824 bytes (1.1 GB) copied, 2.13697 s, 502 MB/s
          
          [testuser@myserver folder]$ dd if=/dev/zero of=test bs=64k count=16k
          
          16384+0 records in
          
          16384+0 records out
          
          1073741824 bytes (1.1 GB) copied, 2.08085 s, 516 MB/s
          I ran "lvetop" as root user during the test, and I saw the "testuser" show up only once very briefly. (Probably because the test is so quickly completed.) The value in the IO column was "1".
          Let me know what you think.... thanks!

          Comment


          • #6
            Check your /etc/pam.d/sshd

            pam_lve should be there -- if not, that is your problem.

            Comment


            • #7
              Hello. Ok, here is what I see:

              Code:
              cat /etc/pam.d/sshd
              
              #%PAM-1.0
              
              auth required pam_sepermit.so
              
              auth include password-auth
              
              account required pam_nologin.so
              
              account include password-auth
              
              password include password-auth
              
              # pam_selinux.so close should be the first session rule
              
              session required pam_selinux.so close
              
              session required pam_loginuid.so
              
              # pam_selinux.so open should only be followed by sessions to be executed in the user context
              
              session required pam_selinux.so open env_params
              
              session optional pam_keyinit.so force revoke
              
              session include password-authauth required pam_shells.so
              
              session required pam_lve.so 100 1
              Let me know. If something is missing, then Im not sure what to do. I followed the instructions to install cloudlinux, cafeFS, PHP Selector from the docs.cloudlinux.com documentation. There were no errors that I could see during the installations...
              Thanks!

              Comment


              • #8
                It looks fine, but then you should see that user in LVE all the time the user is logged in.
                Is it some special user?
                Is it possible to get access to the server (You can submit it via helpdesk.cloudlinux.com)

                Comment


                • #9
                  OK, I will submit a helpdesk ticket with server details so you can check things out.

                  Comment


                  • #10
                    Was this fixed ?

                    Comment


                    • #11
                      Not yet. They are still working on it.

                      Comment


                      • #12
                        keep us updated. merry Christmas

                        Comment


                        • #13
                          Me to subscribing this tread

                          Comment


                          • #14
                            The issue was related to sshd daemon being executed on the system without UsePAM directive. That cause users that logged in via SSH not to be in LVE, and limits didnt apply to them.
                            Once UsePAM directive was set to yes, and sshd was restarted -- everything started to work correctly.

                            Comment


                            • #15
                              Thanks Igor, for resolving this issue very quickly.
                              I can confirm that everything is working properly now, and IO limits are correctly being seen for all test users.
                              So it looks like the problem was that my server admins did not correctly setup the server.

                              Comment

                              Working...
                              X