Print

Print


@vepadulano : thanks for reporting the outcome of your tests! could you just tell me which version of `xrdcp` you were using?

To shed some light on your results:

- `XRD_PARALLELEVTLOOP` is by default set to 1, and is the number of event-loop threads handling the async I/O; in some cases e.g. if the xrootd client is interacting with many servers (as it does in case of XCache) a single event loop can become CPU bound and in those scenarios it makes sense to use multiple event-loops

- `XRD_WORKERTHREADS` is by default set to 3, and is the number of threads in the thread-pool used to call user completion handlers

> The two variables seem to be independently adding threads to the xrdcp process when they are increased.
Your observation is correct, those two variable are responsible for totally independent pool of threads.

- there is also the `TaskManager` thread, which runs various timers, amongst others responsible for the request timeouts

- in case of `xrdcp` there is also the main execution thread

To summarise, in case of `xrdcp` if one sets `XRD_PARALLELEVTLOOP=1` and `XRD_WORKERTHREADS=1` there should be 4 threads, which is what I observe in my `xrdcp` process:

```
(gdb) info threads
  Id   Target Id         Frame 
  4    Thread 0x7ffff1224700 (LWP 17480) "xrdcp" 0x00007ffff644bb3b in do_futex_wait.constprop.1 () from /lib64/libpthread.so.0
  3    Thread 0x7ffff1a25700 (LWP 17479) "xrdcp" 0x00007ffff69368ed in nanosleep () from /lib64/libc.so.6
  2    Thread 0x7ffff2226700 (LWP 17478) "xrdcp" 0x00007ffff696ffd3 in epoll_wait () from /lib64/libc.so.6
* 1    Thread 0x7ffff7fb3900 (LWP 17465) "xrdcp" XrdCl::ClassicCopyJob::Run (this=0x66e960, progress=0x7fffffffca50) at /home/simonm/git/xrootd/src/XrdCl/XrdClClassicCopyJob.cc:2400
```

```
[simonm@idefix ~]$ ps -elf | grep xrdcp
0 S simonm   17453  1021  0  80   0 - 86484 poll_s 13:58 pts/0    00:00:01 gdb ./xrdcp
0 t simonm   17465 17453  0  80   0 - 62609 ptrace 13:59 pts/0    00:00:00 /home/simonm/git/xrootd/build/src/XrdCl/./xrdcp -f Makefile root://slc7-test//tmp
[simonm@idefix ~]$ ps hH p 17465 | wc -l
4
```

Now I'm not sure where is this one additional thread you are seeing coming from, that's why I asked about the version you are using.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/1495#issuecomment-903717335

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1