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

99 questions
2
votes
1 answer

Incorrect CPU thread numbering detected

I've procured an HP DL360 G7 second hand. I'm wondering if this is either a fault in the OS or the hardware. Installed are 2X Intel Xeon X5650 CPUs, each with 6 cores with threading enabled. Logic would suggest that this would give me a total of 24…
humroben
  • 23
  • 8
2
votes
0 answers

How does a server (e.g. web) manage multiple request/connections?

I read that apache has a solution to create new thread per new request, but I still have some questions. How is possible that one server can manage thousands (even a milion connection - depends from the app) at the same time? Does this depends from…
user155293
  • 121
  • 1
2
votes
2 answers

Apache stopped working permanently after error "Server ran out of threads to serve requests."

I have been working with Apache for more than 8 years, but now I'm facing a severe problem and I couldn't find a solution on internet so far. I'm running Apache 2.2.15 32bit on a Windows 2008 R2 64bit with Service Pack 1. I always used a 32bit…
Leonardo
  • 21
  • 1
  • 1
  • 4
2
votes
1 answer

httpd - Increase number of concurrent requests

I have httpd server running on Centos7. The apache details - Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.4.16 I'm trying to load test a web application by starting to hit it with 100 users & ramp up all the way to 2500. When I run the test &…
usert4jju7
  • 169
  • 2
  • 3
  • 9
2
votes
0 answers

What is a fast, efficient method for threading rsync

I have a single root directory (on a NAS) that I need to backup to another server. The hierarchy of the directory is several layers deep and a majority of the data is composed of extremely large files collections inside about a dozen directories…
Brendan Abel
  • 270
  • 1
  • 3
  • 13
2
votes
0 answers

determine if threads on a cpu are blocked? What are the causes of thread blocks?

The load-average reported by uptime command also displayed in top provides the the average run-queue length over time (1, 5 and 15 minutes) The run-queue length is the sum of the number of threads (tasks) that are currently running plus the number…
Manchego
  • 121
  • 2
2
votes
0 answers

IIS Worker Process Thread Count

I've seen this question asked but the answer given was either insufficient or unrelated. I feel like this is a pretty simple question(s). We have a Classic ASP app running on IIS7.5 on a Windows 2k8 server. When using perfmon I can see that the…
Shalom Slavin
  • 21
  • 1
  • 4
2
votes
3 answers

Mysql Replication - are per-database threads possible?

I manage a MySQL server hosting over 100 databases. We have set up standard master-slave replication, but the SQL Thread tends to break every so often, and requires manual intervention to re-start it. During this time the servers get out of…
Brent
  • 22,857
  • 19
  • 70
  • 102
2
votes
3 answers

freebsd 7.2 kern.threads.max_threads_per_proc doesn't change after reboot

I have some multithread apps on my server machine based on FreeBSD 7.2, so because of this I need to increase kern.threads.max_threads_per_proc to 4000 (default value is 1500). I changed it using "sysctl kern.threads.max_threads_per_proc=4096" and…
2
votes
0 answers

How to tell uWSGI to prefer processes to threads for load balancing

I've installed Nginx + uWSGI + Django on a VDS with 3 CPU cores. uWSGI is configured for 6 processes and 5 threads per process. Now I want to tell uWSGI to use processes for load balancing until all processes are busy, and then to use threads if…
raacer
  • 228
  • 1
  • 2
  • 12
2
votes
0 answers

Apache worker mpm, one process and many threads: understanding performance

Got a mod_perl-written serverside program. Im using shared apache worker mpm memory with one process only, and ~ 60 threads. Im using locks to temporary secure the access to the shared memory, just 0.1s out of 1.7s are locked time though. The…
2
votes
1 answer

Mysql single connection share by multiple java thread?

I have a java application with multiple thread started and they are all sharing a single db connection created in the main function. So far things have been running smoothly. I am worried will there be any problem in future like corruption etc?
user111196
  • 1,257
  • 2
  • 13
  • 14
2
votes
3 answers

Optimal number of threads for compute-intensive task on server with Hyperthreading

When running a compute-intensive task on a server with an Intel i7 quad-core processor with Hyperthreading, is it ideal to run eight threads (for the eight virtual cores), or only four (for the four physical cores)? Each thread achieves consistent…
2
votes
1 answer

PHP Threading on Gentoo

PHP on Gentoo supports the threads USE flag. As far as I know, PHP does not support true threading; I am only aware of the ability to fork using pcntl_fork(), but this functionality is provided by the pcntl USE flag. So what exactly is the point of…
Richard Keller
  • 2,040
  • 2
  • 19
  • 31
2
votes
2 answers

Does Apache ever give incorrect "out of threads" errors?

Lately our Apache web server has been giving us this error multiple times per day: [Tue Apr 06 01:07:10 2010] [error] Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting We raised our ThreadsPerChild setting…
Eli Courtwright
  • 449
  • 1
  • 5
  • 14