Questions tagged [threads]

A thread is the smallest entity of execution within a program.

Within a process, there may be one or more threads, each with the following:

  • A thread execution state (Running, Ready, etc.)
  • A saved thread context when not running; one way to view a thread is as an independent program counter operating within a process
  • An execution stack
  • Some per-thread static storage for local variables
  • Access to the memory and resources of its process, shared with all other threads in that process

Source: William Stallings, Operating Systems: INTERNALS AND DESIGN PRINCIPLES

98 questions
20
votes
7 answers

Getting a per thread cpu stats

I'm interested in the current usage of cpu - precisely cpu% and wait% - for each thread in a specific application. Is it possible to get that information from somewhere? I know that top can split information per real thread (ones with pid), but it…
viraptor
  • 1,264
  • 6
  • 21
  • 40
18
votes
1 answer

Apache 2.2 mpm_worker: more threads or more processes?

When using the Worker MPM in Apache, you can fiddle with the number of child processes and the number of server threads per child process. What are the advantages and disadvantages of each? Under what circumstances would you increase one or the…
sh-beta
  • 6,756
  • 7
  • 46
  • 65
16
votes
3 answers

How to get - number of threads per process?

This is one Ubuntu 9.10 server. Also how to see memory usage per process? Thanks
kapso
  • 1,983
  • 4
  • 14
  • 7
9
votes
4 answers

Virtualized CPU cores vs. threads

We've got a KVM host system on Ubuntu 9.10 with a newer Quad-core Xeon CPU with hyperthreading. As detailed on Intel's product page, the processor has 4 cores but 8 threads. /proc/cpuinfo and htop both list 8 processors, though each one states 4…
nedm
  • 5,610
  • 5
  • 30
  • 52
8
votes
0 answers

Multithreading with multi-queue NIC on SMP system

How are packets scheduled from network interface queues to CPUs, then onwards to threads for processing? What needs to be considered when it comes to how packets are hashed across queues, hardware interrupts vs softirqs, CPU/memory/app/thread…
svenx
  • 406
  • 3
  • 4
7
votes
2 answers

Java: Limit the number of cores a JVM can use

Multiple users are running java applications on a 60-core compute server (Linux/Ubuntu-based). There are different applications and most of them are not developed in-house. While the sysadmin thinks it is okay for a given user's Java process to use…
oggotron
  • 155
  • 2
  • 2
  • 3
7
votes
1 answer

Python Threads and uWSGI Harakiri

I have a webapp that is using an API built on nginx, uWSGI, and Django. Recently I have been seeing a lot of harakiris on a particular API call which does some quick processing and then spawns a few threads to handle some long-running functions. The…
jmetz
  • 181
  • 4
6
votes
1 answer

Enabled hyperthreading - causes qthread creation error on Ubuntu Precise 64 bit

We recently set up an HP ProLiant DL360p server for some heavy grunt-work. For one reason or another we disabled hyperthreading in the system BIOS when setting it up. Being a dual-CPU 8-core system, that gave us 16 hardware threads. 32 GB RAM. We…
davidA
  • 353
  • 2
  • 11
6
votes
2 answers

Nginx worker_processes and multi core cpu's - Do Hyper-threading cores count?

Quite often, when reading about the recommended worker_processes for nginx it is stated that this should be set to the numbers of cores the server hosting nginx has. We were wondering if we should count the number of HT cores for this as well? Or do…
anonymous-one
  • 958
  • 4
  • 26
  • 43
6
votes
1 answer

what does apache (busy workers , idle workers) means?

what is the meaning of Apache busy workers and idle workers? how the statistic of them help me to figure out performance problem with my server?
usef_ksa
  • 805
  • 4
  • 11
  • 16
5
votes
2 answers

debugging stuck apache/php thread on production server

I have a linux system with apache httpd and PHP which is loaded using LoadModule php5_module /usr/lib/apache2/modules/libphp5.so. I've enabled the mod_status module of apache and I see a particular thread which is stuck doing something since…
cherouvim
  • 744
  • 3
  • 18
  • 37
5
votes
0 answers

What is optimal IIS threading settings for a Win2012 server that does lots of slower web service calls?

We have a Windows 2012 Server that communicates to lots of other services via SOAP based web services using ASP.Net and .NET 4.5. These services tend to have higher latency (i.e. 2-6 seconds to return). We believe we have threading issues since…
Shane
  • 243
  • 3
  • 7
5
votes
0 answers

How do I reduce the threads per process limit for an ISAPI app under IIS 7.5

I have a python WSGI application running under an ISAPI extension in IIS 7.5 on Windows Server 2008. I would like to increase the number of worker processes (which I know how to do) and reduce the number of threads per process (which I don't). I'm…
solublefish
  • 168
  • 1
  • 9
5
votes
1 answer

Limit the number of max threads used by a process in linux kernel

I think I have found something that I need from the Linux kernel that is not currently implemented. I need a way to set a max thread limit per process. Is this possible?
cat pants
  • 2,139
  • 10
  • 33
  • 44
5
votes
1 answer

Increasing FreeBSD threads

For network apps that create one thread per connection (like Pound), threadcount can become a bottleneck on the number of concurrent connections you can server. I'm running FreeBSD 8 x64: $ sysctl kern.maxproc kern.maxproc: 6164 $ sysctl…
sh-beta
  • 6,756
  • 7
  • 46
  • 65
1
2 3 4 5 6 7