Home > Articles > Operating Systems, Server > Solaris

Sun Grid Engine, Enterprise Edition—Configuration Use Cases and Guidelines

This article describes a set of use cases for configuration of Sun Grid Engine, Enterprise Edition 5.3 (Sun ONE GEEE) software. It is meant to be a starting point from which intermediate to advanced Sun One GEEE software administrators can create a customized configuration for their particular environment. It is important to realize that each environment has unique requirements, and that the greatest benefits of the Sun ONE GEEE software policy module are obtained by fine-tuning a configuration once the results of the initial configuration have been assessed. Moreover, as the environment evolves and the needs of the enterprise change, additional tuning on an ongoing basis will probably be appropriate. This article assumes the reader has some familiarity with the features and parameters of Sun ONE GEEE.
Like this article? We recommend

This article describes a set of use cases for configuration of Sun_ Grid Engine, Enterprise Edition 5.3 (Sun ONE GEEE) software. It is meant to be a starting point from which intermediate to advanced Sun One GEEE software administrators can create a customized configuration for their particular environment. It is important to realize that each environment has unique requirements.

The greatest benefits of the Sun ONE GEEE software policy module are obtained by fine-tuning a configuration once the results of the initial configuration have been assessed. Moreover, as the environment evolves and the needs of the enterprise change, additional tuning on an ongoing basis will probably be appropriate.

This article assumes the reader has some familiarity with the Sun ONE GEEE features and parameters. For the details of the policies and the major parameters used to set up and influence the various policies, consult the Sun ONE Grid Engine, Enterprise Edition 5.3 Administration and User's Guide, Part IV, Chapter 9. For a complete list of parameters, consult the Sun ONE Grid Engine 5.3 and Sun ONE Grid Engine, Enterprise Edition 5.3 Reference Manual.

Policy Use Cases

This section covers situations in which individual Sun ONE GEEE software policies are implemented to achieve certain goals. The focus is on cases in which different policies are combined.

Job Types With Groups

In this scenario, there are two or more enterprise-wide groups (for example, departments, projects, user groups, and so forth). Each group must receive a specified share of the resources, averaged over time. In addition, there are two or more priority types of jobs that must be dispatched in strict priority order. High-priority jobs are always scheduled ahead of medium-priority jobs, which are scheduled ahead of low-priority jobs regardless of the group from which they originate.

For simplicity, this article describes the solutions with only two groups and two job-types. and assumes that the desired resource allocation ratio between the groups is 75:25, and that the job types can be categorized as either normal or high, indicating relative priority. It should be straightforward to extend the concept to multiple groups and job types.

Two approaches can be used to implement this scenario.

Approach Number 1—Projects With Overloading

In this approach, every combination of {group, job-type} is assigned a unique project. For example, with two groups, Group A and Group B, and two types, normal and high, the projects would be:

  • grpAhigh
  • grpAnrml
  • grpBhigh
  • grpBnrml

When submitting a job, the user specifies which combination {group, job-type} they want to assign to it by using the -P option to qsub. Hence, the concept of project is overloaded with two characteristics: group and job type. Users would need to be trained to use the appropriate option to the submit command, for example, a user in Group A would run a high-priority job as follows:

qsub -P grpAhigh myjob.sh

To prevent users from accidentally (or deliberately) specifying the wrong group, the access lists for the projects can be set to explicitly include or exclude certain users or user groups. See man page access_list(5).

After creating SGEEE software projects as described previously, you must create a share tree as shown in FIGURE 1. See man page share_tree(5). The penultimate nodes in the tree correspond to the enterprise-wide groups and the leaves are the different projects grouped accordingly. The shares for each node group are set to match with the desired allocation ratio. The shares assigned to the project leaves can all be set the same, because you are not interested in tracking the difference in cumulative utilization between high- and medium-priority jobs. Rather, you want to ensure that the higher priority jobs are always given greater precedence.

Figure 01FIGURE 1 Share Tree Policy Share Assignments for Approach Number 1

The next step is to add override tickets to the projects according to their priority. In this example, the following assignments would be made:

TABLE 1 Assignment of Override Tickets to Projects

Project Name

No. of Override Tickets

grpAhigh

10,000

grpBhigh

10,000

grpAnrml

0

grpBnrml

0


Since there are only two job types, it is sufficient to give a certain number to the highest- priority job, and zero to the lowest. If there were more job types, they would be allocated tickets such that the difference between the levels is always 10,000, for example 0, 10000, 20000. Essentially, a priority band is set for each distinct priority; the number of tickets give the ranking of the bands. The number 10,000 has a significance that is explained in the following paragraphs.

In conjunction with setting the override tickets for each project, the scheduler parameter SHARE_OVERRIDE_TICKETS must be set to FALSE under schedd_params. See man page sge_conf(5). This setting ensures that the tickets do not get divided among the jobs of each project, but rather, each job will get the full 10,000 project override tickets that are necessary to implement the priority bands.

The final step is to assign 9,000 tickets to the share tree policy. The reasoning behind this is as follows. The share tree policy allocates tickets to jobs according to the cumulative utilization of the individual projects, as compared with their share assignments. In the extreme case, in which one project's cumulative utilization is almost zero (and the compensation factor is set to one), a single job submitted into that project could get allocated all 9,000 tickets. Nevertheless, if another job from a high-priority job type is submitted, the 10,000 override tickets will be sufficient to override the 9,000 share policy tickets, and because it has more tickets overall, it would go ahead in the pending list.

More generally, the number of share policy tickets should always be less than the "difference" between the numbers of tickets assigned to the levels of priority for the job types. This is why 10,000 tickets was chosen as the difference between job type levels, while 9,000 was chosen as the total allotment of the share policy.

Note that the actual numbers do not have any significance to the Sun Grid Engine scheduler. The figures 9,000 and 10,000 are simply easy to understand and manage.

Approach Number 2—Projects Map Job Types

An alternative way to configure this scenario is to use projects to map only the job types, and put all of the group information into the share tree. The first step in this approach is to create a project for every job priority type. In this example, we would have two projects, with the number of override tickets again configured to give priority bands. As with the previous example, set the scheduler parameter SHARE_OVERRIDE SHARES to FALSE.

TABLE 2 Project and Override Ticket Assignments

Project Name

No. of Override Tickets

normal

0

high

10,000


The next step is to create a share tree with the desired groups and share allocation, as shown in FIGURE 2.

Figure 02FIGURE 2 Share Tree Policy Share Assignments For Approach Number 2

To Add Users

The critical part, and the one that requires most attention, is to explicitly add every user to the appropriate location in the tree. This is a two-step procedure:

  1. Create a Sun ONE Grid Engine user object for every user. See man page user(5).

  2. Assign the Sun ONE Grid Engine user object to the proper place in the tree.

As before, a total of 9,000 tickets are assigned to the share tree policy; in other words, a number smaller than the difference between the number of override tickets for the different priority levels.

When submitting a job, users only need to specify the job type by using the -P option to qsub. Users do not need to be trained to specify a group, for example, a user in Group A would run a high-priority job as follows:

qsub -P high myjob.sh

Since the user was explicitly placed in the share tree under a particular group, the utilization by jobs from that user are automatically accounted correctly.

Comparison of Approaches

The advantage of approach number two is that it is simpler for users, since they only need to specify the job type when submitting jobs without worrying about specifying the proper group. The disadvantage is that it is more work for the administrators to set up, because they must explicitly add every user to the share tree. For an environment with a large number of users, this is best achieved via scripting, and integrating with some external user list. For example, there might be a Lightweight Directory Access Protocol (LDAP) directory that contains users organized into departments. You could write a script that reads in user's information from this directory, creates the Sun ONE GEEE user object, and then inserts the user object into the tree depending upon the department code. An example listing of such a code is given in CODE EXAMPLE 1. Such a procedure would need to be done any time a user is added to the environment.

Projects Span Groups

In this scenario, there are two or more enterprise-wide projects, that is, sets of jobs that are closely related, and two or more groups of people with different privileges, working on both projects together. These groups could be, for example, from different departments, or there could be regular and power users, the latter having greater privileges. The desire is to allocate resources to the projects based on cumulative utilization, while simultaneously guaranteeing a certain priority or service level for the different groups. For example, power users' jobs go before other users or else they receive a greater proportion of available resources.

Configuration

This example assumes two projects, Project 1 and Project 2, and two groups, Department A and Department B. See man page access_list(5). The goal is to give 20 percent of resources to Project 1 and 80 percent to Project 2. In addition, people in Department A should get 60 percent of the resources, regardless of which project they submit a job under, while Department B should get 40 percent. (Later, we will modify this for the case where Department A's jobs should always go ahead of Department B's jobs).

To Set Up the Share Tree Policy

The procedure is to create the two projects and then set up the share tree with the desired resource allocation ratio among the projects.

Figure 03FIGURE 3 Share Tree Policy Share Assignments for Projects That Span Groups

  1. Set up two Sun ONE Grid Engine departments (TABLE 3) in the Userset/Userlist configuration.

    TABLE 3 Department Setup and Share Assignment

    Department Name

    No. of Functional Shares

    Dept A

    60

    Dept B

    40


  2. In the functional policy configuration, assign shares to the two departments accordingly.

  3. Set the number of tickets for the share tree policy to 1,000,000 and the number of tickets for the functional policy to 1,000

  4. Set the following parameters in the cluster configuration under schedd_params:

    POLICY_HIERARCHY=FS,SHARE_FUNCTIONAL_SHARES=TRUE

    To submit jobs the users would simply specify the project under which the job's utilization should be accounted:

    qsub -P Project1 myjob.sh

    You can restrict access to projects using project access lists.

    This example shows how two policies can be combined to achieve a desired goal, and also illustrates one use of the POLICY_HIERARCHY parameter. With this setup, jobs are balanced between projects according to the specified resource allocation ratio but, within a project, jobs are dispatched according to functional (that is, department) ordering. Because the parameter SHARE_FUNCTIONAL_SHARES is set to TRUE, it prevents one department from excluding the other. Instead, jobs are dispatched in an interleaved fashion among all of the departments.

    Most crucially, the share policy is guaranteed to have highest precedence by two factors:

    • The number of share policy tickets greatly exceeds the number of functional policy tickets

    • The POLICY_HIERARCHY is set to FS.

    Having more share policy tickets than functional tickets means that the tickets allocated by the share policy will have the greatest impact on the overall number of tickets assigned to each job, which determines the final dispatch order. The number of tickets from the functional policy assigned to each job will be so small that, in most cases, it will be negligible in determining the total number of tickets assigned to each job.

    The functional tickets only have an overriding influence in the extreme case where there is a very large number of pending jobs, or when the utilization of a project greatly exceeds the target. In this case, the number of share policy tickets assigned to a particular job might be very low, lower perhaps than the number of functional policy tickets assigned to the same job. Additionally, when a large mismatch between actual and target utilization for a project exits, the compensation factor can be used to limit the degree to which a project's ticket allocation is diminished to distribute the share policy tickets more evenly between projects.

    Nevertheless, we want to ensure that, even though the number of functional tickets is small compared with the share policy, the functional policy should still have some impact. This is where the POLICY_HIERARCHY setting comes in. Setting FS instructs the scheduler to consider the functional tickets first, for sorting within a share tree node. Thus, instead of first-in first-out (FIFO) ordering, jobs within a share tree node are ordered according to the functional policy settings.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020