NVIDIA H264/H265 decoder/encoder monitoring

You can use either –query-gpu option:

nvidia-smi --query-gpu=utilization.decoder --format=csv

Example output:

utilization.decoder [%]
9 %

Or dmon:

nvidia-smi dmon

Example output:

# gpu    pwr  gtemp  mtemp     sm    mem    enc    dec    jpg    ofa   mclk   pclk 
# Idx      W      C      C      %      %      %      %      %      %    MHz    MHz 
    0      -     40      -      3      2      0     19      -      -   3504   1290

With little explanation:

sm:  CUDA streaming multiprocessor?
mem: GPU memory
enc: encoder in NVENC
dec: decoder in NVDEC

PostgreSQL streaming replication with physical replication slot

Create dedicated replication user:

CREATE ROLE replica WITH REPLICATION PASSWORD 'xxxYYYzzz' LOGIN;

Then add physical replication slot, in order to stay in sync with WAL. Without it, if applying logs on replica will be too slow, main server could drop logs which replica did not consume yet, leading to broken replication:

select pg_create_physical_replication_slot('replica');

Then stop replica server and remove PGDIR/VERSION/main folder. Start copying:

pg_basebackup -D /var/lib/postgresql/14/main -P --wal-method=stream -R --checkpoint=fast -U replica --slot=replica -W -h a.b.c.d

Adjust configuraton discrepancies between main and replica servers, such connections limit and then start replica server.

To verify replication status, run on main server:

 select * from pg_replication_slots;

About me

Hello. I’m Michael, I’m IT professional and enthusiast.

I graduated computer programming as well as economics at Szkoła Główna Handlowa in Warsaw. I’m author of 5 books concerning software design, development, quality assurance and performance. Since 2005 I have been working with many different companies providing them with various aspects of software development process. I’m specifically interested in corporate architecture but also in bootstraping new startup ideas.

My motto is “getting things done” and I like to learn new things. Would you like to build something special? Contact me.