It turns out we have two different encodings of process priority:
1) specified in cc_config.xml and used by the client: 0 (low) to 4 (high)
2) specified in job.xml and used by the wrapper: 1 (low) to 5 (high).
This didn't cause any problems until recently when I added code
to pass the cc_config.xml info to the wrapper;
it was interpreting it on the 1-5 scale.
Fix: have the wrapper convert it (add one).
Also: I forgot to have the client actually put the priority into
in the app_init_data.xml file.
Instead: declare a static const instance (whose data members are zero)
and copy that.
This avoid the error-prone need to assign each member,
and it works even if there are virtual function tables.
- disable it unless <allow_gui_rpc_get/> is in cc_config.xml
- return 400 and 403 HTTP replies in various error cases
- allow .html, .js, and .css filename extensions
- allow directories in path (but not ..).
Files could be e.g. in project directories.
For projects P with MC restrictions, during RR simulation,
we keep track of the max # of instances used by P,
subject to the restrictions, and use that to calculate its "MC shortfall".
Problem: if P doesn't have any jobs, the max # instances is zero,
so MC shortfall is zero, so we erroneously don't request work for P.
Solution: initialize max # of instances to the min of the restrictions;
we'll always be able to use at least that many instances.
If nvc_config.cml file is absent, use default values.
Branded installers can create or replace this file to customize these values.
Standard (unbranded) BOINC installers should either delete the file or create or replace it with one containing default values.
Move WSL detection to get_host_info().
Enumerate available WSLs from registry.
Add wslapi library loading.
Add support of multiple installed wsl distros detection.
Detect only installed and configured distros.
Add extra information parse.
Add wslinfo files to save and parse wsl info.
Add dont_use_wsl param to cc_config.
Add missed hostinfo_wsl.cpp when building win client using gcc.
Fix small issues.
Small refactoring.
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
The set of commits on this pull request:
https://github.com/BOINC/boinc/pull/1453
first reinstated previously existing code to utilize the XScreenSaver
(XSS) X extension when determining a system's idle state (there was
also additional DPMS code that was not reinstated).
Original removal:
bfae1032e5
The code would attempt to open a connection to the display at the client
binary's DISPLAY environment variable and, if unable to connect, always
report busy (undesirable).
The original motivation for reinstating this code was that the remaining
idle detection mechanisms did not detect mouse or keyboard movement if
an Xserver was responsible for them. Only activities in terminals were
detected. Through the course of extending and improving this code, the
following changes have been made:
* As per "man Xserver", each local Xserver should have a socket file
at standard location /tmp/.X11-unix/ with standard naming scheme
"Xn", where n is the number of the DISPLAY. This code will open this
directory and parse its contents for open DISPLAYs, adding them to a
vector for later interrogation of idle time by xss_idle. If no DISPLAYs
were found, a static guess-list from DISPLAY :0 to DISPLAY :6 is set and
interrogated.
* xss_idle uses the XScreenSaver X extension's API, as documented at
"man 3 xss". Certain checks are performed to determine if the X
server is accessible, and if so, whether it has the XScreenSaver
extension. If it does, then we obtain information on the DISPLAY's idle
time and determine whether the Xserver is idle or not.
* The user running the boinc client (typically the "boinc" user for
most distributions), must have access to the Xserver for XSS idle
detection to work. Dropping an appropriate file in /etc/X11/Xsession.d/
(Debian flavours) or /etc/X11/xinit/xinitrc.d/ (Fedora and others)
should permit Xservers to run something like "xhost +SI:localuser:boinc"
on start. If the boinc client cannot access an Xserver/DISPLAY, it
simply skips it and treats it as though it is idle. If no DISPLAY is
accessible, then xss_idle is effectively passed through --xss_idle will
report the system as idle-- and idle detection is left to other
mechanisms.
* A debug logging flag "idle_detection_debug" was added. If this
flag is defined in the cc_config.xml file as "1", then verbose
debugging information related to boinc's idle detection determinations is
provided to the Event Log. This logging flag may also be utilized
by other components of idle detection as/if needed/desired.
Apparently even the thread-level version (SetThreadPriority())
caused the client to starve and become unresponsive if
something else was doing lots of disk I/O.
We added code a couple of months ago to lower client priority:
on Win, this is SetPriorityClass(),
which lowers I/O and memory priority as well as CPU.
This has the desired effect, i.e. to reduce the performance impact
of BOINC when it's doing things like copying large files.
However, it means that BOINC can take a long time to start at boot,
which may be disconcerting to some users.
If set, non-CPU-intensive jobs are exempted from mass suspend
(e.g. suspend CPU, time of day, CPU throttling).
You can still suspend them individually.
This leads to confusion;
e.g. if you do "read config files" it will look for cc_config.xml
in the new directory, not find it, and set default options.
Also, log files end up in old directory.
Also, gui_rpc_auth.cfg will be in new directory,
and the Manager won't look there.
This was supposed to be in my 507cd79 commit, but it got botched somehow.
- client: the <task> debug flag enables suspend/resume messages
for both CPU and GPU.
Previously CPU messages were always shown,
and GPU messages were shown if <cpu_sched_debug> was set.
- client: fix bug where reschedule wasn't being done on GPU suspend or resume.
- client: add <async_file_debug> log flag
- client: do decompress (both sync and async) to a temp file,
then rename
- client: if a file's status is VERIFY_PENDING on startup,
set it to NOT_PRESENT; that will trigger a verify
- client: do async copy only if size is above threshold
svn path=/trunk/boinc/; revision=25222
Report it (along with disk usage) in scheduler request messages.
This will allow the scheduler to send file-delete commands
if the project is using more than its share.
- client: add <disk_usage_debug> log flag
- create_work: add --help, show --command_line option
svn path=/trunk/boinc/; revision=24968
parsing cc_config.xml
- client: if an <exclude_cpu> element in cc_config.xml
specifies a nonexistent app, show an error msg with
a list of existing app names
- web: increase the default mem limit from 64MB to 256MB
TODO: change user_hosts.php to show N at a time
svn path=/trunk/boinc/; revision=24593
so that they do what they're supposed to
(i.e. enforce resource shares)
- client: change log flag <debt_debug> to <priority_debug>
- client simulator: update REC even with large delta-t.
- client simulator: handle "no new work" apps correctly
svn path=/trunk/boinc/; revision=24429