Artificial intelligent assistant

How to change the "niceness" (CPU priority) of a detached tmux session? I made a very simple web crawler that writes output to the terminal (stdout), so I generally know how fast it's running. After I detach from `tmux` and check the MySQL table, it seems the script is running slower. (I should just open a second terminal and compare the speed before/after `tmux` has detached.) Anyway, this has me wondering if the detached `tmux` session is too "nice". If I look in `top` I don't really know what I'm looking for. I see `tmux`, but is that really the detached session? How would I change the "niceness" of the detached `tmux` session? Would I do that through the operating system or through `tmux`?

You need to change the priority of the web crawler. No, it's unlikely to be the tmux. Probably, tmux will have a child bash whose child will be the program.

I would usually look up the pid from the program name, but otherwise, running `pstree -p` should allow you to hierarchically find it without knowing its name.

You can renice the processt with renice(1), eg:


renice 5 1234


or. more verbosely,


renice -n 5 -p 1234


would renice process 1234 to priority 5

It is also possible to do that from within `top`, just press `r` and answer the two prompts asking for the pid and the new nice value.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 11396f04c64b5498621248aaa4ddaed4