-
Thayumanavar authored
thread. Initialization of THD and vio/net initialization happens in the acceptor thread that accepts the connection. THD and network initialization involves acquiring locks, memory allocation of various structures and system calls which are compute-bound as well as tasks that may block. The acceptor thread is an event loop that waits for new connection events from clients. To maximize the number of connections that can be handled per unit of time, the acceptor thread should spend as much of its time listening for new connections. This means thd and vio/net initialization should be offloaded from the accept event loop and delegated to worker threads that handle the client connections. This worklog provides a generic framework which offloads THD initialization and net/vio initialization to worker threads for all types of communication channels (shared memory, named pipes and sockets) that clients connect with server. In addition, this worklog refactored the existing interfaces of the struct scheduler_functions into an object oriented API, refactored and moved code related to connection handling and its management into a separate directory and files that contain implementations of specific related functionality. This resulted in removal of unnecessary #defines, modularity, better code clarity and readability in addition to performance improvements made in the worklog. As result of changes in this worklog, the follow bugs have been fixed: Bug#12951536 - THD INITIALIZATION TOO EXPENSIVE FOR ACCEPT() THREAD. Bug#12951595 - TOO MUCH NETWORK INITIALIZATION DONE IN ACCEPT() THREAD. Bug#12951605 - ACCEPT() SOCKET GETS TOO MUCH OF FCNTL()S. User Visible Changes: The system variables "bind_address", "thread_handling", ""thread_cache_size" and status variables "threads_cached", "Slow_launch_threads" are no longer visible in embedded server mode (where they have no effect).
Thayumanavar authoredthread. Initialization of THD and vio/net initialization happens in the acceptor thread that accepts the connection. THD and network initialization involves acquiring locks, memory allocation of various structures and system calls which are compute-bound as well as tasks that may block. The acceptor thread is an event loop that waits for new connection events from clients. To maximize the number of connections that can be handled per unit of time, the acceptor thread should spend as much of its time listening for new connections. This means thd and vio/net initialization should be offloaded from the accept event loop and delegated to worker threads that handle the client connections. This worklog provides a generic framework which offloads THD initialization and net/vio initialization to worker threads for all types of communication channels (shared memory, named pipes and sockets) that clients connect with server. In addition, this worklog refactored the existing interfaces of the struct scheduler_functions into an object oriented API, refactored and moved code related to connection handling and its management into a separate directory and files that contain implementations of specific related functionality. This resulted in removal of unnecessary #defines, modularity, better code clarity and readability in addition to performance improvements made in the worklog. As result of changes in this worklog, the follow bugs have been fixed: Bug#12951536 - THD INITIALIZATION TOO EXPENSIVE FOR ACCEPT() THREAD. Bug#12951595 - TOO MUCH NETWORK INITIALIZATION DONE IN ACCEPT() THREAD. Bug#12951605 - ACCEPT() SOCKET GETS TOO MUCH OF FCNTL()S. User Visible Changes: The system variables "bind_address", "thread_handling", ""thread_cache_size" and status variables "threads_cached", "Slow_launch_threads" are no longer visible in embedded server mode (where they have no effect).
Loading