Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Giving a process absolute priority



Background.
----------
I am starting a new service which uses TigerVNC and web sockets to
provide virtual access, via a browser, to software running on our
servers.  The software works with almost zero perceived delay with
client sites on 5 continents.

The issue:
---------
Because the servers do plenty of other things, it is possible for the
Xvnc process to be squeezed out briefly by the scheduler, but not so
briefly that remote clients do not notice and get frustrated because a
button has not responded in the way they expect.  So I want to give
Xvnc the clearest run possible to process user interaction in real
time.

Progress to date:
----------------
I can successfully renice(1) the Xvnc process to give it the highest
priority, and schedctl(1) it so that, for instance, it runs on CPU3
with a SCHED_RR.  I can use altq.conf(5) to give priority access to the
relevant network adapter.

Advice needed:
-------------
1.  How do I ensure that no other processes are allowed access to CPU3?
2.  How do I ensure that Xvnc never gets swapped out of main memory?
3.  I will build a new kernel if necessary, but can this be done just
    with configuration files and a GENERIC krnel?

Notes:
-----
This is NetBSD-9.2/amd64.
Xvnc seems to be fully re-entrant.  Adding a second/third/courth/fifth
instance results in very modest increase in memory utilisation.
This may seem like overkill.  We're just trying our best to provide
the best possible experince to our users (who are in an already
stressful situation).

-- 
Steve Blinkhorn <steve%prd.co.uk@localhost>



Home | Main Index | Thread Index | Old Index