Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docpublic:systemes:moodle:moodle_mooc [2014/01/03 13:31]
procacci@tem-tsp.eu [mise en ligne via rsync]
docpublic:systemes:moodle:moodle_mooc [2014/01/22 14:37] (current)
procacci@tem-tsp.eu [Awstats]
Line 3: Line 3:
 ===== Introduction ===== ===== Introduction =====
  
-Telecom SudParis à mis en place fin 2013 un MOOC intitulé "Comprendre les concepts des Télécommunication": http://mooc.telecom-sudparis.eu.+Telecom SudParis à mis en place en decembre 2013 un MOOC intitulé "Comprendre les concepts des Télécommunication": http://mooc.telecom-sudparis.eu.
  
 Cette page presente les aspects techniques systemes mis en oeuvre afin d'assurer la diffusion de ce MOOC. Cette page presente les aspects techniques systemes mis en oeuvre afin d'assurer la diffusion de ce MOOC.
  
-Fort de notre experience sur la plateforme Moodle pour les cours en ligne des formations initiales et continus,  et considerant les delais impartis, nous avons jugés opportun de poursuivre sur le LMS moodle pour la diffusion de ce MOOC.+Fort de notre experience sur la plateforme Moodle pour les cours en ligne des formations initiales et continus,  et considerant les delais impartis, nous avons jugés opportun de poursuivre sur le LMS Moodle pour la diffusion de ce MOOC.
  
 Cette article aborde les aspects tehniques : Cette article aborde les aspects tehniques :
-  * applicatifs (moodle, gestionnaire git), systemes (apache) , +  * applicatifs (moodle, gestionnaire git) et backends (apache, mysql), 
-  * tests de montés en charge (tsung), +  * des tests de montés en charge (tsung), 
   * reporting, statistiques d'usages   * reporting, statistiques d'usages
  
Line 57: Line 57:
 ==== Awstats ==== ==== Awstats ====
  
-le résumé awstats d'apache pour le mois de Décembre 2013+le résumé awstats d'apache 
  
-{{:docpublic:systemes:moodle:mooc-concepts-telecom-awstats-resum12-2013.png?200|}}+  * Décembre 2013 
 +{{:docpublic:systemes:moodle:mooc-concepts-telecom-awstats-resum12-2013.png?200|}}   
 + 
 +  * Janvier 2014 
 + 
 +{{:docpublic:systemes:moodle:2014-01-22-mooc-tsp-awstat-resume-janvier.jpg?200|}}
  
 ===== Moodle Mooc ===== ===== Moodle Mooc =====
Line 228: Line 233:
 </code> </code>
  
-==== mise en ligne via rsync ====+==== 1er mise en ligne via rsync ====
  
 Nous mettons en ligne (dans une arborescence visible du serveur apache) notre repository d'instance maison moodle (mooctsp) Nous mettons en ligne (dans une arborescence visible du serveur apache) notre repository d'instance maison moodle (mooctsp)
Line 314: Line 319:
 Définition d'un Virtual Host Apache pour heberger cette instance moodle-mooc => création d'un fichier de configuration spécifique dans conf.d d'apache. Définition d'un Virtual Host Apache pour heberger cette instance moodle-mooc => création d'un fichier de configuration spécifique dans conf.d d'apache.
  
-On notera l'usage d'une authetification SSO shibboleth pour la communauté education/recherche, qui ne sera pas detaillée ici, sujet à part entiere ...+On notera l'usage d'une authentification SSO shibboleth pour la communauté education/recherche, qui ne sera pas detaillée ici, c'est un sujet à part entiere ...
  
 On gere aussi une instance en https avec les certificats qui vont bien. On gere aussi une instance en https avec les certificats qui vont bien.
Line 443: Line 448:
  
 <code> <code>
-[root@flow .tsung]# cat tsung-moocZ-scenario3.xml+[root@flowmon .tsung]# cat tsung-moocZ-scenario5.xml
 <?xml version="1.0"?> <?xml version="1.0"?>
 <!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd"> <!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
 <tsung loglevel="notice" version="1.0"> <tsung loglevel="notice" version="1.0">
 +  
 +    <!-- Configuration du client --> 
 +  <!--  <clients> --> 
 +      <!--  <client host="localhost" use_controller_vm="true"/> --> 
 +        <!--<client host="ursinum.int-evry.fr" use_controller_vm="true"/> --> 
 +        <!-- <ip value="157.159.22.73"></ip>  
 +        <ip value="157.159.22.85"></ip> 
 +        </client> --> 
 +  <!--  </clients> -->
     <!-- Configuration du client -->     <!-- Configuration du client -->
     <clients>     <clients>
-            <client host="flow" use_controller_vm="false"/> +            <client host="flowmon" use_controller_vm="false"/> 
-            <client host="wik" weight="1" maxusers="600" cpu="1"> +            <client host="wikis" weight="1" maxusers="600" cpu="1"> 
         <ip value="157.159.11.129"></ip>         <ip value="157.159.11.129"></ip>
             </client>             </client>
-            <client host="aude" weight="1" maxusers="600" cpu="1"> +            <client host="auth" weight="2" maxusers="600" cpu="1"> 
         <ip value="157.159.211.18"></ip>         <ip value="157.159.211.18"></ip>
             </client>             </client>
Line 465: Line 478:
     </servers>     </servers>
    
-    <!-- phases d'arrivée, 3 paliers de 10 minutes où l'on augmente la fréquence d'arrivée de 1 puis 10 puis 30 visiteurs par seconde -->+    <!-- phases d'arrivée, 3 paliers de 10 minutes où l'on augmente la fréquence d'arrivée de 1 puis puis 10 visiteurs par seconde -->
     <load>     <load>
         <arrivalphase phase="1" duration="1" unit="minute">         <arrivalphase phase="1" duration="1" unit="minute">
             <users arrivalrate="1" unit="second"></users>             <users arrivalrate="1" unit="second"></users>
         </arrivalphase>         </arrivalphase>
-        <arrivalphase phase="2" duration="1" unit="minute">+        <arrivalphase phase="2" duration="5" unit="minute">
             <users arrivalrate="5" unit="second"></users>             <users arrivalrate="5" unit="second"></users>
         </arrivalphase>         </arrivalphase>
-        <arrivalphase phase="3" duration="1" unit="minute">+        <arrivalphase phase="3" duration="10" unit="minute">
             <users arrivalrate="10" unit="second"></users>             <users arrivalrate="10" unit="second"></users>
         </arrivalphase>         </arrivalphase>
Line 486: Line 499:
  <request><http url='/mod/page/view.php?id=110' version='1.1' method='GET'></http></request>  <request><http url='/mod/page/view.php?id=110' version='1.1' method='GET'></http></request>
         </session>         </session>
-        <!-- Scénarios 2 avec 30% de probabilité, l'internaute charge fois la page 1 -->+        <!-- Scénarios 2 avec 30% de probabilité, l'internaute charge 10 fois la page 1 -->
         <session name="scenario2" probability="30" type="ts_http">         <session name="scenario2" probability="30" type="ts_http">
-            <for from="1" to="5" var="i">+            <for from="1" to="10" var="i">
                 <request><http url='/login/forgot_password.php' version='1.1' method='GET'></http></request>                 <request><http url='/login/forgot_password.php' version='1.1' method='GET'></http></request>
             </for>             </for>
Line 494: Line 507:
     </sessions>     </sessions>
 </tsung> </tsung>
 +
 </code> </code>
  
 +==== Rapport tsung ====
 +
 +on peux lancer un rapport sur la campagne de test tsung réalisée en lançant dans le repertoire de log correpondant la commande "/usr/lib/tsung/bin/tsung_stats.pl"
 +
 +<code>
 +[root@flow log]# cd 20140103-1439
 +[root@flow 20140103-1439]# /usr/lib/tsung/bin/tsung_stats.pl
 +creating subdirectory data 
 +creating subdirectory gnuplot_scripts 
 +creating subdirectory images 
 +warn, last interval (7) not equal to the first, use the first one (10)
 +No data for Bosh
 +No data for Match
 +No data for Async
 +No data for Errors
 +</code>
 +
 +Cela génere des graphs gnuplot et une page report.html qui resume l'ensemble, en voici un apperçu:
 +
 +{{:docpublic:systemes:moodle:tsung-moocz-2014-01-03-16h-sc5.png?200|}}
 +
 +
 +===== Tunning openvz =====
 +
 +La machine étant sous forme de VM / container openvz, des ajustements ont du etre mis en place pour repondre à la monté en charge
 +
 +une reference en français sur le sujet: 
 +  * http://www.kogitae.fr/kafe-in-net-blogopenvz-les-ressources-systeme-dans-un-ve.html
 +
 +
 +<code>
 +# vzctl set 10035 --numproc=800 --save
 +# vzctl set 10035 --tcpsndbuf=5500000 --save
 +# vzctl set 10035 --diskinodes 400000:500000 --save
 +Running: /usr/sbin/vzquota stat 10035 -f
 +Running: /usr/sbin/vzquota setlimit 10035 -i 400000 -I 500000
 +CT configuration saved to /etc/vz/conf/10035.conf 
 +UB limits were set successfully
 +CT configuration saved to /etc/vz/conf/10035.conf
 +
 +
 +# vzlist -o ctid,hostname,laverage,privvmpages,numproc,numtcpsock,tcpsndbuf,kmemsize,kmemsize.l -s laverage
 +      CTID HOSTNAME                               LAVERAGE    PRIVVMP      NPROC   NTCPSOCK    TCPSNDB   KMEMSIZE KMEMSIZE.L
 +     100041 muxt.tem-tsp.eu                  0.00/0.00/0.00     215695         86          8     139520  752963645 9223372036854775807
 +     100035 mooc.telecom-sudparis.eu         0.15/0.21/0.18     389644        105         12     404216 1171646505 9223372036854775807
 +</code>
 +
 +<code>
 +[root@mooc ~]# cat /proc/user_beancounters
 +Version: 2.5
 +       uid  resource                     held              maxheld              barrier                limit              failcnt
 +    10035:  kmemsize               1179549397           1182105600  9223372036854775807  9223372036854775807                    0
 +            lockedpages                                        0                 4096                 4096                    0
 +            privvmpages                420415              1351322              1024000              2048000                    0
 +            shmpages                      270                 1566               131072               131072                    0
 +            dummy                                              0  9223372036854775807  9223372036854775807                    0
 +            numproc                       133                  363                  800                  800                    0
 +            physpages                  666304               956320                    0  9223372036854775807                    0
 +            vmguarpages                                        0              2048000  9223372036854775807                    0
 +            oomguarpages               213170               473926              2048000  9223372036854775807                    0
 +            numtcpsock                      8                  205                  500                  500                    0
 +            numflock                        4                   34                  200                  220                    0
 +            numpty                          1                    2                   64                   64                    0
 +            numsiginfo                      0                   78                  512                  512                    0
 +            tcpsndbuf                  139520              5486448              5365760             10485760            417584502
 +            tcprcvbuf                  131072              1323600              5365760             10485760                    0
 +            othersockbuf               197280               423808              1503232              4063232                    0
 +            dgramrcvbuf                                    13080               262144               262144                    0
 +            numothersock                  243                  337                  500                  500                    0
 +            dcachesize             1164468912           1164674029  9223372036854775807  9223372036854775807                    0
 +            numfile                      1655                 2445                 8192                 8192                    0
 +            dummy                                              0  9223372036854775807  9223372036854775807                    0
 +            dummy                                              0  9223372036854775807  9223372036854775807                    0
 +            dummy                                              0  9223372036854775807  9223372036854775807                    0
 +            numiptent                      53                   53                  128                  128                    0 
 +</code> 
 +
 +===== Process Apache =====
 +
 +configuration standard du package apache pour RedHat/centos, mode Prefork conservé par defaut, 
 +
 +==== MPM Prefork vs Worker ====
 +
 +A propos de  MPM prefork vs worker il y a bien des soucis avec php qui serait parfois "non thread-safe", donc problématique sur le model worker (threaded) d'apache
 +from: http://stackoverflow.com/questions/1623914/what-is-thread-safe-or-non-thread-safe-in-php
 +
 +"Since with mod_php, PHP gets loaded right into Apache, if Apache is going to handle concurrency using its Worker MPM (that is, using Threads) then PHP must be able to operate within this same multi-threaded environment -- meaning, PHP has to be thread-safe to be able to play ball correctly with Apache!
 +
 +At this point, you should be thinking "Ok, so if I'm using a multi-threaded web server and I'm going to embed PHP right into it, then I must use the thread-safe version of PHP". And this would be correct thinking. However, as it happens, PHP's thread-safety is highly disputed. It's a use-if-you-really-really-know-what-you-are-doing ground."
 +
 +liste des extensions apache non thread-safe
 +  * http://php.net/manual/en/faq.obtaining.php#faq.obtaining.optional
 +explications détaillées
 +  * http://www.trbailey.net/tech/mpm-worker.html
 +
 +on a les librairies GD et ldap sur moodle qui sont peut-etre douteuses sur le sujet!?
 +
 +Parametres prefork positionnés
 +
 +<code>
 +<IfModule prefork.c>
 +StartServers       8
 +MinSpareServers    5
 +MaxSpareServers   20
 +ServerLimit      256
 +MaxClients       256
 +MaxRequestsPerChild  4000
 +</IfModule>
 +</code>
 +
 +<code>
 +[root@mooc ~]# apachectl -V
 +Server version: Apache/2.2.15 (Unix)
 +Server built:   Aug 13 2013 17:27:11
 +Server's Module Magic Number: 20051115:25
 +Server loaded:  APR 1.3.9, APR-Util 1.3.9
 +Compiled using: APR 1.3.9, APR-Util 1.3.9
 +Architecture:   32-bit
 +Server MPM:     Prefork
 +  threaded:     no
 +    forked:     yes (variable process count)
 +Server compiled with....
 + -D APACHE_MPM_DIR="server/mpm/prefork"
 + -D APR_HAS_SENDFILE
 + -D APR_HAS_MMAP
 + -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 + -D APR_USE_SYSVSEM_SERIALIZE
 + -D APR_USE_PTHREAD_SERIALIZE
 + -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 + -D APR_HAS_OTHER_CHILD
 + -D AP_HAVE_RELIABLE_PIPED_LOGS
 + -D DYNAMIC_MODULE_LIMIT=128
 + -D HTTPD_ROOT="/etc/httpd"
 + -D SUEXEC_BIN="/usr/sbin/suexec"
 + -D DEFAULT_PIDLOG="run/httpd.pid"
 + -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 + -D DEFAULT_LOCKFILE="logs/accept.lock"
 + -D DEFAULT_ERRORLOG="logs/error_log"
 + -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 + -D SERVER_CONFIG_FILE="conf/httpd.conf"
 +</code>
 +
 +
 +
 +Process apache par defaut   
 +
 +<code>
 + [root@mooc ~]# ps -elf | grep http | wc -l
 +22
 +</code>
 +
 +stats
 +
 +<code>
 +$ curl -s 'http://mooc.telecom-sudparis.eu/server-status?auto' 
 +Total Accesses: 119166
 +Total kBytes: 2134616
 +CPULoad: 4.27854
 +Uptime: 312481
 +ReqPerSec: .381354
 +BytesPerSec: 6995.14
 +BytesPerReq: 18342.9
 +BusyWorkers: 11
 +IdleWorkers: 9
 +Scoreboard: R_R_.__RR_WW_W._._R_....RRR.....................................................................................................................................................................................................................................
 +
 +</code>
 +
 +
 +       
docpublic/systemes/moodle/moodle_mooc.1388755919.txt.gz · Last modified: 2014/01/03 13:31 by procacci@tem-tsp.eu
[unknown link type]Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0