rustyx opened a new issue #14015:
URL: https://github.com/apache/pulsar/issues/14015


   The Pulsar 2.9.1 Docker container is using ~10..20% CPU in idle mode.
   
   ![Pulsar Excessive CPU use in 
idle](https://user-images.githubusercontent.com/1296899/151562074-b2edb879-d6b5-4d05-b4b1-4d7854d11b82.png)
   
   ```
     81.0% - 2,384 s io.netty.util.concurrent.FastThreadLocalRunnable.run
     80.7% - 2,376 s io.netty.util.internal.ThreadExecutorMap$2.run
     80.7% - 2,376 s io.netty.util.concurrent.SingleThreadEventExecutor$4.run
     80.7% - 2,376 s io.netty.channel.epoll.EpollEventLoop.run
     47.5% - 1,398 s 
io.netty.channel.epoll.EpollEventLoop.epollWaitNoTimerChange
     47.5% - 1,398 s io.netty.channel.epoll.Native.epollWait
     47.5% - 1,398 s io.netty.channel.epoll.Native.epollWait
     47.5% - 1,398 s io.netty.channel.epoll.Native.epollWait
     33.2% - 978 s io.netty.channel.epoll.EpollEventLoop.epollWait
     33.2% - 978 s io.netty.channel.epoll.Native.epollWait
     33.2% - 978 s io.netty.channel.epoll.Native.epollWait0
     0.0% - 17,667 µs 
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks
     0.0% - 9,033 µs io.netty.channel.nio.NioEventLoop.run
     0.2% - 6,377 ms java.util.concurrent.ThreadPoolExecutor$Worker.run
     0.0% - 1,118 ms io.netty.util.HashedWheelTimer$Worker.run
     16.6% - 489 s 
io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run
     16.6% - 489 s 
io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run
     16.6% - 489 s 
io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run
     16.6% - 489 s 
io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop.run
     9.5% - 279 s 
io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop.epollWait
     7.1% - 209 s 
io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop.epollWaitNoTimerChange
   ```
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. `docker run -d -p 6650:6650 -p 8080:8080 apachepulsar/pulsar:2.9.1 
bin/pulsar standalone`
   2. Add a postgres source: `pulsar-admin source localrun --source-config-file 
pg.yaml`  (not sure if this is relevant)  
      pg.yaml:  
       ```
       tenant: "public"
       namespace: "default"
       name: "pg-source"
       topicName: "pg-topic"
       archive: "/mnt/pulsar-io-debezium-postgres-2.9.1.nar"
       parallelism: 1
       configs:
         plugin.name: "pgoutput"
         database.hostname: "postgres"
         database.port: "5432"
         database.user: "postgres"
         database.password: "postgres"
         database.dbname: "postgres"
         database.server.name: "postgres"
         schema.whitelist: "public"
         database.history.pulsar.service.url: "pulsar://localhost:6650"
       ```
   3. Wait a couple of minutes
   4. Notice 10..20% cpu use in the java process inside the container.  
      Running `top` inside the container:
        ```
         PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ 
COMMAND
           1 root      20   0   10.5g   1.1g  34452 S  14.0   9.1   3:27.74 java
         711 root      20   0    4244   3528   2988 S   0.0   0.0   0:00.04 bash
         724 root      20   0    6124   3288   2760 R   0.0   0.0   0:00.00 top
        ```
   
   **Desktop (please complete the following information):**
    - OS: Windows 10 x64, WSL2 Linux x64 running Docker
   
   **Logs:**
   Couldn't see anything wrong in the logs. See attached:
   [pulsar.log](https://github.com/apache/pulsar/files/7959514/pulsar.log)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to