Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

466
Visualizações
Django, DRF, nginx, Jmeter: Sample Time becomes large even though there is no load on the CPU, etc

I am using Jmeter to load test the DRF, and even though the CPU and memory are not at 100%, the throughput and response time is slow.

The Django + nginx and Postgres servers are separated, and both have the following specs 4CPU, 4GB memory.

nginx is using docker's https-portal as shown below.

version: "3"

services:
  https-portal:
    image: steveltn/https-portal:1
    ports:
      - "80:80"
      - "443:443"
    environment:
      DOMAINS: "my.domain.com -> http://backend:8000"
      STAGE: "production"
    volumes:
      - https-portal-data:/var/lib/https-portal
      - ./nginx/uwsgi_params:/etc/nginx/uwsgi_params
      - ./static:/static
    depends_on:
      - backend
    restart: always

  backend:
    build: .
    command: uwsgi --http :8000 --module myapp.wsgi --processes 4
    volumes:
      - .:/usr/src/app
      - ./static:/usr/src/app/static
    expose:
      - 8000
    env_file:
      - .env
      - .env.prod
    restart: always

volumes:
  https-portal-data:

Looking at the django logs, there doesn't seem to be anything wrong with django, what do you think could be causing this? generated 8302 bytes in 29 msecs (HTTP/1.0 200) 7 headers in 208 bytes (1 switches on core 0)

Setting up Jmeter:

enter image description here

Django + nginx server: enter image description here

DB(postgres) server: enter image description here

After 5 minutes of continuous loading. enter image description here

If there is any other information you need, please let me know.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

  1. Check your application performance via profiler tool
  2. Depending on the outcome you may also want to check Postgresql query logs and stats
  3. Don't run JMeter in GUI mode, it might be the case you're getting false negative results because JMeter cannot send requests fast enough and/or got stuck due to garbage collection
  4. Follow other JMeter Best Practices and make sure that JMeter doesn't lack CPU, RAM, etc.
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda