Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3b2643ef410b96f357b743daab5865dbc449644799560bc558ec60463bb52985
Ticket: 21280817d1c5bc6f65972a4050d51f79d2ba470c
Too many threads created on Windows for stdio channels
User & Date: apnadkarni on 2022-06-27 15:36:42
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    Originally reported by Steve Shaw (HammerDB) based on a query from Microsoft when load testing SQLServer. Running 900+ threads for TPC-C benchmarks, they were observing several times that number of threads in tclsh but not in wish.
    
    The reason turned out to be that tclsh (on Windows only) creates three *additional* threads for stdin, stdout and stderr for each Tcl thread created. This is true even if the additional threads do not actually do operations on stdio. Obviously this is wasteful in terms of system resources but also performance since each Tcl thread creation actually spawns 4 threads. wish does not have any console channels and thus does not exhibit this issue.
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "apnadkarni"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "apnadkarni"
  13. subsystem changed to: "27. Channel Types"
  14. title changed to:
    Too many threads created on Windows for stdio channels
    
  15. type changed to: "Bug"