their is only one log file to ship (and this log file will logrotate by day) and send to kafka with 10 partitions , but have so many child process. Is it normal? why filebeat create so many child process?
filebeat is not creating any child processes. The go runtime creates a number of OS-threads, but no child processes. By using grep filebeat we can not tell the actual parent process though. You sure these are actual processes or are these threads? Can you try with ps only? Running ps -m should give you all threads, not just processes.
By default the go runtime requires GOMAXPROCS (environment variable) active OS-threads. If GOMAXPROCS is not set, the runtime will requires as many OS-threads as CPU cores are available (multiply by 2 if hyperthreading is enabled). The crux is in "active OS-Threads". If a blocking system call (like read from file) is executed within an OS-thread, it might be blocked. If the runtime is scheduling another go-routine it might start another OS-thread.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.