Announcement

Collapse
No announcement yet.

modhostinglimits LVEId bug?

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

  • modhostinglimits LVEId bug?

    Hello,

    While doing some RnD with modhostinglimits, found it to be not working as expected.

    Below are two users and their LVE settings that Ive set. (test2 = 500, test3 = 2000)

    Code:
    # lvectl list | grep -E CPU|500|2000
    
    ID     CPU      IO     MEM      EP
    
    500       2      25  262144       2
    
    2000      10      25  262144      20
    As you can see for test2, CPU limit is 2% (on 16 core system) and MaxEntryProcs is 2. For test3, they are 10% and 20 respectively.

    I have applied below setting in modhostinglimits.conf file for test2 user

    Code:
    <IfModule mod_hostinglimits.c>
    
    SkipErrors On
    
    AllowedHandlers *
    
    <Directory "/home/test2/public_html">
    
    LVEId 2000
    
    </Directory>
    
    </IfModule>
    It says, for user test2, all modhostinglimits requests should be processed in LVEId 2000 (i.e. test3 user)

    Now when I try to verify CPU limit and MaxEntryProcs limits for this test2 user by browsing a bash cgi script, I notice that, this user gets CPU limit as specified for test2(500) and MaxEntryProcs limit as specified for test3(2000).

    Below is some output to give some more insight into it.

    TOP Command output shows total CPU usage around 32% i.e. test2 users limit, and total processes running are many ie. test3 users lve limit which is 20.

    Code:
    top - 14:10:49 up 79 days, 20:18,  5 users,  load average: 0.72, 0.78, 0.67
    
    Tasks: 452 total,   6 running, 443 sleeping,   0 stopped,   3 zombie
    
    Cpu(s):  2.7%us,  1.1%sy,  0.0%ni, 96.0%id,  0.1%wa,  0.0%hi,  0.0%si,  0.0%st
    
    Mem:  24537984k total, 23821792k used,   716192k free,  1507280k buffers
    
    Swap:  4194296k total,   106036k used,  4088260k free, 13459492k cached
    
    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    
    1020710 test2   20   0  4076  616  536 R  7.0  0.0   0:02.42 seq
    
    1019824 test2   20   0  4076  620  536 R  6.6  0.0   1:03.54 seq
    
    1020728 test2   20   0  4076  624  536 R  6.6  0.0   0:01.66 seq
    
    1020733 test2   20   0  4076  624  536 R  6.6  0.0   0:01.23 seq
    
    1020683 test2   20   0  4076  620  536 R  6.3  0.0   0:02.89 seq
    
    1019823 test2   20   0 11292 1320 1120 S  0.0  0.0   0:00.00 testcgi.cgi
    
    1020682 test2   20   0 11292 1320 1120 S  0.0  0.0   0:00.00 testcgi.cgi
    
    1020709 test2   20   0 11292 1320 1120 S  0.0  0.0   0:00.00 testcgi.cgi
    
    1020727 test2   20   0 11292 1316 1120 S  0.0  0.0   0:00.00 testcgi.cgi
    
    1020732 test2   20   0 11292 1320 1120 S  0.0  0.0   0:00.00 testcgi.cgi
    To backup my observation, lvetop output reveals the same.

    Code:
    ID     EP    PNO    TNO    CPU      MEM    I/O
    
    test3      5      2      5     0%        0      0
    
    rdfbex12      0      1      1     0%    12380      0
    
    fewzmone      3      4      4     0%    22992      0
    
    myfdghio      0      0      0     0%        0      0
    
    jcdfg      0     34     34     0%    22904      0
    
    bidsdg      0      1      1     0%     6928      0
    
    test2      0     10     10     2%     3160      0
    Before I browse a test bash cgi script, test2 and test3 dont appear in lvetop at all.. indicating there is no activity going on in either LVE.

    The moment I browse a test bash cgi script, both users appear, indicating they appeared by the virtue of single request only. Then as I fire multiple requests to same test bash cgi scripts, I notice the test3s EP value increasing and CPU usage for the same remaining 0% constantly.. on the other hand, test2s EP remains 0 constantly but CPU usage shows 2%.

    This very much proves that single cgi script is handled into multiple LVEs for different type of limits.

    Regards

  • #2
    SuexecUserGroup will overwrite LVEId settings for pretty much anything but mod_php.

    Comment


    • #3
      I am sorry, can you please elaborate it more..

      There is no mod_php in the picture.. my cgi script is a bash script. Fr om your answer what I understand is SuexecUserGroup will not overwrite LVEId for mod_php but for the rest of the things it should work. And I am not using mod_php.

      My query was not about not overwriting LVEId for particular request. All I am saying is how can it overwrite MaxEntryProcs Limit and not CPU Lim it for same request with the effective LVEId..

      Comment


      • #4
        This option will not work in conjunction with SuexecUserGroup/cgis.
        It will only work with mod_php. Sorry - before it did work, but we changed a lot in how mod_hostinglimits works and as we go further, I think LVEId might disappear all together.

        Comment

        Working...
        X