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
1
vote
3 answers

mysql thread count

We have a web application that uses apache and mysql. Generally (according to Munin) our MySQL thread count sits between 2 and 4 at all times. The other day, our server almost came to a halt. HTTP requests were slow or wouldn't go through at all,…
Safado
  • 4,786
  • 7
  • 37
  • 54
1
vote
1 answer

is Apache MPM prefork ALWAYS single threaded?

My impression is yes that it is and that this is why mod_php shops run it (usually for non-thread safe apps). On my ubuntu box, if I run sudo ps axo pid,ppid,rss,vsz,nlwp,cmd I get this: 32305 1 9820 183732 1 /usr/sbin/apache2 -k…
timpone
  • 255
  • 4
  • 11
1
vote
1 answer

IBM Websphere Application Server 7 - Why aren't threads that are hung destroyed?

If our application somehow loses connection with the memcached server all the threads are reported as hung after 10 minues or so [28.04.11 16:50:15:831 CEST] 00000025 ThreadMonitor W WSVR0605W: Thread "WebContainer : 4" (00000029) has been active…
Tommy
  • 195
  • 1
  • 2
  • 9
1
vote
0 answers

tomcat max number of threads

I have a very confusing scenario.. We are using tomcat6 to host an internal application. In server.xml file maxthreads attributes is set to 150 but if I log on to the manager, in "http-8080" section I see max threads = 40. So it saying that the…
rrkwells
  • 11
  • 3
1
vote
1 answer

Is linux kernel 2.6.37 80% slower than 2.6.34 using memory & threads?

If I run the command time perl -e 'use threads; $T=12 ; foreach (1..$T) { $thr[$i++] = threads->create(sub { printf "I am thread %s\n", threads->tid(); foreach (1..9e6) { push(@a, sqrt(1234)/sin(1234)*cos(1234)) } ; printf "thread %s finished.\n",…
rems
  • 2,260
  • 13
  • 11
1
vote
1 answer

Changing memory allocation policy on Linux

How can I change memory allocation policy on Linux? On Solaris it's done system-wide with lgrp_mem_default_policy (man page) and pmadvise (man page) is a per process equivalent that does not require root.
Aleksandr Levchuk
  • 2,465
  • 3
  • 22
  • 41
1
vote
2 answers

How to make the most of JBOSS in multicore environments

I'm deploying jboss in a multicore system, where I'll have from 12 to 20 cores, and when I run the jboss server, I only see 1 process running, and I feel like it won't use more than one core... Is there any way of using more cores or jboss is smart…
Andor
  • 591
  • 5
  • 16
1
vote
1 answer

Apache2 worker mpm too many processes

I've got Apache installed with the worker mpm which seems to have too many processes active in spite of the configurations in place. I'll detail the configs below : StartServers 2 MinSpareThreads 10 MaxSpareThreads 25 ThreadsPerChild 25 MaxClients…
jonathanserafini
  • 1,768
  • 14
  • 20
1
vote
1 answer

Interpreting OOM killer logs when triggered on a Java thread

When Linux OOM Killer interrupts a process, the kernel logs usually provide enough information about the culprit's memory consumption (even it is not killed eventually). For example, when snmpd process becomes an OOM trigger, its memory state can be…
Toparvion
  • 113
  • 3
1
vote
1 answer

NUMBER_OF_PROCESSORS env var incorrect on Dell PowerEdge Gen14 With Windows Server 2012 R2

I'm seeing that the environment variable NUMBER_OF_PROCESSORS is incorrect on my newly installed Dell PowerEdge 740xd Gen 14 running Windows Server 2012 R2 Standard. The machine contains 2 CPUs - Intel Platinum Xeon 8173M. Each CPU contains 28…
1
vote
1 answer

IIS Number of threads worker process for ASP.NET application

TL;DR; Give the worker process more threads! Background We have an ASP.NET application that expose a Web API where one of the "endpoints/methods" makes a set of queries to external system (SQL, AD etc.) and takes approx. 4 seconds. The IO calls are…
Masus
  • 11
  • 1
  • 1
  • 2
0
votes
0 answers

mariadb main thread over 100% cpu and flushing logs

I have 5.5.60-MariaDB and noticed the main thread remains on sleep mode for the last 200hrs. After checking innodb status I see the below line for this thread. Main thread process no. 119014, id 140084875732736, state: flushing log pid 119014 is the…
0
votes
1 answer

How do I get a thread dump of my Wildfly process on Amazon Linux?

We're using Wildfly 11 with JDK 8 on Amazon Linux. How do I get a thread dump of our Wildfly process? We're trying to troubleshoot why we're seeing high CPU utilization for that process. We do NOT have jstack installed so I thought I could use…
Dave
  • 185
  • 1
  • 7
  • 20
0
votes
1 answer

php threads (not processes) keep mounting up until server crashes

I've been struggling with the following problem for a while now and would very much appreciate your help. My webserver completely crashes on a regular basis due to too many php threads. The number of php processes is stable within a normal range…
Steve
  • 1
  • 1
0
votes
0 answers

Strange thread in Centos Server

There is a strange thread called sourplum running in my CentOS server. It uses a lot of resources and affects the excel and pdf generation. Tasks: 280 total, 2 running, 277 sleeping, 0 stopped, 1 zombie Cpu(s): 51.6%us, 1.0%sy, 0.0%ni,…
Tester
  • 177
  • 1
  • 1
  • 7