- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Kernel parameter for binding user processes to...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:27 AM
11-21-2002 07:27 AM
OS HP-UX 11i on multiprocess system
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:37 AM
11-21-2002 07:37 AM
Re: Kernel parameter for binding user processes to processor
Same with Oracle. Processor affinity is set within the application. Nothing to set in the kernel.
Cheers,
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:39 AM
11-21-2002 07:39 AM
Re: Kernel parameter for binding user processes to processor
I could well be wrong, but I don't think there's a related kernel parameter. Our Informix database has a "set processor affinity" option in it's startup that we were able to utilize without kernel changes.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:41 AM
11-21-2002 07:41 AM
Re: Kernel parameter for binding user processes to processor
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:43 AM
11-21-2002 07:43 AM
Re: Kernel parameter for binding user processes to processor
You can set the processor affinity with the system call mpctl in a program.
See man 2 mpctl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 10:11 AM
11-21-2002 10:11 AM
Re: Kernel parameter for binding user processes to processor
If lack of CPU resources is a problem for your process, you may consider priory manipulations using rtprio. However have to be carefull and do not overdo it :).
In case your concerns are 'global' like controling CPU resources for the group(s) of application - go with PRM.
I am not aware of any kernel parameters to manage CPU bindings.
Hope this helps.
0leg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2002 02:46 AM
11-26-2002 02:46 AM
Re: Kernel parameter for binding user processes to processor
one to nail the process at start
the other to nail it later.
Both work fine. The sources are in the attachement.
see man 2 mpctl:
mpctl(2) mpctl(2)
NAME
mpctl - multiprocessor control
SYNOPSIS
#include
int mpctl(
mpc_request_t request,
spu_t spu,
pid_t pid
);
int mpctl(
mpc_request_t request,
spu_t spu,
lwpid_t lwpid
);
REMARKS
Much of the functionality of this capability is highly dependent on
the underlying hardware. An application that uses this system call
should not be expected to be portable across architectures or
implementations.
DESCRIPTION
mpctl provides a means of determining how many processors are
installed in the system and assigning proceses/lightweight processes
to run on specific processors.
This call is expected to be used to increase performance in certain
applications, but should not be used to ensure correctness of an
application. Specifically, cooperating processes/lightweight
processes should not rely on processor assignment in lieu of a
synchronization mechanism (such as semaphores).
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2002 09:52 AM
11-27-2002 09:52 AM
Re: Kernel parameter for binding user processes to processor
given process.
This works on HP-UX 9.X,10.X and 11.X.
Don't remember who wrote the source code.
*/
/*
GETNUMSPUS();
GETFIRSTSPU();
GETNETXSPU(i);
PROCDISABLE(cpu); 0 = OK -1 = Faild
PROCENABLE(cpu); 0 = OK -1 = Faild
GETPROCSTAT(cpu); 0 = OK -1 = Faild
SETPROCESS(cpu,pid); MPC_SPUFLOAT, MPC_SPUNOCHANGE or cpu, pid
*/
#include
#include
#include
#define P_BIND 0
#define P_FLOAT 1
#define QUERY 2
extern int optind;
extern char *optarg;
main(argc,argv)
int argc;
char *argv[];
{
int num_cpu,first_cpu,next_cpu;
int i;
int pid = 0;
int cpu = 0;
int ret = 0;
int opt;
int b_u = 9;
char u[2];
char buf[60];
if( argc < 2) usage();
while((opt = getopt(argc,argv,"u:b:q:")) != -1)
{
switch(opt){
case 'b' : b_u = P_BIND;
if( argc < 4) usage();
cpu = atoi(optarg);
pid = atoi(argv[3]);
break;
case 'u' : b_u = P_FLOAT;
if( argc < 3) usage();
pid = atoi(optarg);
break;
case 'q' : b_u = QUERY;
pid = atoi(optarg);
break;
default :
usage();
break;
}
}
num_cpu = GETNUMSPUS();
if(cpu > num_cpu -1 ){
printf("%d processor(s) aviable in this system\n",num_cpu);
usage();
exit(1);
}
first_cpu = GETFIRSTSPU();
if(b_u == P_BIND){
ret = SETPROCESS(cpu,pid);
u[0] = ('0' + ret);
printf("Process id %d is bound to processor %s\n",pid,
(ret == MPC_SPUNOCHANGE) ? "unknown" :
(ret == MPC_SPUFLOAT) ? "FLOATING" :
(ret == -1) ? "ERROR IN BINDING" :
(ret >= 0) ? u : "ILLEGAL VALUE" );
}
else if(b_u == P_FLOAT){
cpu = MPC_SPUFLOAT;
ret = SETPROCESS(cpu,pid);
u[0] = ('0' + ret);
printf("Process id %d is set to %s\n",pid,
(ret == MPC_SPUNOCHANGE) ? "NO CHANGE" :
(ret == MPC_SPUFLOAT) ? "FLOATING" :
(ret == -1) ? "ERROR IN RELEASING" :
(ret >= 0) ? u : "ILLEGAL VALUE" );
}
else if(b_u == QUERY){
cpu = MPC_SPUNOCHANGE;
ret = SETPROCESS(cpu,pid);
u[0] = ('0' + ret);
strcpy(buf,"is bound to processor ");
strcat(buf,u);
printf("Process id %d %s\n",pid,
(ret == MPC_SPUNOCHANGE) ? "NO CHANGE" :
(ret == MPC_SPUFLOAT) ? "is set to FLOATING" :
(ret == -1) ? "QUERING ERROR" :
(ret >= 0) ? buf : "ILLEGAL VALUE" );
}
}
/*
if(ret != -1){
cpu = MPC_SPUNOCHANGE;
ret = SETPROCESS(cpu,pid);
printf("Process id %d not to CPU # %d ret = %d\n",pid,cpu,ret);
printf("Process id %d is set to %s\n",pid,
(ret == MPC_SPUNOCHANGE) ? "NO CHANGE" :
(ret == MPC_SPUFLOAT) ? "FLOATING" :
(ret == -1) ? "ERROR IN BINDING" : "OK" );
}
*/
usage()
{
fprintf(stderr,"Usage: pbind -b processor_id pid\n");
fprintf(stderr,"Usage: pbind -u pid\n");
fprintf(stderr,"Usage: pbind -q pid\n");
exit(1);
}
Instructor Storage, Servers, HP-UX and Partner Courses
Hewlett Packard Enterprise Education Services
Ask me about training on StoreServ (3PAR) StoreOnce, StoreEasy, StoreAll, StoreVirtual, HP-UX, ServiceGuard and HPE Partner Ready Certification Training
internet: Linkedin: http://www.linkedin.com/in/emilvelez
HPE Master ASE Server Solutions Architect V3
HPE Master ASE Storage Solutions Architect V2
HP UNIX Certified (ASE HPUX 11iv3 Administration V1)
Certified HPE Instructor
HPE Product Certified - OneView [2016]
HP Sales Certified -Servers, Converged Systems and Services [2015]
HPE Product Certified - Converged Solutions [2017]