Why just single process work?

I use some code like below for my task multiprocess processing.

import ray
import time
import psutil
import re
from math import ceil
import pdb
# Start Ray.
ray.init(num_cpus=4)  # I would use 4 cpus

def preprocessing_text(input_text):
    new_text = str(input_text).lower()
    # and some other text processing operation
    return new_text

result_list = []

for i in range(50000):
results = ray.get(result_list)

When i use top in terminal, it seems just single process work at the same time, and at different times maybe different process work. Why can not the 4 processes work at the same time? It seems that the parallel fail? Or is there something i misunderstand? Thanks a lot!

Ray updates the process name before it executes a task, and based on my observation, that takes some time. As a result, although tasks are running the proctitle could be ray::IDLE if your task is not long enough.

If you add time.sleep(10) in your task, does it still show the same thing?