CN104461679A - Automatic implementation method for binding network card to CPU - Google Patents

Automatic implementation method for binding network card to CPU Download PDF

Info

Publication number
CN104461679A
CN104461679A CN201410611777.1A CN201410611777A CN104461679A CN 104461679 A CN104461679 A CN 104461679A CN 201410611777 A CN201410611777 A CN 201410611777A CN 104461679 A CN104461679 A CN 104461679A
Authority
CN
China
Prior art keywords
cpu
network interface
binding
implementation method
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410611777.1A
Other languages
Chinese (zh)
Inventor
王野
王守昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201410611777.1A priority Critical patent/CN104461679A/en
Publication of CN104461679A publication Critical patent/CN104461679A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses an automatic implementation method for binding a network card to a CPU (central processing unit). the implementation method utilizes a shell script to automatically acquire a network port interrupt number according to a set network port name and a CPU serial number, and binds the interrupt number to a specified CPU according to set parameters. By adopting the technology provided by the invention, the full-automatic binding of the specific network card to the appointed CPU is realized through the shell script, only the network port name and the CPU serial number need to be manually input, other processes are completely and automatically completed, and a large amount of system commands and other operations do not need to be manually input. The script is convenient to use and simple to operate, and can be operated without mastering professional knowledge. The method is applied to the performance test stage of the server and is used for improving the network performance when the server is put into use, so that the labor and the time can be saved, and the working efficiency is improved.

Description

A kind of by the robotization implementation method of network card binding to CPU
Technical field
The present invention relates to computer network field, be specifically related to a kind of by the robotization implementation method of network card binding to CPU.
Background technology
Server is exactly network with extraneous passage of coming into contacts with, and no matter server has carried out the work of which complexity, and its net result all will by network-feedback to request object.Say that network interface card is exactly " throat " parts of server correspondence with foreign country and contact in a sense, the performance of network interface card determines the overall performance of server to a certain extent.The Cloud Server of fast development especially now be unable to do without high performance network support especially.
Server is not all the time in the computing that process is a large amount of, so network interface card will affect response and the performance of network interface card when striving for cpu resource with other programs, if there is way that network interface card interrupt distribution is processed to specific core cpu, just better network performance can be obtained.Present server is substantially all multi-CPU, multi-core, so can as the method improving server network performance on CPU to specifying using network card binding.
But realize network interface card to need to input a large amount of system commands to specifying the binding between CPU, this not only needs skilled operation and professional knowledge, and server and network interface card more time also need a large amount of time.Therefore develop one based on shell script by the robotization implementation tool IRQ.sh of network card binding to CPU.
Shell script, Shell Script, similar to the batch processing under Windows/Dos, namely put in advance in a file with all kinds of order, facilitate a program file of disposable execution, mainly facilitate keeper to carry out arranging or manage.But the order under it using Linux/Unix, more powerful than the batch processing under Windows, the program efficiency of editor is higher.
Summary of the invention
The technical problem to be solved in the present invention is: provide a kind of by the robotization implementation method of network card binding to CPU.
The technical solution adopted in the present invention is:
By the robotization implementation method of network card binding to CPU, described implementation method utilizes shell script according to the network interface title of setting and CPU sequence number, automatic acquisition network interface interrupt number, and according to set parameter, this interrupt number is tied to the CPU specified.
Described implementation method manually need only input network interface name and CPU sequence number, and other processes complete completely automatically.Realize ad hoc networks by shell script and snap into the full-automatic binding of specifying CPU, only need manually input network interface name and CPU sequence number, without the need to manually inputting a large amount of system commands and other operations.
Described method performing step is as follows:
1) network interface name and the CPU sequence number of manually input is read:
Run this automatic test script by command terminal, after manually inputting the network interface and No. CPU needing to carry out binding, shell script can read these two parameters also for binding is afterwards prepared, and points out the network interface and No. CPU that will bind to user simultaneously;
2) check whether irqbalance service opens:
After the network interface and CPU of manually input needs binding, just enter full automatic binding procedure.First whether script can be opened by detection system service irqbalance, binding result can be caused ineffective if hold service unlatching, close this service so can point out when detecting that this service is opened and then carry out bindings, if close, directly entering next step;
3) bindings is completed:
After the detection of the input and system service program that complete network interface and CPU parameter, it is the binding that network interface interrupts CPU that script starts to enter next step, first interrupt number corresponding to this network interface is obtained according to the network interface name of input, then automatic being tied to by interrupt number specifies CPU, and binding result is printed to screen display out, facilitate record.
Beneficial effect of the present invention: adopt technology provided by the present invention, realize ad hoc networks by shell script and snap into the full-automatic binding of specifying CPU, manually need only input network interface name and CPU sequence number, other processes complete completely automatically, without the need to manually inputting a large amount of system commands and other operations.This script is easy to use, simple to operate, also can complete operation without the need to grasping professional knowledge.The method is applied in when server performance test phase and server come into operation and is used for improving network performance, can save manpower and time, increase work efficiency.
Accompanying drawing explanation
Fig. 1 is present system construction method figure.
Embodiment
Below according to Figure of description, in conjunction with specific embodiments, the present invention is further described:
Embodiment 1:
A kind of by the robotization implementation method of network card binding to CPU, described implementation method utilizes shell script according to the network interface title (as eth0/eth1 etc.) of setting and CPU sequence number (CPU0/1 etc.), automatic acquisition network interface interrupt number, and according to set parameter, this interrupt number is tied to the CPU specified.
Embodiment 2:
On the basis of embodiment 1, implementation method described in the present embodiment manually need only input network interface name and CPU sequence number, and other processes complete completely automatically.Realize ad hoc networks by shell script and snap into the full-automatic binding of specifying CPU, only need manually input network interface name and CPU sequence number, without the need to manually inputting a large amount of system commands and other operations.
Embodiment 3:
On the basis of embodiment 1 or 2, described in the present embodiment, method performing step is as follows:
1) network interface name and the CPU sequence number of manually input is read:
This automatic test script is run by command terminal, terminal has following prompting, after manual input needs to carry out the network interface bound and No. CPU, shell script can read these two parameters and prepare for binding afterwards, points out the network interface and No. CPU that will bind to user simultaneously;
Please input the Network port and the CPU:(inputs) eth0 CPU0
The Network port and the CPU are: eth0 CPU0
2) check whether irqbalance service opens:
After the network interface and CPU of manually input needs binding, just enter full automatic binding procedure.First whether script can be opened by detection system service irqbalance, binding result can be caused ineffective if hold service unlatching, close this service so can point out when detecting that this service is opened and then carry out bindings, if close, directly entering next step;
3) bindings is completed:
After the detection of the input and system service program that complete network interface and CPU parameter, it is the binding that network interface interrupts CPU that script starts to enter next step, first interrupt number corresponding to this network interface is obtained according to the network interface name of input, then automatic being tied to by interrupt number specifies CPU, and binding result is printed to screen display out, facilitate record.

Claims (3)

1. one kind by the robotization implementation method of network card binding to CPU, it is characterized in that: described implementation method utilizes shell script according to the network interface title of setting and CPU sequence number, automatic acquisition network interface interrupt number, and according to set parameter, this interrupt number is tied to the CPU specified.
2. according to claim 1 a kind of by the robotization implementation method of network card binding to CPU, it is characterized in that: described implementation method manually need only input network interface name and CPU sequence number, and other processes complete completely automatically.
3. according to claim 1 and 2ly a kind ofly the robotization implementation method of network card binding to CPU to be it is characterized in that, described method performing step is as follows:
1) network interface name and the CPU sequence number of manually input is read:
Run this automatic test script by command terminal, after manually inputting the network interface and No. CPU needing to carry out binding, shell script can read these two parameters also for binding is afterwards prepared, and points out the network interface and No. CPU that will bind to user simultaneously;
2) check whether irqbalance service opens:
Binding result can be caused ineffective if hold service unlatching, close this service so can point out when detecting that this service is opened and then carry out bindings, if close, directly entering next step;
3) bindings is completed:
First obtain interrupt number corresponding to this network interface according to the network interface name of input, then automatic being tied to by interrupt number specifies CPU, and binding result is printed to screen display out, facilitates record.
CN201410611777.1A 2014-11-04 2014-11-04 Automatic implementation method for binding network card to CPU Pending CN104461679A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410611777.1A CN104461679A (en) 2014-11-04 2014-11-04 Automatic implementation method for binding network card to CPU

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410611777.1A CN104461679A (en) 2014-11-04 2014-11-04 Automatic implementation method for binding network card to CPU

Publications (1)

Publication Number Publication Date
CN104461679A true CN104461679A (en) 2015-03-25

Family

ID=52907783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410611777.1A Pending CN104461679A (en) 2014-11-04 2014-11-04 Automatic implementation method for binding network card to CPU

Country Status (1)

Country Link
CN (1) CN104461679A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536824A (en) * 2015-01-16 2015-04-22 浪潮电子信息产业股份有限公司 Method for achieving Chelsio 40 G network card performance optimization
CN104753741A (en) * 2015-04-13 2015-07-01 浪潮电子信息产业股份有限公司 Network card test performance adjustment method and device
CN105068911A (en) * 2015-08-20 2015-11-18 浪潮电子信息产业股份有限公司 Method for optimizing network card performance aiming at CPU kernel
CN105162629A (en) * 2015-08-26 2015-12-16 浪潮电子信息产业股份有限公司 Automatic implementation method for double-network-card binding under LINUX system
CN105511964A (en) * 2015-11-30 2016-04-20 华为技术有限公司 I/O request processing method and device
CN106201697A (en) * 2016-07-15 2016-12-07 东软集团股份有限公司 A kind of interruption processing method, system and PIC
CN107943632A (en) * 2017-11-23 2018-04-20 郑州云海信息技术有限公司 A kind of method and system for realizing each disk balancing performance in more NVME disks configuration servers
CN108762922A (en) * 2018-05-23 2018-11-06 郑州云海信息技术有限公司 By improving the method and system of network interface card compatibility improving performance under a kind of Linux

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901167A (en) * 2010-07-22 2010-12-01 网御神州科技(北京)有限公司 Multi-network security auditing method and system under multi-CPU architecture
CN103699428A (en) * 2013-12-20 2014-04-02 华为技术有限公司 Method and computer device for affinity binding of interrupts of virtual network interface card

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901167A (en) * 2010-07-22 2010-12-01 网御神州科技(北京)有限公司 Multi-network security auditing method and system under multi-CPU architecture
CN103699428A (en) * 2013-12-20 2014-04-02 华为技术有限公司 Method and computer device for affinity binding of interrupts of virtual network interface card

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
南风轩: "《博客园,http://www.cnblogs.com/zackyang/archive/2012/02/08/2342141.html》", 8 February 2012 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536824A (en) * 2015-01-16 2015-04-22 浪潮电子信息产业股份有限公司 Method for achieving Chelsio 40 G network card performance optimization
CN104753741A (en) * 2015-04-13 2015-07-01 浪潮电子信息产业股份有限公司 Network card test performance adjustment method and device
CN105068911A (en) * 2015-08-20 2015-11-18 浪潮电子信息产业股份有限公司 Method for optimizing network card performance aiming at CPU kernel
CN105162629A (en) * 2015-08-26 2015-12-16 浪潮电子信息产业股份有限公司 Automatic implementation method for double-network-card binding under LINUX system
CN105511964A (en) * 2015-11-30 2016-04-20 华为技术有限公司 I/O request processing method and device
CN105511964B (en) * 2015-11-30 2019-03-19 华为技术有限公司 The treating method and apparatus of I/O request
CN106201697A (en) * 2016-07-15 2016-12-07 东软集团股份有限公司 A kind of interruption processing method, system and PIC
CN106201697B (en) * 2016-07-15 2020-04-28 东软集团股份有限公司 Interrupt processing method and system and programmable interrupt controller
CN107943632A (en) * 2017-11-23 2018-04-20 郑州云海信息技术有限公司 A kind of method and system for realizing each disk balancing performance in more NVME disks configuration servers
CN108762922A (en) * 2018-05-23 2018-11-06 郑州云海信息技术有限公司 By improving the method and system of network interface card compatibility improving performance under a kind of Linux

Similar Documents

Publication Publication Date Title
CN104461679A (en) Automatic implementation method for binding network card to CPU
CN106708718B (en) Service framework interface test method and device
WO2016004657A1 (en) Device for automatically generating test cases for embedded software and method thereof
JP2011509478A5 (en)
CN104375914A (en) Automatic testing method for internal pressure change of server
CN106649014A (en) Automatic testing method of calculating type server which supports multiple GPUs
CN104020763B (en) The automatic test approach of input/output interface and system
CN105740139B (en) A kind of debugging embedded software method based on virtual environment
CN102045397A (en) Method and equipment for logining embedded terminals by using Telnet to debug embedded terminals
CN109165156B (en) Bar code testing method and device and terminal equipment
CN108763056A (en) A kind of automatic test bullet frame processing method and terminal
Zheng et al. An efficient greybox fuzzing scheme for linux-based iot programs through binary static analysis
CN110941553A (en) Code detection method, device, equipment and readable storage medium
CN107728996A (en) A kind of GIT branch managements method and device
CN102902526B (en) A kind of automation method to set up that realizes BMC and IP information by time delay
CN106649008A (en) Method and system for automatically executing mobile terminal physical startup and shutdown pressure test
CN105824749A (en) Method for analyzing abnormality of user-mode progress under linux system
CN105589778A (en) Method for automatically calculating CPU floating point operation theoretical value under linux system
CN109656763B (en) Method and system for automatically testing and activating core function of source processor
CN103902903A (en) Malicious code analyzing method and system based on dynamic sandbox environment
CN110795330A (en) Monkey pressure testing method and device
CN105302557A (en) Thread establishing and processing method and apparatus
CN104899122A (en) Mobile terminal testing system and method
CN108804328A (en) Android application compatibility test method
CN103294874A (en) Web service packaging method and system for FEKO of electromagnetic simulation computing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150325

RJ01 Rejection of invention patent application after publication