Upgrade the number of lms workers from 2 to 8

Hello everyone

I’m trying to upgrade the number of lms workers from 2 to 8
but I think nothing has changed

because when I type tutor local status
I only see this

(tutor_local_lms- celery worker Up 8000/tcp
worker_1
)
I think the memory usage is also same

How can I make sure that the number of lms workers really changed
I have used this command

tutor config save \
  --set OPENEDX_LMS_UWSGI_WORKERS=8 \
  --set OPENEDX_CMS_UWSGI_WORKERS=4
tutor local restart lms cms

Just to clarify: the number of LMS workers defined by OPENEDX_LMS_UWSGI_WORKERS is actually the number of processes launched by uwsgi for the web server: uWSGI Options — uWSGI 2.0 documentation
You can check how many processes are running for each uwsgi server by running:

$ ps aux | grep processes

On my machine, with the default configuration, I get --processes=2:

regis      64201  0.0  0.0   2616   484 ?        Ss   08:35   0:00 /bin/sh -c uwsgi     --static-map /static=/openedx/staticfiles/     --static-map /media=/openedx/media/     --http 0.0.0.0:8000     --thunder-lock     --single-interpreter     --enable-threads     --processes=${UWSGI_WORKERS:-2}     --buffer-size=8192     --wsgi-file $SERVICE_VARIANT/wsgi.py
regis      64259  2.7  1.1 1157876 244612 ?      Sl   08:35   0:06 uwsgi --static-map /static=/openedx/staticfiles/ --static-map /media=/openedx/media/ --http 0.0.0.0:8000 --thunder-lock --single-interpreter --enable-threads --processes=2 --buffer-size=8192 --wsgi-file lms/wsgi.py
regis      64275  0.0  0.0  54388  9064 ?        S    08:35   0:00 uwsgi --static-map /static=/openedx/staticfiles/ --static-map /media=/openedx/media/ --http 0.0.0.0:8000 --thunder-lock --single-interpreter --enable-threads --processes=2 --buffer-size=8192 --wsgi-file lms/wsgi.py
regis      65433  0.0  1.1 1157876 227200 ?      S    08:35   0:00 uwsgi --static-map /static=/openedx/staticfiles/ --static-map /media=/openedx/media/ --http 0.0.0.0:8000 --thunder-lock --single-interpreter --enable-threads --processes=2 --buffer-size=8192 --wsgi-file lms/wsgi.py
regis      70562  0.0  0.0   9048  1716 pts/1    S+   08:39   0:00 grep --color=auto processes

Thank you very much for your answer
I also got the same result .

Does that mean that the upgrade did not work if so how can I fix it?

Thanks

It is impossible to help you if you do not post the output of your commands.

Run:

tutor config save \
  --set OPENEDX_LMS_UWSGI_WORKERS=8 \
  --set OPENEDX_CMS_UWSGI_WORKERS=4

Then:

tutor local start -d lms cms

And post here the output of:

ps aux | grep processes

Thanks

Here is what I have got.

What’s your version of tutor? tutor --version

tutor, version 13.3.0

Please next time you open a topic do mention the version of Tutor that you are running if your are not using the latest one.

I see that your uwsgi workers are running since January 13th, which means that they were not restarted after I posted my last answer. Make a hard reboot:

tutor config save \
  --set OPENEDX_LMS_UWSGI_WORKERS=8 \
  --set OPENEDX_CMS_UWSGI_WORKERS=4
tutor local stop
tutor local start -d

Then check the number of workers again:

ps aux | grep processes

Thanks
but i think I have got the same result

I think it may be related to a permission error
because when I type it using
sudo tutor config save
–set OPENEDX_LMS_UWSGI_WORKERS=8
–set OPENEDX_CMS_UWSGI_WORKERS=4
it does not show up any error
but when I type it without sudo
I get this

///
I have installed tutor in
/home/ubuntu not root

Are you seriously running Tutor with sudo despite the warnings that are printed to stdout?

:warning: You are running Tutor as root. This is strongly not recommended. If you are doing this in order to access the Docker daemon, you should instead add your user to the ‘docker’ group. (see Linux post-installation steps for Docker Engine | Docker Docs)

Running some tutor commands with sudo and others without will yield VERY different results. That’s because the project root will be different in both cases. On my computer, I have:

$ sudo tutor config printroot
/root/.local/share/tutor
$ tutor config printroot
/home/regis/.local/share/tutor

Notice how the two results are different. DO NOT RUN TUTOR AS ROOT.

When you ask for help please do the following:

  • Indicate the version of Tutor that you are running.
  • Copy-paste the full command and output (no screenshots)
  • Be very explicit about any the particularities of your environment

Now you will have to fix your environment. I recommend resetting the file ownership:

sudo chown -R ubuntu:ubuntu /home/ubuntu/.local/share/tutor/env

Thanks

The number of processes are now changed to 8
is it done now?
if so
Could you please tell me How many concurrent users are per 1worker?
and how much memory does each worker need?

(Assuming most of the users are using mobile app and do basic stuffs like watching videos that are stored on another s3 like cloud …)

        Ss   14:49   0:00 /bin/sh -c uwsgi     --static-map /static=/openedx/staticfiles/     --static-map /media=/openedx/media/     --http 0.0.0.0:8000     --thunder-lock     --single-interpreter     --enable-threads     --processes=${UWSGI_WORKERS:-2}     --buffer-size=8192     --wsgi-file $SERVICE_VARIANT/wsgi.py
ubuntu   1261165 13.6  2.0 1216480 306296 ?      Sl   14:49   0:08 uwsgi --static-map /static=/openedx/staticfiles/ --static-map /media=/openedx/media/ --http 0.0.0.0:8000 --thunder-lock --single-interpreter --enable-threads --processes=8 --buffer-size=8192 --wsgi-file lms/wsgi.py

....
...
...

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.