๐Ÿ“—
smiley book
  • Smiley Books
  • AI
    • Readme
    • openai-whisper
      • ์ƒ˜ํ”Œ ์‹คํ–‰ํ•ด๋ณด๊ธฐ
      • GPU ์„œ๋ฒ„ ์ค€๋น„ํ•˜๊ธฐ
      • API๋กœ whisper๋ฅผ ์™ธ๋ถ€์— ์˜คํ”ˆํ•˜๊ธฐ
      • ํ”„๋กฌํ”„ํŠธ ์ง€์›
      • ์‹ค์‹œ๊ฐ„ message chat
      • ํ™”๋ฉด ์ด์˜๊ฒŒ ๋งŒ๋“ค๊ธฐ์™€ ๋กœ๊ทธ์ธ
      • ํŒŒ์ด์ฌ ๊ฐ€์ƒํ™˜๊ฒฝ
      • ์‹ค์‹œ๊ฐ„ voice chat
      • fine tunning(๋ฏธ์„ธ ์กฐ์ •) ์œผ๋กœ ์„ฑ๋Šฅ ์˜ฌ๋ฆฌ๊ธฐ
      • app์—์„œ api๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ์‹ค์‹œ๊ฐ„์œผ๋กœ ํ…์ŠคํŠธ๋กœ ๋ฐ”๊ฟ”๋ณด๊ธฐ
    • ollama - llm์„ ์‰ฝ๊ฒŒ ๋‚ด์ปด์—์„œ ์‹คํ–‰
      • ollama webui
      • ollama docker
    • stable diffusion
      • SDXL - text to image
      • SD-webui
    • ChatGPT
      • ๋‹ต๋ณ€์ด ๋Š๊ธธ๋•Œ
      • ์—ญํ• ์„ ์ •ํ•˜์ž
      • ๊ตฌ์ฒด์ ์ธ ์งˆ๋ฌธ
      • ๊ฒฐ๊ณผํ˜•ํƒœ๋ฅผ ์ง€์ •
      • ํ”„๋กฌํ”„ํŠธ๋ฅผ ์—ฌ๋Ÿฌ์ค„๋กœ ์‚ฌ์šฉํ•˜์ž.
      • ๋งˆํ‹ด ํŒŒ์šธ๋Ÿฌ ๊ธ€ ๋ฒˆ์—ญ๋ณธ
    • Prompt Engineering
    • Auto-GPT
    • Gemini
      • google ai studio
      • gemini-api
      • embedding guide
    • Huggingface
      • huggingface ์‚ฌ์šฉ๋ฒ•
      • huggingface nlp ๊ณต๋ถ€์ค‘
    • kaggle
      • download dataset
    • langchain
      • langchain์„ ๊ณต๋ถ€ํ•˜๋ฉฐ ์ •๋ฆฌ
      • basic
      • slackbot
      • rag
      • document-loader
      • website-loader
      • confluence
      • memory
      • function-call
      • langsmith
      • agent-toolkit
  • Ansible
    • templates vs files and jinja2
    • dynamic inventory
    • limit ์˜ต์…˜ ๊ฐ•์ œํ•˜๊ธฐ
    • limit ์‚ฌ์šฉํ›„ gather_fact ๋ฌธ์ œ
  • AWS
    • AWS CLI
    • EKS
      • cluster manage
      • ALB Controller
      • external-dns
      • fargate
    • ECR
    • S3
    • Certificate Manager
  • Azure
    • Azure AD OAuth Client Flow
  • Container
    • Registry
    • ๋นŒ๋“œ์‹œ์— env๊ฐ’ ์„ค์ •ํ•˜๊ธฐ
  • DB
    • PXC
      • Operator
      • PMM
      • ์‚ญ์ œ
      • GTID
      • Cross Site Replication
    • Mssql
    • Mysql
  • dotnet
    • Thread Pool
    • Connection Pool
    • Thread Pool2
  • Devops
    • Recommendation
  • GIT
    • Basic
    • Submodule
  • GitHub
    • Repository
    • GitHub Action
    • GitHub PR
    • Self Hosted Runner
    • GitHub Webhook
  • GitLab
    • CI/CD
    • CI/CD Advance
    • Ssl renew
    • CI/CD Pass env to other job
  • Go Lang
    • ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ๊ตฌ์ถ•
    • multi os binary build
    • kubectl๊ฐ™์€ cli๋งŒ๋“ค๊ธฐ
    • azure ad cli
    • embed static file
    • go study
      • pointer
      • module and package
      • string
      • struct
      • goroutine
  • Kubernetes
    • Kubernetes๋Š” ๋ฌด์—‡์ธ๊ฐ€
    • Tools
    • Install with kubespray
    • Kubernetes hardening guidance
    • 11 ways not to get hacked
    • ArgoCD
      • Install
      • CLI
      • Repository
      • Apps
      • AWS ALB ์‚ฌ์šฉ
      • Notification slack
      • Backup / DR
      • Ingress
      • 2021-11-16 Github error
      • Server Config
      • auth0 ์ธ์ฆ ์ถ”๊ฐ€(oauth,OIDC)
    • Extension
      • Longhorn pvc
      • External dns
      • Ingress nginx
      • Cert Manager
      • Kube prometheus
    • Helm
      • Subchart
      • Tip
    • Loki
    • Persistent Volume
    • TIP
      • Job
      • Pod
      • Log
  • KAFKA
    • raft
  • KVM
    • kvm cpu model
  • Linux
    • DNS Bind9
      • Cert-Manager
      • Certbot
      • Dynamic Update
      • Log
    • Export and variable
    • Grep ์‚ฌ์šฉ๋ฒ•
  • Modeling
    • C4 model introduce
    • Mermaid
    • reference
  • Monitoring
    • Readme
    • 0. What is Monitoring
    • 1. install prometheus and grafana
    • 2. grafana provisioning
    • 3. grafana dashboard
    • 4. grafana portable dashboard
    • 5. prometheus ui
    • 6. prometheus oauth2
    • Prometheus
      • Metric type
      • basic
      • rate vs irate
      • k8s-prometheus
    • Grafana
      • Expolorer
    • Node Exporter
      • advance
      • textfile collector
  • Motivation
    • 3 Simple Rule
  • OPENNEBULA
    • Install(ansible)
    • Install
    • Tip
    • Windows vm
  • Reading
    • comfort zone
    • ๋ฐฐ๋ ค
    • elon musk 6 rule for insane productivity
    • Feynman Technique
    • how to interview - elon musk
    • ๊ฒฝ์ฒญ
    • Readme
  • Redis
    • Install
    • Master-slave Architecture
    • Sentinel
    • Redis Cluster
    • Client programming c#
  • SEO
    • Readme
  • Security
    • criminalip.io
      • criminalip.io
  • Stock
    • robinhood-python
  • Terraform
    • moved block
    • output
  • vault
    • Readme
  • VS Code
    • dev container
    • dev container on remote server
  • Old fashione trend
    • curity
    • MAAS
      • Install maas
      • Manage maas
      • Tip
Powered by GitBook
On this page
  • Source code
  • Thread
  • Thread Pool
  • webapi
  • dotnet-counters
  • locust.io
  • container
  • ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ
  • ๋‹ค์‹œ ๊ณ ๋ฏผ
  • entity framework

Was this helpful?

  1. dotnet

Thread Pool

PreviousMysqlNextConnection Pool

Last updated 1 year ago

Was this helpful?

Source code

Thread

Thread๋Š” ํ•˜๋‚˜์˜ ํ”„๋กœ์„ธ์Šค์—์„œ ์‹คํ–‰๋˜๋Š” ์ž‘์—…์˜ ๋‹จ์œ„์ด๋‹ค. Thread๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์—ฌ๋Ÿฌ ์ž‘์—…์„ ๋™์‹œ์— ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค. Thread๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์—ฌ๋Ÿฌ ์ž‘์—…์„ ๋™์‹œ์— ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์ง€๋งŒ, Thread๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์€ ๋น„์šฉ์ด ๋งŽ์ด ๋“ ๋‹ค. ๊ทธ๋ž˜์„œ .NET์—์„œ๋Š” Thread Pool์„ ์ œ๊ณตํ•œ๋‹ค.

Thread Pool

Thread Pool์€ Thread๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•œ๋‹ค. Thread Pool์„ ์‚ฌ์šฉํ•˜๋ฉด Thread๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ๊ด€๋ฆฌํ•˜๋Š” ๋น„์šฉ์„ ์ค„์ผ ์ˆ˜ ์žˆ๋‹ค. Thread Pool์€ Thread๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์„ ์ž๋™์œผ๋กœ ์ฒ˜๋ฆฌํ•œ๋‹ค. Thread Pool์„ ์‚ฌ์šฉํ•˜๋ฉด Thread๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์„ ์ž๋™์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๊ธฐ ๋•Œ๋ฌธ์— Thread๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ๋ณด๋‹ค ๋” ์ ์€ ๋น„์šฉ์œผ๋กœ Thread๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

webapi

ํ”„๋กœ์ ํŠธ๋งˆ๋‹ค ๋‹ค๋ฅด๊ฒŸ์ง€๋งŒ dotnet์œผ๋กœ webapi๋ฅผ ์‚ฌ์šฉ์‹œ kestrel์ด๋ผ๋Š” ์›น์„œ๋ฒ„๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. kestrel์€ ๊ธฐ๋ณธ์ ์œผ๋กœ thread pool์„ ์‚ฌ์šฉํ•œ๋‹ค. ํ™•์ธํ•ด๋ณด์ž.

cd ~/Desktop
dotnet new webapi --name ThreadTest

cd ThreadTest

vi controllers/ValuesController.cs
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;

namespace ThreadTest.Controllers;

[ApiController]
[Route("values")]
public class ValuesController : ControllerBase
{
    private readonly ILogger<ValuesController> _logger;
    public ValuesController(ILogger<ValuesController> logger)
    {
        _logger = logger;
    }

    [HttpGet(Name = "GetValues")]
    public int Get()
    {
        Console.WriteLine($"The number of processors on this computer is {Environment.ProcessorCount}.");

        var maxWorkerThreads = 0;
        var maxCompletionPortThreads = 0;

        ThreadPool.GetMaxThreads(out maxWorkerThreads, out maxCompletionPortThreads);
        Console.WriteLine("Maximum worker threads: {0}", maxWorkerThreads);

        var availableWorkerThreads = 0;
        var completionPortThreads = 0;

        ThreadPool.GetAvailableThreads(out availableWorkerThreads, out completionPortThreads);
        Console.WriteLine($"Available Worker threads: {availableWorkerThreads}", availableWorkerThreads);

        var usedWorkerThread = maxWorkerThreads - availableWorkerThreads;
        Console.WriteLine($"Used worker threads: {usedWorkerThread}");

        Thread.Sleep(10000); // Sleep for 10 seconds

        return usedWorkerThread;
    }
}

์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ๋งŒ๋“ค๊ณ  ์‹คํ–‰ํ•ด๋ณด์ž.

dotnet run

curl http://localhost:5007/values
  • ํ˜„์žฌ ์ปดํ“จํ„ฐ๋Š” 6์ฝ”์–ด 12์Šค๋ ˆ๋“œ์ด๋‹ค. 12๊ฐœ์˜ cpu๋ฅผ ํ™•์ธํ• ์ˆ˜ ์žˆ๋‹ค.

  • ์ตœ๋Œ€ worker thread๋Š” 32767๊ฐœ์ด๋‹ค.

  • ์‚ฌ์šฉ๋œ worker thread๋Š” 2๊ฐœ์ด๋‹ค. (1๋ฒˆ์˜ ํ˜ธ์ถœ์„ ํ…Œ์ŠคํŠธํ•ด๋ณด์•˜๋‹ค.) 1๊ฐœ๋Š” ๊ธฐ๋ณธ์“ฐ๋ ˆ๋“œ์ธ๊ฐ€? ํ˜ธ์ถœ ํ•œ๋ฒˆ์— 2๋ฒˆ์งธ ์Šค๋ ˆ๋“œ๊ฐ€ ์ƒ์„ฑ์ด ๋˜์—ˆ๋‹ค.

  • ์‚ฌ์šฉ๊ฐ€๋Šฅํ•œ worker thread๋Š” 32765๊ฐœ์ด๋‹ค.

The number of processors on this computer is 12.
Maximum worker threads: 32767
Available Worker threads: 32765
Used worker threads: 2

ํ…Œ์ŠคํŠธ๋ฅผ ๊ณ„์†ํ•ด๋ณด๋ฉด usedWorkerThread๊ฐ€ ๊ณ„์† ๋Š˜์–ด๋‚˜๋Š”๊ฒƒ์„ ์•Œ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์‹œ๊ฐ„์ด ๋˜๊ณ  ๋‚˜๋ฉด usedWorkerThread๊ฐ€ ์ค„์–ด๋“œ๋Š”๊ฒƒ์„ ํ™•์ธํ• ์ˆ˜ ์žˆ๋‹ค.

์“ฐ๋ ˆ๋“œ๊ฐ€ ์ฆ๊ฐ€ํ–‡๋‹ค๊ฐ€ ๋ฆฌํ„ด๋˜๋Š”๊ฒƒ์„ ๋ณผ์ˆ˜ ์žˆ๋‹ค.

32000๊ฐœ์˜ ์“ฐ๋ ˆ๋“œ๊ฐ€ ํ’€์—๋Š” ๋งŒ๋“ค์–ด์ ธ์žˆ๋Š”๊ฑฐ๊ฐ™๋‹ค. ๊ทธ๋Ÿฌ๋ฉด 32000๊ฐœ๋ฅผ ๋ฏธ๋ฆฌ ๋‹ค ๋งŒ๋“ค์–ด๋‘๋Š”๊ฒƒ์ธ๊ฐ€? ์•„๋‹ˆ๋ฉด ํ•„์š”ํ• ๋•Œ๋งˆ๋‹ค ๋งŒ๋“œ๋Š”๊ฒƒ์ธ๊ฐ€? ์ด๊ฒƒ์„ ํ™•์ธํ•ด๋ณด์ž.

dotnet-counters

dotnet tool install --global dotnet-counters

dotnet-counters monitor -n ThreadTest # ํ”„๋กœ์„ธ์Šค ์ด๋ฆ„

์š”์ฒญ์„ ๋ณด๋‚ด๋ฉด ์˜ฌ๋ผ๊ฐ€๋Š” ์“ฐ๋ ˆ๋“œ๋ฅผ ํ™•์ธํ• ์ˆ˜ ์žˆ๋‹ค.

์š”์ฒญ์„ ๊ณ„์† ๋งŒ๋“ค์–ด๋ณด๋ฉด์„œ que์— ๋“ค์–ด๊ฐ€๋Š”์ง€ ํ™•์ธํ•ด๋ณด์ž.

locust.io

๋งŽ์€ ์š”์ฒญ์„ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด์„œ ์ด๊ฑธ ์‚ฌ์šฉํ•œ๋‹ค.

pip install locust
mkdir locust
cd locust

cat > locust.py <<EOF
import time
from locust import HttpUser, between, task

class WebsiteUser(HttpUser):
  wait_time = between(1, 2)

  def on_start(self):
    self.client.verify = False

  @task
  def launch(self):
      self.client.get(url="/values")
EOF
locust -f locust.py  --host http://localhost:5007 --users 1000 --spawn-rate 200

์‹คํ–‰์„ ํ•ด๋ณด๋ฉด ๊ฒฐ๊ณผ๋ฅผ ๋ณผ์ˆ˜ ์žˆ๋‹ค.

๊ฒฐ๊ณผ๊ฐ€ ์ž˜ ํ™•์ธ๋จ์„ ์•Œ์ˆ˜ ์žˆ๋‹ค.

container

์‹ค์ œ ์„œ๋น„์Šคํ™˜๊ฒฝ์—์„œ๋Š” ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. ์ด์ œ ์ง€๊ธˆ๊นŒ์ง€ ํ”„๋กœ๊ทธ๋žจ์„ ์ปจํ…Œ์ด๋„ˆ๋กœ ๋งŒ๋“ค๊ณ  ํ™œ์šฉํ•ด๋ณด์ž.

vi Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build-env
WORKDIR /app
COPY . .
RUN dotnet publish "ThreadTest.csproj" -c Release -o /app/publish

# Install dotnet debug tools
RUN dotnet tool install --tool-path /tools dotnet-trace \
  && dotnet tool install --tool-path /tools dotnet-counters \
  && dotnet tool install --tool-path /tools dotnet-dump \
  && dotnet tool install --tool-path /tools dotnet-gcdump

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine

# Copy dotnet-tools
WORKDIR /tools
COPY --from=build-env /tools .

RUN apk add icu-libs

ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false

WORKDIR /app

COPY --from=build-env /app/publish .
EXPOSE 80
ENTRYPOINT ["dotnet", "ThreadTest.dll"]
vi docker-compose.yaml
version: '3'
services:
  web:
    build:
      context: .
    ports:
      - 80:80
    deploy:
      resources:
        limits:
          cpus: '1'
        reservations:
          cpus: '1'

cpu๋ฅผ 1๊ฐœ๋งŒ ํ• ๋‹น์„ ํ•˜์˜€๋‹ค. ์ด์ œ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰ํ•ด๋ณด์ž.

docker-compose up --build
docker ps -a

์ด์ œ locust๋ฅผ ์‹คํ–‰ํ•ด๋ณด์ž. ๊ทธ๋ฆฌ๊ณ  ๋กœ๊ทธ๋ฅผ ๋ด๋ณด์ž.

docker logs -f threadtest-web-1

๊ทธ๋ฆฌ๊ณ  ๋ชจ๋‹ˆํ„ฐ๋ง๋„ ํ•ด๋ณด์ž.

docker exec -it threadtest-web-1 /tools/dotnet-counters monitor --process-id 1

์ž˜ ๋ณด์ธ๋‹ค.

ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ

cpu๋ฅผ 1๊ฐœ๋งŒ ํ• ๋‹นํ•˜๊ณ  ๊ทธ๋ฆฌ๊ณ  12๊ฐœ๋ฅผ ํ• ๋‹นํ•˜๊ณ  ํ…Œ์ŠคํŠธํ•ด๋ณด๋‹ˆ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

cpu
maxWorkerThread
usedWorkerThread
AvailableWorkerThread

1

32767

1

32766

12

32767

2

32765

cpu ๊ฐฏ์ˆ˜์™€ ์ƒ๊ด€์ด ์—†์ด Thread๋Š” 32767๊ฐœ๋กœ ๊ณ ์ •๋˜์–ด์žˆ๋Š”๊ฒƒ์„ ํ™•์ธํ• ์ˆ˜ ์žˆ๋‹ค.

์“ฐ๋ ˆ๋“œ์— ๊ธฐ๋ณธ ๊ฐฏ์ˆ˜๊ฐ€ ์žˆ๊ณ  ๊ทธ๊ฒŒ ๋„˜์–ด๊ฐ€๋ฉด ์ž๋™์œผ๋กœ ์ƒ์„ฑ์„ ํ•˜๋Š”๊ฒƒ์œผ๋กœ ์•Œ๊ณ  ์žˆ๋‹ค. ๊ทธ๋Ÿผ ๊ธฐ๋ณธ๊ฐ’์ด ๋‹ค๋ฅธ๊ฒƒ์ผ๊ฐ€?

์ฝ”๋“œ์— ๋‹ค์Œ์„ ์ถ”๊ฐ€ํ•˜๊ณ  ์‹คํ–‰ํ•ด๋ณด์ž.

var usedWorkerThread = maxWorkerThreads - availableWorkerThreads;
Console.WriteLine($"Used worker threads: {usedWorkerThread}");

# ์ด๊ฑฐ ์ถ”๊ฐ€
int minWorker, minIOC;
// Get the current settings.
ThreadPool.GetMinThreads(out minWorker, out minIOC);
Console.WriteLine("Minimum worker threads: {0}", minWorker);

Thread.Sleep(1000000); // Sleep for 10 seconds
Console.WriteLine("Thread completed. go back to the pool.");
return usedWorkerThread;

minWorker๋ฅผ ํ™•์ธํ•ด๋ณด์ž.

cpu
minWorker

1

1

12

12

minWorker๋Š” cpu ๊ฐฏ์ˆ˜์™€ ๊ฐ™์€๊ฒƒ์„ ํ™•์ธํ• ์ˆ˜ ์žˆ๋‹ค.

cpu๋ฅผ 1๊ฐœ๋กœ ํ•˜๊ณ  minworker๋ฅผ 1000๊ฐœ๋กœ ํ•ด๋ณผ๊ฐ€?

vi ThreadTest.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <ThreadPoolMinThreads>1000</ThreadPoolMinThreads> <!-- ์ด๊ฑฐ ์ถ”๊ฐ€ -->
  </PropertyGroup>
</Project>

๋‹ค์‹œ ์‹คํ–‰ํ•ด๋ณด์ž.

๊ธฐ๋ณธ์ ์œผ๋กœ 1000๊ฐœ์˜ ์“ฐ๋ ˆ๋“œ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์œผ๋ฏ€๋กœ usedWorkerThread๊ฐ€ 1000๊ฐœ๋กœ ๋‚˜์˜จ๋‹ค.

๋ฆฌํ€˜์ŠคํŠธ๊ฐ€ ์ƒ๊น€์œผ๋กœ์จ ์“ฐ๋ ˆ๋“œ๊ฐ€ ๋Š˜์–ด๋‚˜๋Š”๊ฒƒ์„ ํ™•์ธํ• ์ˆ˜ ์—†๋‹ค. 1000์ด ๋„˜์œผ๋ฉด ์ฆ๊ฐ€๋ฅผ ํ• ๊ฑฐ ๊ฐ™๋‹ค.

1000์ด ๋„˜์–ด๊ฐ€๋ฉด ํ์— ๋“ค์–ด๊ฐ€๊ณ  ํ•˜๋‚˜์”ฉ ์ƒ์„ฑ์ด ๋จ์„ ์•Œ์ˆ˜ ์žˆ๋‹ค.

๋‹ค์‹œ ๊ณ ๋ฏผ

์นœ๊ตฌ์˜ ๋ฌธ์ œ๋Š” ์“ฐ๋ ˆ๋“œ๊ฐ€ ์ƒ๊ธฐ๋Š”๊ฒŒ ์˜ค๋ž˜ ๊ฑธ๋ฆฐ๋‹ค๋Š”๊ฒƒ์ด๋‹ค. ๊ทธ๋ž˜์„œ ์“ฐ๋ ˆ๋“œ๋ฅผ ๋ฏธ๋ฆฌ ๋งŒ๋“ค์–ด๋‘๋Š”๊ฒƒ์ด ์ข‹์„๊ฑฐ ๊ฐ™๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์•„๋ฌด๋ฆฌ ํ…Œ์ŠคํŠธ๋ฅผ ํ•ด๋ด๋„ ๊ฐ„๋‹จํ•œ ์ž‘์—…์€ Thread๊ฐ€ ๋งŒ๋“ค์–ด์ง€๋Š”๊ฒƒ์ด ์ฒ˜์Œ 10๊ฐœ์™€ 1000๊ฐœ์˜ ์ฐจ์ด๊ฐ€ ์—†๋‹ค. ์•„๋ฌด๋ž˜๋„ ์“ฐ๋ ˆ๋“œ์˜ ์ƒ์„ฑ์ด ๋ฌธ์ œ๋Š” ์•„๋‹Œ๊ฑฐ ๊ฐ™๋‹ค. ๊ทธ๋Ÿผ ๋‹ค๋ฅธ๊ฒƒ์„ ์ฐพ์•„๋ด์•ผ๊ฒ ๋‹ค.

entity framework

entity framework๋ฅผ ์‚ฌ์šฉ์‹œ์— ์ปค๋„ฅ์…˜ pool์ด ๋ฌธ์ œ๋ฅผ ์ผ์œผํ‚ค๋Š”๊ฑด ์•„๋‹๊ฐ€?

๋‹ค์Œ ๊ธ€์—์„œ ํ™•์ธํ•ด๋ณด์ž.

https://github.com/teamsmiley/gitbook-sample/tree/main/ThreadTest
https://locust.io/
http://localhost:8089
alt text
alt text
alt text
alt text
alt text
alt text
alt text
alt text