WO2020171234A1 - オフロードサーバのソフトウェア最適配置方法およびプログラム - Google Patents

オフロードサーバのソフトウェア最適配置方法およびプログラム Download PDF

Info

Publication number
WO2020171234A1
WO2020171234A1 PCT/JP2020/007255 JP2020007255W WO2020171234A1 WO 2020171234 A1 WO2020171234 A1 WO 2020171234A1 JP 2020007255 W JP2020007255 W JP 2020007255W WO 2020171234 A1 WO2020171234 A1 WO 2020171234A1
Authority
WO
WIPO (PCT)
Prior art keywords
performance
processing
offload
application
unit
Prior art date
Application number
PCT/JP2020/007255
Other languages
English (en)
French (fr)
Inventor
山登 庸次
Original Assignee
日本電信電話株式会社
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 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to US17/432,701 priority Critical patent/US11614927B2/en
Publication of WO2020171234A1 publication Critical patent/WO2020171234A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/445Exploiting fine grain parallelism, i.e. parallelism at instruction level
    • G06F8/4452Software pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/51Source to source
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present invention relates to a software optimal allocation method and program for an offload server that automatically offloads functional processing to an accelerator such as a GPU (Graphics Processing Unit).
  • an accelerator such as a GPU (Graphics Processing Unit).
  • IoT Internet of Things
  • applications for analyzing and visualizing data collected on a device side using a cloud technology via a network are appearing one after another.
  • IoT services were silo-types in which devices, networks, and applications were integrated.
  • OpenIoT which shares a device with a plurality of applications and dynamically links the resources of the cloud, network, and device, has attracted attention.
  • the GPU or FPGA can be easily used by the user's IoT application. That is, when deploying a general-purpose application such as image processing and cryptographic processing to be operated in the OpenIoT environment, it is desired that the OpenIoT platform analyze the application logic and automatically offload the processing to the GPU and FPGA.
  • CUDA (Off-load to GPU)
  • GPGPU General Purpose GPU
  • OpenCL has also appeared as a standard for uniformly handling hetero hardware such as GPU, FPGA, and many-core CPU.
  • CUDA and OpenCL perform programming by extending the C language. However, it is necessary to describe the memory copy, release, etc. between the device such as GPU and CPU, and the difficulty of the description is high. In fact, there are not many engineers who can use CUDA and OpenCL.
  • the technical specifications include OpenACC (Open Accelerator) and the like, and the compiler includes PGI compiler (registered trademark) and the like.
  • OpenACC Open Accelerator
  • PGI compiler registered trademark
  • the user specifies that the code written in the C/C++/Fortran language should be processed in parallel by the OpenACC directive.
  • the PGI compiler checks the parallelizability of the code, generates GPU and CPU execution binaries, and converts them into execution modules.
  • IBM JDK registered trademark
  • the technology such as OpenCL, CUDA, and OpenACC enables offload processing to the GPU.
  • a compiler having an automatic parallelizing function such as Intel compiler (registered trademark).
  • Intel compiler registered trademark
  • a parallelizable part such as a for statement (repeated statement) on a program is extracted, but when a GPU is used, performance often does not appear due to data transfer overhead between the CPU and GPU memory.
  • PGI registered trademark
  • IoT devices with limited computing resources require knowledge of embedded software such as assemblies when performing fine control.
  • a single board computer such as RasberryPi (registered trademark) has a limited amount of resources, Linux (registered trademark) or Java operates, so data is collected from multiple IoT devices using the RasberryPi as a GW (gateway). Developers have the freedom to control and control. However, how many IoT devices are accommodated, how the IoT device and the single board computer share the processing, etc. differ depending on the application and the usage, and it is necessary to design according to the environment.
  • Yamato "Automaticverification technology of software patches for user virtual environments on IaaS cloud,” Journal of Cloud Computing, Springer, 2015, 4:4, DOI: 10.1961/s13677-015-0028-6, Feb. 2015 .
  • Y. Yamato M. Muroi, K. Tanaka and M. Uchimura, “Development of Template Management Technology for EasyDeployment Virtual Resources on OpenStack,” Journal of Cloud Computing, Springer, 2014,I3:7, /s13677-014-0007-3, June 2014.
  • Y. Yamato "Server Selection, Configuration and Reconfiguration Technology for for IaaS Cloud with Multiple Server Types," Journal of Network and Systems Management, Springer, DOI: 10.007/s10922-017-9418-z, Aug.2017.
  • the location where the application is executed also affects performance. For example, if you want to search a suspicious person within 0.5 seconds by image analysis of IoT camera, the delay will be large if you analyze the image after uploading the data to the cloud. It is necessary to consider the processing location, such as the need for image analysis at the edge server, which is the end point of the. Further, even when the image analysis is performed by the edge server and the detailed image is sent to the cloud only when there is a suspicious person, the calculation amount and the communication traffic change depending on the processing location, so that the cost also changes.
  • the present invention has been made in view of the above circumstances, and it is an object of the present invention to provide a software optimal allocation method and program for an offload server that can adapt an application in accordance with the environment and operate the application with high performance. It is an issue.
  • the invention according to claim 1 is a software optimal allocation method of an offload server that offloads a specific process of an application to an accelerator, wherein the offload server stores the source code of the application.
  • a code conversion step for converting and a performance measurement for a verification environment that compiles the code-converted application arranges the application in an accelerator verification device, and executes a process for performance measurement when offloaded to the accelerator verification device.
  • the application is compiled and placed in the operation device after the placement location selection step of calculating the placement destination based on performance and cost and selecting the placement location, and the production environment placement.
  • An offload server software optimal allocation method is characterized by executing any one or more of the measurement test steps.
  • the application is adapted to the environment, and the GPU and FPGA are appropriately used to operate the application with high performance. be able to.
  • the software once described can be operated with high performance even in different environments.
  • the invention according to claim 2 excludes a loop statement that causes a compile error from offloading, and specifies whether to offload the loop statement that does not cause a compile error.
  • the offload pattern creation step that creates the load processing pattern and the performance measurement result repeated a predetermined number of times select the offload pattern with the highest processing performance from the multiple offload patterns and select the offload pattern with the highest processing performance.
  • the application code specifying the parallel processing designation statement in the accelerator is compiled according to each individual in the performance measuring step, and the accelerator verification device is prepared.
  • the parallel loop statements are checked first, and then the GA (Genetic Algorithm) is used for the parallel repeatable statement group to repeat the performance verification trials in the verification environment and select the appropriate area.
  • GA Genetic Algorithm
  • the placement destination environment includes an FPGA (Field Programmable Gate Array) as the accelerator, and in the offload processing designation step, from a processing structure of an application including a function block processing and a library call,
  • FPGA Field Programmable Gate Array
  • the code pattern DB a function block process and a process that can be offloaded to the FPGA including a library call are specified, and the definition information of the intermediate language corresponding to the offload from the code pattern DB is replaced with the application source code.
  • the resource ratios of the CPU and the offload destination are set so that the processing time of the CPU and the offload destination are in the same order from the processing time of the application test case. After the resource ratio is determined, the resource amount is set while keeping the resource ratio such that the processing performance of the assumed test case satisfies the required performance and the cost requirement. The method of optimal placement of the software of the offload server is used.
  • the resource amount can be set after determining the resource ratio between the CPU and the offload destination and satisfying the required performance and cost requirements.
  • a calculation amount and generated traffic at the time of deploying the application are calculated from the result of the application test case, and a link including a cloud, an edge, and a home GW (gateway) is calculated.
  • the software optimal allocation method for an offload server according to claim 1, wherein any one of the allocations with the lowest cost is calculated.
  • the invention according to claim 6 has a reconfiguration executing step of reconfiguring the software setting when the initially expected performance does not appear after the application operation starts, and in the reconfiguration executing step, the software setting In the change, the trial calculation of resource amount setting and placement location selection is performed periodically, or when the performance is below a certain threshold, a trial simulation is performed to calculate the degree of performance improvement and cost reduction. If there is a possibility that performance or cost can be improved by changing the configuration, we will propose the reconfiguration to the user, obtain the user's approval, and execute the reconfiguration. Then, the reconfiguration destination construction step to change the resource and the placement location.
  • the code conversion process is simulated cyclically or when the performance is below a certain threshold value, the code conversion is performed, and the GPU offload software is executed. If the performance and cost can be improved by changing the logic and/or changing the FPGA (Field Programmable Gate Array) hardware logic, propose the reconfiguration to the user, obtain the user's approval, and execute the reconfiguration.
  • FPGA Field Programmable Gate Array
  • the migration processing step copies the environment in which the execution file to be updated is copied, then migrates the application data
  • the migration processing step copies the environment in which the execution file to be updated is copied, then migrates the application data
  • an FPGA in which the hard logic has been configured is prepared at the migration destination and the container that controls the FPGA is migrated, or in the reconfiguration execution step, the FPGA of the relevant FPGA is migrated.
  • the invention according to claim 8 is an offload program for causing a computer to function as the offload server according to any one of claims 1 to 7.
  • each function of the offload server according to any one of claims 1 to 7 can be realized using a general computer.
  • an optimal software placement method and program for an offload server that can adapt an application according to the environment and operate the application with high performance.
  • FIG. 1 illustrates a system including an offload server according to an exemplary embodiment of the present invention. It is a functional block diagram which shows the structural example of the offload server which concerns on the said embodiment. It is a flowchart which shows the software optimal arrangement
  • FIG. 1 is a diagram showing a system including an offload server 1 according to this embodiment.
  • the system according to the present embodiment is characterized by including an offload server 1.
  • the offload server 1 is an offload server that offloads specific processing of an application to an accelerator. Further, the offload server 1 is communicatively connected to each device located in the three layers of the cloud layer 2, the network layer 3, and the device layer 4.
  • a data center (DC) 30 is provided in the cloud layer 2
  • a network edge 20 is provided in the network layer 3
  • a gateway 10 is provided in the device layer 4.
  • the offload server 1 In the system including the offload server 1 according to the present embodiment, efficiency is achieved by appropriately performing function allocation and processing offload in each of the device layer 2, the network layer 3, and the cloud layer 4. .. Mainly, the efficiency of the function allocation for arranging and processing the function in an appropriate place of three layers and the efficiency of the function processing such as image analysis by offloading to the hetero hardware such as GPU or FPGA are aimed at.
  • the cloud layer the number of servers provided with a heterogeneous HW (hardware) (hereinafter referred to as “hetoro device”) such as GPU and FPGA is increasing.
  • HW hardware
  • FPGA is also used in Bing search by Microsoft (registered trademark). In this way, by utilizing the Hetro device, for example, offloading matrix calculations and the like to the GPU and offloading specific processing such as FFT (Fast Fourier Transform) calculations to the FPGA to improve performance. Has been realized.
  • FIG. 2 is a functional block diagram showing a configuration example of the offload server 1 according to the embodiment of the present invention.
  • the offload server 1 is a device that automatically offloads specific processing of an application to an accelerator.
  • the offload server 1 includes a control unit 11, an input/output unit 12, a storage unit 13, a verification machine 14 (Verification machine) (accelerator verification device), and an operation device 15. It is configured to include.
  • the input/output unit 12 outputs a communication interface for transmitting/receiving information to/from devices belonging to the cloud layer 2, the network layer 3, and the device layer 4, an input device such as a touch panel and a keyboard, and an output from a monitor. It is composed of an input/output interface for transmitting and receiving information to and from the device.
  • the storage unit 13 includes a hard disk, a flash memory, a RAM (Random Access Memory), and the like.
  • the storage unit 13 stores a test case database (Test case database) 131, a code pattern DB 132, and an equipment resource DB 133, and a program (offload program) for executing each function of the control unit 11 and Information necessary for the processing of the control unit 11 (for example, an intermediate language file (Intermediate file) 134) is temporarily stored.
  • the performance test items are stored in the test case DB 131.
  • the test case DB 131 stores data such as price (for example, charging information of IoT service), performance (computing resource of accelerator), etc. corresponding to the performance test item.
  • the library call and the functional block of the process that can be offloaded to the FPGA and the code that describes the processing logic of the offloaded FPGA in OpenCL or HDL are registered.
  • the facility resource DB 133 stores resource information such as network and computer facilities.
  • resources such as equipment of networks and computers can be allocated.
  • the resources such as the distributed system and the storage device can be regarded as one resource by the virtualization technology, and the resources can be allocated on demand on demand when needed.
  • the verification machine 14 is a CPU/GPU/FPGA (accelerator)/IoT GW for a verification environment.
  • the verification machine 14 is used in the verification environment performed by the verification environment performance measurement unit 119, which will be described later, for performance measurement when generating an appropriate code pattern.
  • the operation device 15 is the Home GW of the user's home as the production environment, an edge router connected to it, and the like.
  • the operation device 15 is used for performance measurement after the production environment is arranged so that the production environment performance measurement test execution unit 123, which will be described later, shows how much performance actually appears.
  • the control unit 11 is an environment adaptation function unit that controls the entire offload server 1.
  • the control unit 11 is realized by, for example, a CPU (Central Processing Unit) (not shown) loading a program (offload program) stored in the storage unit 13 into a RAM and executing the program.
  • the control unit 11 includes an application code designation unit (Specify application code) 111, an application code analysis unit (Analyze application code) 112, a data transfer designation unit 113, an offload processing designation unit 114, and an offload pattern creation unit 115.
  • a measurement unit 119 an execution file creation unit 120, a production final environment deployment unit (Deploy final binary files to production environment) 121, a production environment performance measurement test extraction execution unit (Extract performance test cases) 122, and a production environment performance measurement test.
  • Execution unit (Run performance test cases automatically) 123, reconfiguration necessity periodical check unit 124, reconfiguration simulation trial calculation unit 125, reconfiguration execution unit 126, user provision unit (Provide price and performance to a user to judge) ) 127.
  • the control unit 11 executes one or more of a code conversion step, a resource amount setting step, a placement location selection step, a performance measurement step, and a performance measurement test step, which will be described later, as an environment adaptation function section.
  • ⁇ Application code designation section 111> The user specifies an application code to be operated, a test case assuming use, a desired performance and cost in the application code specifying unit 111.
  • the application code designating section 111 designates the input application code. Specifically, the application code specifying unit 111 specifies the processing function (image analysis or the like) of the service provided to the user.
  • the application code analysis unit 112 executes an application code analysis step of analyzing an application code.
  • the application code analysis unit 112 analyzes the source code of the processing function, and grasps the structure of the code such as the reference relation between the loop statement and the variable, the functional block to be processed (FFT: Fast Fourier Transform processing), and the like.
  • the data transfer designation unit 113 analyzes the reference relation of variables used in the loop statement of the application, and explicitly specifies data transfer outside the loop for data that may be transferred outside the loop. Data transfer is designated using a designated line (#pragma acc data copyin/copyout/copy(a[...]), where variable a).
  • the data transfer specifying unit 113 explicitly specifies the data transfer from the CPU to the GPU (#pragma acc data copyin (a[...])) and the data transfer from the GPU to the CPU explicitly. If the specified explicit line (#pragma acc data copyout (a[...])) and the transfer from CPU to GPU and the transfer from GPU to CPU for the same variable overlap, the round trip of data copy is specified together. Specify the data transfer using the explicit specification line (#pragma acc data copy(a[...])) that is specified explicitly.
  • the data transfer designation unit 113 issues a data transfer instruction from the CPU to the GPU, and performs a GPU processing loop on the position where the data transfer is designated. It is the highest level loop that does not include the setting and definition of the relevant variable in the statement or the loop statement above it. Further, when the variable set on the GPU program side and the variable referred to on the CPU program side overlap, the data transfer designation unit 113 gives an instruction for data transfer from the GPU to the CPU, and sets the position for designating the data transfer to the GPU.
  • the loop statement to be processed or a loop statement above it is the highest loop that does not include reference, setting, or definition of the relevant variable.
  • the offload process specifying unit 114 executes an offload process specifying step for specifying an offloadable process including a loop statement (repetition statement) of an application, a function block of a specific process, and a library call, and executes an offload process specifying step for each loop statement. , Compile by specifying the parallel processing specification statement in the accelerator.
  • the offload process designation unit 114 refers to the code pattern DB 132 from the processing structure of the application including the function block process and the library call, and refers to the process including the function block process and the library call that can be offloaded to the FPGA. Is specified, and the definition information of the intermediate language corresponding to the offload from the code pattern DB is replaced with the application source code.
  • the offload processing designation unit 114 includes an offloadable area extraction unit (Extract offloadable area) 114a and an intermediate language file output unit (Output intermediate file) 114b.
  • the offloadable part extraction unit 114a identifies a process that can be offloaded to the GPU/FPGA, such as a loop statement or FFT, and extracts an intermediate language according to the offload process.
  • the offloadable portion extraction unit 114a identifies offloadable processing such as a loop statement capable of parallel processing of application code, a functional block of FFT processing, and a library call by referring to the code pattern DB 132, and determines the offload destination. Extract intermediate languages (OpenCL etc.).
  • the intermediate language file output unit 114b outputs the extracted intermediate language file 134.
  • Intermediate language extraction is iterative to try and optimize execution, not just once, but for proper offload region search. It should be noted that the intermediate language extraction is not finished once, but is repeated (for example, 20 generations of GA, 100 trials, etc.) for execution trial and optimization for proper offload region search.
  • the offload pattern creating unit 115 executes a code conversion step that is a code conversion suitable for the placement destination environment.
  • the offload pattern creation unit 115 excludes loop statements (repeated statements) in which a compile error occurs, from being offloaded, and performs parallel processing on repeated statements in which no compile error occurs. Perform an offload pattern creation step that creates an offload pattern that specifies whether or not to do so.
  • the resource amount calculation unit 116 sets the resource amount according to the placement destination environment. Specifically, the resource amount calculation unit 116 determines the resource ratio of the CPU and the offload destination from the processing time of the application test case so that the processing time of the CPU and the offload destination are in the same order, and the resource is calculated. After the ratio is determined, the resource amount setting step of setting the resource amount is executed while keeping the resource ratio such that the processing performance of the assumed test case satisfies the required performance and the cost requirement.
  • the resource amount calculation unit 116 sets an appropriate resource amount. Specifically, the CPU processing time and the processing time of hardware other than the CPU such as GPU are analyzed in the processing time of the assumed test case acquired in the verification environment performance measurement in steps S21 and S22 of FIG. , Determine an appropriate resource ratio.
  • the resource amount calculation unit 116 determines the resource amount to be actually secured in consideration of the performance and cost desired by the user and the appropriate resource ratio. For example, it is assumed that the resource amount is an amount that satisfies the performance and cost when the vCPU core is “8” and the virtual GPU is “2”.
  • the resource amount calculation unit 116 first determines the resource ratio, and then, in consideration of the resource ratio, determines the actual resource amount to be secured.
  • the resource ratio can be set after determining the resource ratio between the CPU and the offload destination and satisfying the required performance and cost requirements.
  • the resource amount designation unit 117 designates the resource amount calculated by the resource amount calculation unit 116 in the execution file.
  • the allocation destination calculation unit 118 allocates the conversion code converted by the offload pattern generation unit 115 while securing the resource amount calculated by the resource amount calculation unit 116 and allocating the conversion destination based on performance and cost.
  • a placement location selection step of calculating and choosing a placement location is executed. Specifically, the placement destination calculation unit 118 calculates the calculation amount and generated traffic when the application is placed from the result of the application test case, models the link relationship including the cloud, the edge, and the Home GW, and calculates the application. Arrangement that maximizes processing delay and/or throughput performance, or arrangement that minimizes cost when performance is satisfied, when the cost is within the requirements when placed on a specific node. Is calculated using the linear programming method.
  • the function of the placement destination calculation unit 118 will be described with reference to FIG.
  • the placement destination calculation unit 118 sets the execution file of the code pattern (stored in the code pattern DB 132 of FIG. 2) defined in steps S21 and S22 of FIG. 4 to the resource amount defined in steps S14 and S15 of FIG.
  • the placement destination calculation unit 118 calculates the placement location where the performance and cost are appropriate, from the characteristics of the test case assumed by the application to be executed and the information in the facility resource DB 133 (see FIG. 2).
  • an edge server close to the IoT camera is specified and arranged.
  • the process may be returned to step S14 of FIG. 4 in order to readjust the resource amount and the place.
  • the verification environment performance measurement unit 119 executes a verification environment performance measurement step that is a performance measurement process when an offload pattern application is compiled, placed in the verification machine 14, and offloaded to the accelerator.
  • the verification environment performance measuring unit 119 includes a binary file arranging unit (Deploy binary files) 116a.
  • the binary file placement unit 119a deploys (places) an execution file derived from the intermediate language on the verification machine 14 for the verification environment, which is equipped with the GPU, FPGA, GW for IoT device, etc. for the verification environment.
  • the verification-environment performance measuring unit 119 is used in a verification environment equipped with a GPU or an FPGA (for example, a telecommunications carrier's laboratory) when using the verification machine 14 to perform trial and error on the GPU processing pattern of the for statement. Perform performance measurement.
  • a GPU or an FPGA for example, a telecommunications carrier's laboratory
  • the verification environment performance measuring unit 119 activates the arranged file, executes an assumed test case, measures the performance at the time of offloading, and also outputs the performance measurement result to the offloadable unit. It returns to the extraction part 114a.
  • the offloadable portion extraction unit 114a performs another offload pattern extraction, and the intermediate language file output unit 114b attempts performance measurement based on the extracted intermediate language (see the reference numeral in FIG. 4 below). e)).
  • the performance measurement in the verification environment is repeated to finally determine the code pattern to be arranged.
  • a code conversion step which is a code conversion according to the placement destination environment by the offload pattern creating unit 115, and the code-converted application by the verification environment performance measuring unit 119 are compiled and placed on the verification machine 14. Then, the performance measurement step for the verification environment when offloaded to the accelerator is repeated. That is, the verification environment performance measurement is repeated so as to repeat the code conversion.
  • Executecution file creation unit 120 selects an offload pattern having the highest processing performance from a plurality of offload patterns based on the performance measurement result repeated a predetermined number of times, compiles and executes the offload pattern having the highest processing performance. Execute the execute file creation step to create the file.
  • the production environment arranging unit 121 arranges the created execution file in the production environment for the user (“arrangement of final binary file in production environment”).
  • the production environment arranging unit 121 determines a pattern designating the final offload area, and executes a production environment arranging step of arranging (deploying) in the production environment for the user.
  • the production environment performance measurement test extraction unit 122 extracts the performance test items from the test case DB 131 after the execution file is placed (“placement of final binary file in production environment”).
  • the production environment performance measurement test execution unit 123 automatically executes the performance test items extracted by the production environment performance measurement test extraction unit 122 using the operation device 15 in order to show the performance to the user after the execution file is arranged (“final Place the binary file in the production environment").
  • the operation device 15 is a Home GW at a user's home as a production environment, an edge router connected to the Home GW, or the like.
  • the production environment performance measurement test execution unit 123 arranges the execution file in the production environment (Home GW at the user's house or the edge router connected to the production environment) and then executes the performance measurement to show the result to the user.
  • the function of the production environment performance measurement test extraction unit 122 will be described with reference to FIG.
  • the production environment performance measurement test extraction unit 122 stores the execution file of the code pattern defined in steps S21 and S22 of FIG. 4 in the commercial environment location defined in step S15 of FIG. 4 and the resource defined in step S14 of FIG. It is verified whether the operation works as expected when the quantity is secured. Specifically, the operation verification is performed using an assumed test case specified by the user and an application regression test case held in the test case DB 131. At this time, the actual performance of the assumed test case in the commercial environment is presented to the user, including the specifications and costs of all the secured resources, and the user is instructed to start the service. Start operation.
  • the reconfiguration necessity regular check unit 124 periodically checks the reconfiguration need.
  • the reconstruction simulation trial calculation unit 125 performs the trial simulation calculation of the reconstruction if there is a need for the reconstruction.
  • the function of the reconstruction simulation trial calculation unit 125 will be described with reference to FIG.
  • the reconfiguration simulation trial calculation unit 125 reconfigures the software setting and the software/hardware configuration when the initially expected performance does not appear due to a change in request characteristics in the application operation started in step S23 of FIG. ..
  • the software setting means re-changing the resource amount and the arrangement location. For example, when the processing time balance between the CPU and the GPU is poor, the resource ratio is changed or the request amount increases and the response time deteriorates. If so, keep the resource ratio and increase the amount. Or change the location to another cloud.
  • the software/hardware configuration is performed from code conversion, and if GPU can change the logic for offload processing, or if hardware logic can be changed during operation like FPGA, reconfigure hardware logic.
  • GPU can change the logic for offload processing
  • hardware logic can be changed during operation like FPGA, reconfigure hardware logic.
  • step S25 of FIG. 4 the process flow for collectively performing code conversion, resource amount adjustment, placement location adjustment, and reconfiguration during operation, which are necessary for environment adaptation, has been described, but it is also possible to cut out only the desired process. It is possible. For example, when it is desired to perform only code conversion for GPU, only steps S11 to S13 in FIG. 4 may be performed and only necessary parts such as the environment adaptation function unit 11 and the verification environment may be used.
  • the reconfiguration execution unit 126 reconfigures the software settings when the initially expected performance does not appear after the application operation starts.
  • the reconfiguration execution unit 126 includes a reconfiguration destination construction unit 126a and a migration processing unit 126b.
  • the reconfiguration destination building unit 126a When changing the software settings, the reconfiguration destination building unit 126a performs a trial simulation of resource amount setting and placement location selection periodically, or when the performance is below a certain threshold, the trial simulation is performed to improve the performance and reduce the cost.
  • the reconfiguration destination building step When there is a possibility that performance or cost can be improved by changing the amount of resources or changing the location of the resource, we propose reconfiguration to the user, obtain the user's approval, and execute the reconfiguration. Execute the reconfiguration destination building step to be changed.
  • the migration processing unit 126b executes a migration processing step of copying the migration destination environment and migrating the application execution environment from the migration source to the migration destination environment when changing the layout location.
  • the reconfiguration execution unit 126 carries out a trial simulation of the code conversion process when the performance is below a certain threshold, and performs code conversion to change the soft logic of the GPU offload or the hard logic of the FPGA. If there is a possibility that the performance or cost can be improved, the reconfiguration is proposed to the user, the user consent is obtained, and the soft logic for GPU offloading is changed when the reconfiguration is executed.
  • the migration processing unit 126b copies the environment in which the execution file to be updated is copied, then migrates the application data, and when changing the hardware logic of the FPGA, the migration processing unit 126b An FPGA with hard logic configured is prepared at the migration destination and a container or the like that controls the FPGA is migrated, or the reconfiguration execution unit 126 reconfigures the hard logic of the FPGA.
  • the user providing unit 127 presents information such as price and performance to the user based on the performance test result (“providing user with information such as price and performance”).
  • the test case DB 131 stores data such as price and performance corresponding to the performance test items.
  • the user providing unit 127 reads out data such as price and performance corresponding to the test items stored in the test case DB 131 and presents it to the user together with the performance test result.
  • the user determines to start charging and using the IoT service based on the presented information such as price and performance.
  • the existing technology of Non-Patent Document 3 may be used for the collective deployment to the production environment, and the existing technology of Non-Patent Document 4 may be used for the performance automatic test.
  • ⁇ Performance measurement> there are two types of performance measurement performed by the control unit 11 (environment adaptation function unit).
  • Performance measurement when generating an appropriate code pattern in the verification environment Performance measurement when trial and error of the GPU processing pattern of the for statement is performed in a verification environment equipped with GPU or FPGA (laborator's laboratory etc.).
  • the verification environment performance measuring unit 119 uses the verification machine 14.
  • Performance measurement to show how much performance actually appears after deploying the production environment After placing the executable file in the production environment (such as the HGW at the user's house or the edge router connected to it), the performance is measured and the result To the user.
  • the production environment performance measurement test extraction unit 122 extracts performance test items from the test case DB 131 after the execution file is arranged, and the production environment performance measurement test execution unit 123 uses the operation device 15.
  • the offload server 1 can use GA for optimization of offload.
  • the configuration of the offload server 1 when GA is used is as follows. That is, the offload processing designation unit 114 sets the number of loop statements (repeated statements) in which no compile error occurs as the gene length based on the genetic algorithm.
  • the offload pattern creation unit 115 maps the accelerator processing availability to the gene pattern by setting the accelerator processing to either 1 or 0, and the other not to 0 or 1.
  • the offload pattern creating unit 115 prepares a gene pattern of a specified number of individuals, in which each gene value is randomly created to 1 or 0, and the verification environment performance measuring unit 119 performs parallel processing in the accelerator according to each individual.
  • the application code in which the designated statement is designated is compiled and placed in the verification machine 14.
  • the verification environment performance measurement unit 119 executes performance measurement processing in the verification machine 14.
  • the verification environment performance measuring unit 119 does not compile the application code corresponding to the offload pattern and perform performance measurement. , Use the same value as the performance measurement value. Further, the verification environment performance measuring unit 119 treats the application code in which the compile error occurs and the application code in which the performance measurement does not end within the predetermined time as a timeout, and treats the performance measurement value at the predetermined time (long time). Set.
  • the execution file creation unit 120 measures the performance of all the individuals and evaluates that the shorter the processing time is, the higher the suitability is.
  • the execution file creation unit 120 selects, from all the individuals, those with a high degree of conformity higher than a predetermined value (for example, the top n% of all the numbers or the top m number n, m of all the numbers are natural numbers) as the high performance individuals. ,
  • the selected individuals are subjected to crossover and mutation processing to create next-generation individuals.
  • the execution file creation unit 120 selects the offload pattern with the highest performance as the solution after the processing for the specified number of generations is completed.
  • FIG. 3 is a flowchart showing the software optimal placement process of the offload server 1.
  • the application code analysis unit 112 of the control unit 11 analyzes the source code of the processing function of the application and grasps the structure of the code such as the loop statement, the reference relation of variables, and the functional block to be processed.
  • the offload process designating unit 114 identifies an offloadable process including a parallel processing loop statement of an application, a functional block of a specific process, and a library call.
  • the offload processing designation unit 114 compiles each loop statement by designating a parallel processing designation statement in the accelerator.
  • step S3 the offload pattern creation unit 115 performs code conversion according to the placement environment.
  • step S4 the resource amount calculation unit 116 sets the resource amount according to the placement environment. From the processing time of the application test case, the resource amount calculation unit 116 determines the resource ratio of the CPU and the offload destination so that the processing time of the CPU and the offload destination are in the same order, and after determining the resource ratio, The resource amount is set while keeping the resource ratio so that the processing performance of the assumed test case satisfies the required performance and the cost requirement.
  • step S ⁇ b>5 the placement destination calculation unit 118 performs performance when allocating the conversion code obtained by the offload pattern creation unit 115 while securing the resource amount set by the resource amount calculation unit 116 and the resource amount designation unit 117. And the placement destination is calculated based on the cost and the placement location is selected. Specifically, the placement destination calculation unit 118 calculates the calculation amount and generated traffic when the application is placed from the result of the application test case, models the link relationship including the cloud, the edge, and the Home GW to Arrangement that maximizes processing delay and/or throughput performance, or arrangement that minimizes cost when performance is satisfied, when the cost is within the requirements when placed on a specific node. Is calculated using an optimization method (for example, a linear programming method).
  • an optimization method for example, a linear programming method
  • step S6 the verification environment performance measuring unit 119 compiles the code-converted application, arranges it in the verification machine 14, and executes the performance measuring process when it is offloaded to the accelerator.
  • step S7 the control unit (environment adaptation function unit) 11 performs environment adaptation processing to execute one or more of the code conversion step, the resource amount setting step, the placement location selection step, and the performance measurement step, and then the flow of this flow is executed. The process ends.
  • FIG. 4 is a diagram showing an automatic offload process using the GA of the offload server 1.
  • the offload server 1 includes a control unit (environment adaptation function unit) 11, a test case DB 131, a code pattern DB 132, an equipment resource DB 133, an intermediate language file 134, and a verification machine 14. ,have.
  • the offload server 1 acquires an application code 130 used by the user.
  • the user uses OpenIoT resources (OpenIoT Resources) 15.
  • the OpenIoT resource 15 is, for example, an IoT GW 151 as various devices, a device 152 having a CPU-GPU, a device 153 having a CPU-FPGA, and a device 154 having a CPU.
  • the offload server 1 automatically offloads the functional processing to the accelerator of the device 152 having the CPU-GPU and the device 153 having the CPU-FPGA.
  • step S11 the application code designation unit 111 (see FIG. 2) identifies the processing function (image analysis or the like) of the service provided to the user. Specifically, the application code designating section 111 designates the input application code.
  • Step S12 Analyze application code>
  • the application code analysis unit 112 analyzes the source code of the processing function and grasps the structure such as a loop statement or FFT library call.
  • Step S13 Extract offloadable area>
  • the offload processing specification unit 114 identifies the loop statement (repeated statement) of the application, and compiles each repeated statement by specifying the parallel processing specified statement in the accelerator.
  • the offloadable unit extraction unit 114a identifies a process that can be offloaded to the GPU/FPGA, such as a loop statement or FFT, and extracts an intermediate language according to the offload process.
  • Step S14 Output intermediate file>
  • the intermediate language file output unit 114b (see FIG. 2) outputs the intermediate language file 134.
  • Intermediate language extraction is iterative to try and optimize execution, not just once, but for proper offload region search.
  • Step S15 Compile error>
  • the offload pattern creation unit 115 excludes the loop statement in which the compile error occurs from the offload target, and processes the repeated statement in which the compile error does not occur in parallel. Create an offload pattern that specifies whether or not to do so.
  • Step S21 Deploy binary files>
  • the binary file arrangement unit 119a (see FIG. 2) deploys the execution file derived from the intermediate language on the verification machine 14 including the GPU, FPGA, and IoT GW.
  • Step S22 Measure performances>
  • the verification environment performance measuring unit 119 executes the arranged file and measures the performance when the file is offloaded. In order to make the region to be offloaded more appropriate, this performance measurement result is returned to the offloadable part extraction unit 114a, and the offloadable part extraction unit 114a extracts another pattern. Then, the intermediate language file output unit 114b tries performance measurement based on the extracted intermediate language (see symbol a in FIG. 4).
  • the control unit 11 repeatedly executes the above steps S12 to S22.
  • the automatic offload function of the control unit 11 is summarized below. That is, the offload processing specification unit 114 specifies a loop statement (repetition statement) of the application, specifies a parallel processing specification statement in the GPU for each repetition statement, and compiles. Then, the offload pattern creating unit 115 creates an offload pattern that excludes a loop statement that causes a compile error from the offload target and specifies whether to perform parallel processing on the loop statement that does not cause a compile error. To do.
  • the binary file placement unit 119a compiles the application of the relevant offload pattern and places it on the verification machine 14, and the verification environment performance measurement unit 119 executes the performance measurement process on the verification machine 14.
  • the execution file creation unit 120 selects a pattern with the highest processing performance from a plurality of offload patterns based on the performance measurement result repeated a predetermined number of times, and compiles the selected pattern to create an execution file.
  • Step S23 Deploy final binary files to production environment>
  • the production environment placement unit 121 determines a pattern designating the final offload area and deploys it in the production environment for the user.
  • Step S24 Extract performance test cases and run automatically>
  • the production environment performance measurement test extraction unit 122 extracts performance test items from the test case DB 131 to automatically show the performance to the user after the execution file is placed, and automatically executes the extracted performance test.
  • Step S25 Provide price and performance to a user to judge>
  • the user providing unit 127 presents information such as price and performance to the user based on the performance test result.
  • the user determines to start charging and using the IoT service based on the presented information such as price and performance.
  • steps S11 to S25 are performed in the background of the user's use of the IoT service, and are assumed to be performed, for example, during the first day of provisional use. Further, the processing performed in the background for cost reduction may be targeted only for the functional layout optimization and the GPU/FPGA offload.
  • control unit 11 of the offload server 1 extracts the area to be offloaded from the source code of the application used by the user and sets the intermediate language in order to offload the functional processing. It is output (steps S11 to S15).
  • the control unit 11 arranges and executes the execution file derived from the intermediate language on the verification machine 14 to verify the offload effect (steps S21 to S22). After repeating the verification and defining an appropriate offload area, the control unit 11 arranges (deploys) the execution file in the production environment that is actually provided to the user and provides it as a service (steps S23 to S25).
  • the GPU automatic offload is a process for repeating steps S12 to S22 of FIG. 4 for the GPU and finally obtaining an offload code to be deployed in step S23.
  • GPU is generally a device that does not guarantee latency, but is suitable for increasing throughput by parallel processing.
  • IoT There are various kinds of applications operated by IoT. Typical examples are IoT data encryption processing, image processing for camera image analysis, machine learning processing for large amount sensor data analysis, etc., and these are often repeated. Therefore, we aim to speed up by automatically offloading repeated statements of the application to the GPU.
  • an appropriate offload area is automatically extracted from a general-purpose program that is not supposed to be parallelized. For this reason, first, the parallelizable for statement is checked, and then the GA is used for the parallelizable for statement group to repeat the performance verification trial in the verification environment to search for an appropriate area.
  • FIG. 5 is a diagram showing a search image of the control unit (environment adaptation function unit) 11 by Simple GA.
  • FIG. 5 shows a processing search image and gene sequence mapping of a for sentence.
  • GA is one of the combinatorial optimization methods that imitates the evolution process of living things.
  • the flow chart of GA is initialization ⁇ evaluation ⁇ selection ⁇ crossover ⁇ mutation ⁇ end determination.
  • Simple GA which is a simplified process, is used.
  • Simple GA is a simplified GA in which only 1 and 0 genes are used and roulette selection, one-point crossover, and mutation reverse the value of one gene.
  • the parallelizable for statements are mapped to the gene array. It is set to 1 when GPU processing is performed, and is set to 0 when GPU processing is not performed.
  • a gene prepares a designated number M of individuals, and randomly assigns 1 and 0 to one for sentence.
  • the control unit (environmental adaptation function unit) 11 acquires an application code (Application code) 130 (see FIG. 4) used by the user, and as shown in FIG. Whether or not the for statement can be parallelized is checked from the code patterns 141 of 130. As shown in FIG. 5, when five for statements are found from the code pattern 141 (see the reference numeral c in FIG.
  • the deployment and performance measurement are performed (see reference numeral d in FIG. 5). That is, the verification environment performance measuring unit 119 (see FIG. 2) compiles a code corresponding to a gene, deploys it on the verification machine 14, and executes it.
  • the verification environment performance measurement unit 119 performs benchmark performance measurement. Increase the fitness of genes with good performance patterns (off-road patterns).
  • ⁇ Select> high performance code patterns are selected based on the compatibility (see symbol e in FIG. 5).
  • the verification environment performance measuring unit 119 selects a designated number of high fitness genes based on the fitness. In this embodiment, roulette selection and elite selection of the highest fitness gene are performed according to the fitness. In FIG. 5, it is shown as a search image that the number of circles ( ⁇ ) in the selected code patterns 142 is reduced to three.
  • ⁇ Cross> In the crossover, some genes are exchanged at a certain point among the selected individuals at a constant crossover rate Pc to create offspring individuals.
  • Mutation changes each value of an individual's gene from 0 to 1 or from 1 to 0 with a constant mutation rate Pm.
  • Pm constant mutation rate
  • ⁇ End judgment> As shown in FIG. 5, generation of next generation code patterns after crossover and mutation is performed (see symbol f in FIG. 5). In the termination determination, the process is terminated after repeating the designated number of generations T times, and the gene having the highest fitness is set as the solution. For example, the performance is measured and three fast 10010, 01001, and 00101 are selected. The three generations are recombined by the GA in the next generation to create a new pattern (off-road pattern) 10101 (one example), for example. At this time, a mutation such as 0 is arbitrarily added to the recombined pattern. Repeat the above to find the fastest pattern. A designated generation (for example, 20 generations) is determined, and the pattern remaining in the final generation is set as the final solution.
  • a designated generation for example, 20 generations
  • a code pattern having a gene length corresponding to the number of for sentences has been obtained.
  • offload patterns 10010, 01001, 00101,... are randomly assigned.
  • an error may occur even though it is a for statement that can be offloaded.
  • the for statement has a hierarchy (GPU processing can be performed by specifying either one).
  • the for statement that caused the error may be left.
  • the verification machine 14 It is deployed on the verification machine 14 and benchmarked, for example, in the case of image processing, benchmarked by the image processing.
  • the reciprocal of the processing time is set to 1 for the processing time of 10 seconds, 0.1 for the processing time of 100 seconds, and 10 for the processing time of 1 second.
  • a code having a high degree of fitness is selected, for example, 3 to 5 out of 10 are selected and recombined to create a new code pattern.
  • the same thing as before may be possible. In this case, we don't need to do the same benchmark, so we use the same data as before.
  • the code pattern and its processing time are stored in the storage unit 13.
  • FIG. 6 and FIG. 7 are diagrams showing the loop statements of the source code of the application processed by the environment adaptation function unit of the present embodiment, in the case where the variables defined on the CPU program side and the variables referred to on the GPU program side overlap.
  • the control unit (environment adaptation function unit) 11 (see FIG. 2) of the present embodiment includes a data transfer designation unit 113.
  • FIG. 6 is an example of a case where a variable defined on the CPU program side and a variable referred to on the GPU program side overlap in a loop statement when data is transferred from the CPU to the GPU.
  • the loop statement of this embodiment shown in FIG. 6 is described on the CPU program side, (1) Loop [for
  • a data transfer instruction line here, #pragma acc data copyin(a[...]) of the copyin clause of the variable a is inserted at the position indicated by reference sign m in FIG.
  • the above #pragma acc data copyin(a[...]) is specified in the highest loop (here, in (1) loop [for
  • the insertion position is immediately before a loop such as for, do, while (here, before (2) loop [for
  • setting is included to consider the case where the setting is executed or not by an if statement etc. Also, what includes “definition” on the CPU side in the condition is a guard for not expanding outside the scope of the variable.
  • Global variables may be "referenced” outside the analysis source, so they are included in the condition.
  • FIG. 7 is an example of a case where a variable defined on the CPU program side and a variable referred to on the GPU program side overlap in a loop statement when data is transferred from the GPU to the CPU.
  • the loop statement of the present embodiment shown in FIG. 7 is described on the CPU program side, (1) Loop [for
  • #pragma acc data copyout (a[...]) in the copyout clause of the variable a is inserted at the position indicated by reference numeral n in FIG.
  • the above #pragma acc data copyout(a[...]) is specified in the top-level loop (here, in (1) loop [for
  • #pragma acc data copy (a[...]) is inserted in place of #pragma acc data copyin(a[...]) in the loop statement of the present embodiment shown in FIG.
  • the above #pragma acc data copy(a[...]) is specified in the top-level loop (here, in (1) loop [for
  • the insertion position is immediately before a loop such as for, do, while (here, before (2) loop [for
  • the number of loops is investigated by using a profiling tool as a pre-stage of full-scale offload processing search.
  • a profiling tool By using a profiling tool, the number of executions of each line can be investigated, so that a program having a loop of 50 million times or more can be distributed in advance, for example, as a target of offload processing search.
  • a specific description will be made (partly overlapping the content described in FIG. 5).
  • an application that searches the offload processing unit is analyzed to understand loop statements such as for, do, and while.
  • sample processing is executed, the number of loops of each loop statement is investigated using a profiling tool, and whether or not the offload processing section search is to be performed in earnest depends on whether there is a loop with a certain value or more. Whether or not.
  • the parallelizable loop statement is mapped to the gene sequence as 1 when the GPU processing is performed and 0 when it is not processed.
  • the gene a designated number of individuals are prepared, but 1,0 is randomly assigned to each value of the gene.
  • the code corresponding to the gene is compiled, deployed on the verification machine and executed, and the benchmark performance is measured. Increase the goodness of fit of genes with good performance patterns.
  • the code corresponding to the gene has the parallel processing instruction line and the data transfer instruction line (see, for example, symbol 1 in FIG. 6 and symbol m in FIG. 7) inserted therein.
  • the designated number of individuals with high fitness is selected based on the fitness.
  • roulette selection and elite selection of the highest fitness gene are performed according to the fitness.
  • the crossover step some genes are exchanged at a certain point among the selected individuals at a constant crossover rate Pc to create offspring individuals.
  • each value of the gene of the individual is changed from 0 to 1 or 1 to 0 at a constant mutation rate Pm.
  • the process is terminated after repeating the designated number of generations, and the gene with the highest fitness is determined as the solution.
  • the code pattern with the highest performance corresponding to the gene with the highest fitness is re-deployed in the production environment and provided to the user.
  • control unit 11 of the offload server 1 shown in FIG. 2 will be described below with reference to FIG. ⁇ Off-road for FPGA>
  • the speedup has been centered on parallel processing such as loop statements.
  • FPGA it is general to use parallel processing and pipeline processing to increase the speed, and the degree of freedom of offload is high, but it is difficult for a machine to automatically generate logic for offload. The current situation. Therefore, in FPGA offloading, the know-how (Well-known pattern) accumulated by programmers is utilized to offload in large units.
  • the FFT process is performed. Offload is performed by replacing the FPGA logic already defined in the process.
  • the code pattern DB 132 registers a library call and a functional block of processing that can be offloaded to the FPGA, and a code that describes the processing logic of the FPGA to be offloaded in OpenCL or HDL.
  • the control unit (environmental adaptation function unit) 11 collates the code analysis result with the code pattern DB 132, and replaces the offloadable process with a process logic description that is offloaded to the FPGA.
  • ⁇ Resource amount adjustment> Regarding the resource amount adjustment in steps S14 and S15 of FIG. 4, first, an appropriate resource ratio is determined, and then, the resource amount that meets the performance and cost requirements is set. Assuming that the code is offloaded to run the application on the CPU and the GPU and converted in steps S11 to S13 in FIG. 4, even if the code itself is appropriate, the amount of resources between the CPU and the GPU that is the offload destination is appropriate. If the balance is not right, performance will not be achieved. For example, when performing a certain process, when the processing time of the CPU is 1000 seconds and the processing time of the GPU is 1 second, the CPU becomes a bottleneck.
  • Non-Patent Document 2 while performing processing with a MapReduce framework using a CPU and a GPU, a Map task is distributed so that the execution times of the CPU and the GPU are the same, thereby improving overall performance.
  • the resource amount calculation unit 116 determines the CPU and offload from the processing time of the assumed test case in order to avoid an arrangement in which the processing by any hardware becomes a bottleneck.
  • the resource ratio is determined so that the previous processing times are of the same order.
  • the resource amount calculation unit 116 keeps the resource ratio so that the processing performance of the assumed test case satisfies the required performance and the cost requirement designated by the user in steps S14 and S15 of FIG. Determine the resource amount.
  • ⁇ Adjustment of placement location> In the placement location adjustment of step S15 of FIG. 4, the location where the performance and cost are appropriate is calculated and the placement destination is determined. As a method of determining an appropriate placement destination, a method using optimization calculation is used. Information for determining the placement destination includes performance information (processing delay and throughput) of the test case assumed by the application to be placed, facility resource information that can be used in the system (computing resources such as cloud, edge, Home GW, and inter-node). There is a band, and the amount already used, and the cost of using it.
  • the logic for deciding the location is as follows. From the performance results of the assumed test case, calculate the amount of traffic and generated traffic when deploying the application. At the same time, link relationships such as cloud, edge, and home GW are modeled. When an application is placed on a specific node, the cost is kept within the required conditions, with the constraint that performance is maximized such as processing delay and throughput, or the cost is the lowest when the required conditions are met.
  • the placement is derived using an optimization method (for example, a linear programming method).
  • optimization method for example, a linear programming method
  • step S23 of FIG. 4 After the execution file determined in steps S12 and S13 of FIG. 4 is placed in the designated location of step S15 of FIG. 4 with the designated resource amount of step S14 of FIG. It is confirmed by executing the performance verification test case and the regression test case.
  • the assumed test case specified by the user is performed using a test automatic execution tool such as Jenkins, and the processing time, throughput, etc. are measured.
  • an automatic verification technique (see Non-Patent Document 3) that acquires information about software such as middleware and OS installed in the system and executes the corresponding regression test using Jenkins or the like is used.
  • the processing time and throughput of the performance verification test case and the information of the execution result of the regression test are presented to the user.
  • the user is also presented with the secured resources (such as the virtual machine specifications and the number) and the price thereof, and the user judges the start of operation by referring to the information.
  • the reconfiguration simulation trial calculation unit 125 reconfigures the software setting and the software/hardware configuration. Constitute. The determination of reconfiguration is based on the test case that matches the current actual operation, not the test case assumed before the start of operation, and the code conversion, resource amount adjustment, and placement location adjustment of steps S11-S15 of FIG. 4 are tried.
  • the user providing unit 127 proposes the reconfiguration to the user, and after the user approves, the reconfiguration is performed.
  • the reconfiguration is performed by the reconfiguration destination construction unit 121a (see FIG. 2) of the reconfiguration execution unit 126.
  • the migration destination environment is duplicated using the batch provisioning technology (method using OpenStack Heat, etc. (see Non-Patent Document 4), and migration is performed from the migration source.
  • the migration processing unit 126b (see FIG. 2) of the reconstruction executing unit 126 performs this. If the shared disk can be used for changing the location, live migration is performed to migrate virtual machines supported by OpenStack. In addition, when the location is changed significantly and the disk information is migrated, the block migration is performed. Since hardware such as GPU is often controlled by a container instead of a virtual machine, migration is performed using a container management technology such as LXD when the container is migrated.
  • the software/hardware configuration is changed by simulating the processing of steps S12 and S13 of FIG. 4 cyclically or when the performance is below a certain threshold, converting the code, and executing the GPU offload soft logic. If there is a possibility that the performance or cost can be improved by the change or the change of the FPGA hard logic, a reconfiguration is proposed to the user (see Non-Patent Document 5). When the user consent is obtained and the reconfiguration is executed, if the software logic for GPU offloading is changed, or if the software configuration is changed, after copying the environment in which the execution file to be updated is copied, the application is running. Migrate your data.
  • ⁇ Change hard logic> When changing hard logic such as FPGA when executing reconfiguration, a method of preparing FPGA with hard logic configured in the migration destination and migrating data during application execution, as in the case of changing software configuration And a method for reconfiguring the FPGA hard logic during operation.
  • the hardware logic configuration of FPGA can be reconfigured in a unit of several seconds during operation by using the tools of recent Altera and Xilinx.
  • the hardware logic change is that when both SQL DB and No SQL DB are operated, there were initially many SQL requests, but when No SQL requests increased more than a certain number, FPGA that accelerates No SQL. To reconfigure logic.
  • the application code when there is a request to use the application, first the application code is analyzed to discover the for statement and grasp the program structure such as variable data used in the for statement.
  • the application code For syntax analysis, use LLVM/Clang syntax analysis library (python binding of libClang).
  • a is the gene length.
  • Gene 1 corresponds to a parallel processing directive and 0 corresponds to nothing, and the application code is mapped to the gene of length a.
  • a gene sequence with a designated number of individuals is prepared. Each value of the gene is created by randomly assigning 0 and 1 as described in FIG. Depending on the prepared gene sequence, if the gene value is 1, insert the directive #pragma acc kernels that specifies parallel processing into the C/C++ code. At this stage, the part of the code corresponding to a gene to be processed by the GPU is determined. Based on the reference relation of the variable data in the for statement analyzed by the above Clang, the data transfer from the CPU to the GPU and the directive specification in the opposite case are performed based on the above-mentioned rule. Specifically, the variable that requires data transfer from the CPU to the GPU is specified by #pragma acc data copyin (see Fig.
  • the fitness of each gene sequence is set for the total number of individuals according to the benchmark processing time.
  • the individuals to be left are selected according to the set fitness.
  • GA processing such as crossover processing, mutation processing, and copy processing is performed on the selected individuals to create a next-generation population of individuals.
  • the code with the directive that corresponds to the gene array with the highest performance is taken as the solution.
  • the number of individuals, the number of generations, the crossover rate, the mutation rate, the fitness setting, and the selection method are GA parameters and are specified separately.
  • FIGS. 8A and 8B are flowcharts for explaining the operation outline of the above-described implementation, and FIGS. 8A and 8B are connected by a connector.
  • step S101 the application code analysis unit 112 (see FIG. 2) analyzes the code of the application.
  • step S102 the offload process designating unit 114 (see FIG. 2) identifies the loop statement, reference relationship, and functional block of the application.
  • step S103 the offload processing designation unit 114 checks the parallel processing possibility of each loop statement.
  • Step S105 the offload processing designation unit 114 designates the pipeline processing in the intermediate language and compiles each loop statement. Parallel processing is one of the pipeline processing.
  • step S106 the offload process designation unit 114 excludes the loop statement from the target when an error occurs.
  • step S108 the offload processing designation unit 114 counts the number of loop statements and the number of functional blocks in which no compilation error occurs, and sets the count as the gene length.
  • the offload processing designation unit 114 prepares a gene array of the designated number of individuals. Here, 0 and 1 are randomly assigned and created.
  • the offload processing designation unit 114 maps the application code to a gene and prepares the designated pattern number. Depending on the prepared gene sequence, when the gene value is 1, a directive designating parallel processing is inserted into the code (see, for example, the #pragma directive in FIG. 5B).
  • the control unit (environmental adaptation function unit) 11 repeats the specified number of generations for the processes of steps S111 to S118 between the loop start end of step S110 and the loop end end of step S118. Further, in the repetition of the designated number of generations, the designated number of individuals is further repeated between the loop start end in step S111 and the loop end end in step S115. That is, in the designated number of generations, the designated number of repetitions are processed in a nested state.
  • step S112 the data transfer designation unit 113 creates an intermediate language of the application in which data transfer is designated based on the variable reference relationship, parallelism, pipeline processing, and offloading of functional blocks are designated in a specific pattern.
  • step S112 common processing is performed until the loop statement is specified, and then processing corresponding to a functional block such as GPU, FPGA, pipeline processing, or FFT processing is performed.
  • a functional block such as parallel processing in the case of GPU, parallel processing or pipeline processing in the case of FPGA, and FFT processing, an offload intermediate language is created.
  • step S113 the verification environment performance measuring unit 119 (see FIG. 2) arranges the execution file in the verification machine 14 equipped with the CPU-GPU based on the intermediate language.
  • step S114 the verification environment performance measuring unit 119 executes the arranged binary file and measures the test case performance.
  • step S116 the execution file creation unit 120 (see FIG. 2) evaluates the pattern such that the shorter the processing time is, the higher the matching degree is, and selects the pattern having the higher performance.
  • step S117 the execution file creation unit 120 performs crossover and mutation processing on the selected pattern to create a next-generation pattern.
  • GA processing such as crossover processing, mutation processing, and copy processing is performed on the selected individuals to create a next-generation population of individuals.
  • step S119 the execution file creation unit 120 sets the code corresponding to the highest performance gene sequence (highest performance offload pattern) as a solution after the GA processing for the specified number of generations is completed.
  • the GA parameters may be set as follows, for example.
  • the parameters and conditions of Simple GA to be executed can be as follows, for example.
  • Gene length Number of parallel loop statements
  • Individual number M Gene length or less Generation number
  • T Gene length or less
  • Fitness (Processing time) (-1/2)
  • the shorter the benchmark processing time the higher the degree of conformity.
  • the goodness of fit to the power of (-1/2) it is possible to prevent the goodness of fit of a specific individual having a short processing time from becoming too high and narrowing the search range.
  • the adaptability is calculated assuming that the processing time is 1000 seconds or the like (long time). This timeout time may be changed according to the performance measurement characteristics. Selection: Roulette selection However, the highest fitness gene in the generation is not crossed or mutated, and the elite preservation is preserved in the next generation. Crossover rate Pc: 0.9 Mutation rate Pm: 0.05
  • ⁇ Cost performance> Describe the cost performance of the automatic offload function.
  • the price of a machine equipped with a GPU is about twice that of a machine having only a normal CPU.
  • the cost of hardware and system development is less than 1/3
  • the operating cost such as electricity bill, maintenance and operation system is over 1/3
  • other costs such as service order. Is about 1/3.
  • ⁇ Time to start using the production service The time required to start using the production service will be described. If the performance measurement once from compilation is about 3 minutes, it takes about 20 hours to search for a solution with 20 individuals and 20 generations of GA, but the same gene pattern compilation and measurement as before are omitted. It will be finished in less than 8 hours. In many cloud, hosting and network services, it takes about half a day to start using the service. In this embodiment, for example, automatic offloading within half a day is possible. Therefore, if automatic offloading within half a day allows trial use at the beginning, it can be expected that user satisfaction will be sufficiently increased.
  • the GA is performed with a small number of individuals and a small number of generations, but the crossover rate Pc is set to a high value of 0.9 to search a wide range so that a solution with a certain level of performance can be found quickly. ing.
  • the offload server 1 includes the application code analysis unit 112 that analyzes the source code of the application, the loop statement that enables parallel processing of the application, and the functional block of the specific processing. , An offload processing specification unit 114 that specifies an offloadable process including a library call, an offload pattern creation unit 115 (code conversion unit) that performs code conversion according to the placement destination environment, and a code-converted application. A verification environment performance measurement unit 119 that compiles and allocates the verification machine 14 to the verification machine 14 and executes the performance measurement process when offloaded to the verification machine 14, and repeats the resource amount according to the allocation destination environment.
  • the placement destination calculation unit 118 that calculates the placement destination and selects the placement location, and the performance test item that the production environment performance measurement test extraction unit 122 extracts after the execution file placement is automatically executed using the operation device 15.
  • Environmental performance measurement test execution unit 123 and control unit 11 that performs environment adaptation processing that executes one or more of a code conversion step, a resource amount setting step, a placement location selection step, a performance measurement step, and a performance measurement test step. (Environmental adaptation function unit).
  • the offload process designating unit 114 sets the number of loop statements in which no compilation error occurs based on the genetic algorithm as the gene length, and the offload pattern creating unit sets 1 or 0 when performing the accelerator process. If either or not is set as 0 or 1 of the other, whether accelerator processing is possible or not is mapped to a gene pattern, and each gene value is randomly created to be 1 or 0.
  • the performance measuring unit 119 compiles the application code specifying the parallel processing designation statement in the accelerator according to each individual, arranges it in the verification machine 14, and executes the performance measurement processing in the verification machine 14.
  • the execution file creation unit 120 measures the performance of all individuals and evaluates that the shorter the processing time is, the higher the fitness is, and the performance of the individuals whose fitness is higher than a predetermined value is high. After selection as an individual, crossover and mutation processing is performed on the selected individual, a next-generation individual is created, and after the processing of a specified number of generations is completed, the highest performance offload pattern is selected as a solution.
  • the placement destination environment includes an FPGA
  • the offload processing designation unit 114 refers to the code pattern DB from the processing structure of the application including the function block processing and the library call to execute the function block processing and the library call.
  • a process that can be offloaded to the included FPGA is specified, and the definition information of the intermediate language corresponding to the offload from the code pattern DB is replaced with the application source code.
  • the resource amount designation unit 117 determines the resource ratio of the CPU and the offload destination so that the processing time of the CPU and the offload destination are in the same order from the processing time of the application test case, and the resource ratio is set. After determining, the resource amount is set while keeping the resource ratio so that the processing performance of the assumed test case satisfies the required performance and the cost requirement.
  • the resource amount can be set after determining the resource ratio between the CPU and the offload destination and satisfying the required performance and cost requirements.
  • the placement destination calculation unit 118 calculates the calculation amount and generated traffic when the application is placed from the result of the application test case, models the link relation including the cloud, edge, and Home GW, and Arrangement that maximizes processing delay and/or throughput performance, or arrangement that minimizes cost when performance is satisfied, when the cost is within the requirements when placed on a specific node. Is calculated using the linear programming method.
  • the reconfiguration execution unit 126 that reconfigures the software settings when the originally expected performance is not provided.
  • the application execution environment can be migrated when the user is offered a reconfiguration and the user's approval is obtained.
  • the reconfiguration execution unit 126 performs a trial simulation of the code conversion process when the performance is below a certain threshold, or performs code conversion to change the soft logic of the GPU offload or the FPGA. If it is possible to improve the performance or cost by changing the hard logic of the above, we suggest the reconfiguration to the user, obtain the user's approval, and change the soft logic to offload the GPU when executing the reconfiguration. To do.
  • the migration processing unit 126b copies the environment in which the execution file to be updated is copied, then migrates the application data, and when changing the hardware logic of the FPGA, the migration processing unit 126b An FPGA having hard logic configured is prepared at the migration destination and a container or the like that controls the FPGA is migrated, or the reconfiguration execution unit reconfigures the hard logic of the FPGA.
  • all or part of the processes described as being automatically performed may be manually performed, or the processes described as being manually performed may be performed. All or part of the process can be automatically performed by a known method.
  • the processing procedures, control procedures, specific names, and information including various data and parameters shown in the above-mentioned documents and drawings can be arbitrarily changed unless otherwise specified.
  • each component of each device shown in the drawings is functionally conceptual and does not necessarily have to be physically configured as shown. That is, the specific form of distribution/integration of each device is not limited to that shown in the figure, and all or part of the device may be functionally or physically distributed/arranged in arbitrary units according to various loads and usage conditions. It can be integrated and configured.
  • each of the above-mentioned configurations, functions, processing units, processing means, etc. may be realized in hardware by designing a part or all of them with, for example, an integrated circuit.
  • the above-described respective configurations, functions and the like may be realized by software for a processor to interpret and execute programs for realizing the respective functions.
  • Information such as programs, tables, and files that realize each function is stored in memory, hard disk, recording devices such as SSD (Solid State Drive), or IC (Integrated Circuit) cards, SD (Secure Digital) cards, optical discs, etc. It can be held on a recording medium.
  • the method of the genetic algorithm is used in order to make it possible to find the solution of the combinatorial optimization problem during the limited optimization period. It may be something like this.
  • local search local search method
  • dynamic programming dynamic programming
  • the OpenACC compiler for C/C++ is used, but any one can be used as long as it can offload the GPU processing.
  • Java lambda (registered trademark) GPU processing or IBM Java 9 SDK (registered trademark) may be used.
  • IBM (registered trademark) provides a JIT compiler that offloads parallel processing description in lambda format to the GPU. In Java, similar offloading is possible by using these to perform tuning in GA for whether or not the loop processing is in the lambda format.
  • the for statement is exemplified as the repeated statement (loop statement), but a while statement and a do-while statement other than the for statement are also included.
  • the for statement that specifies the loop continuation condition is more suitable.
  • Offload Server 11 Control Unit 12 Input/Output Unit 13 Storage Unit 14 Verification Machine (Accelerator Verification Device) 15 Operation Device 15 OpenIoT Resource 111 Application Code Designation Part 112 Application Code Analysis Part 113 Data Transfer Designation Part 114 Offload Processing Designation Part 114a Offloadable Part Extraction Part 114b Intermediate Language File Output Part 115 Offload Pattern Creation Part 116 Resource Quantity Calculation Department (Resource amount setting department) 117 Resource amount specification unit (Resource amount setting unit) 118 Placement destination calculation unit (placement location selection unit) 119 Performance measurement unit for verification environment 120 Execution file creation unit 121 Production environment placement unit 122 Production environment performance measurement test extraction unit 123 Production environment performance measurement test execution unit 124 Reconfiguration necessity periodic check unit 125 Reconfiguration simulation trial calculation unit 126 Reconfiguration Execution unit 126a Reconfiguration destination construction unit 126b Migration processing unit 127 User provision unit 130 Application code 131 Test case DB 132 code pattern DB 133 equipment resource DB 134 Intermediate Language File 151 Device with Io

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Debugging And Monitoring (AREA)

Abstract

【課題】アプリケーションを環境に合わせて適応させるとともに、高性能にアプリケーションを動作させる。 【解決手段】配置先環境に合わせたコード変換をするオフロードパターン作成部115と、コード変換されたアプリケーションをコンパイルして、検証用マシン14に配置し、検証用マシン14にオフロードした際の性能測定用処理を実行する検証環境用性能測定部119と、を反復し、実行ファイル配置後、本番環境性能測定テスト抽出部122が抽出した性能試験項目を、運用装置15を用いて自動実行する本番環境性能測定テスト実行部123と、コード変換ステップ、リソース量設定ステップ、配置場所選択ステップ、性能測定ステップ、性能測定テストステップのいずれか一つ以上のステップを実行する環境適応処理を行う制御部11と、を備える。

Description

オフロードサーバのソフトウェア最適配置方法およびプログラム
 本発明は、機能処理をGPU(Graphics Processing Unit)等のアクセラレータに自動オフロードするオフロードサーバのソフトウェア最適配置方法およびプログラムに関する。
 近年、IoT(Internet of Things)技術が進展しており、デバイス側で収集したデータをネットワークを介してクラウド技術を用いて分析し可視化するといったアプリケーションが続々と出現している。
 従来IoTのサービスは、デバイスからネットワーク、アプリケーションまで一体構築されたサイロ型が多かった。しかし、よりコストを下げ多様なサービスを提供するため、デバイスを複数アプリケーションで共有し、クラウド、ネットワーク、デバイスのリソースをダイナミックに連携してサービス化するOpenIoTの概念が注目されている。
 OpenIoTでは、街中の複数団体が持つ監視カメラを共有し、迷子の探索やテロリストの発見等、複数の用途に使うことが期待される。しかし、この例で、カメラ映像の画像処理を複数の用途で用いることは、デバイス側、クラウド側のどこで分析するとしても、CPU計算リソースが膨大になる。
 一方、近年、IoT等多彩な分野に対応するため、CPU以外のヘテロな計算リソースを用いることが増えている。例えば、GPU(Graphics Processing Unit)(アクセラレータ)を強化したサーバで画像処理を行ったり、FPGA(Field Programmable Gate Array)(アクセラレータ)で信号処理をアクセラレートすることが始まっている。Amazon Web Services (AWS)(登録商標)では、GPUインスタンス、FPGAインスタンスが提供されており、オンデマンドにそれらリソースを使うこともできる。Microsoft(登録商標)は、FPGAを用いて検索を効率化している。
 OpenIoT環境では、サービス連携技術等を用いて、多彩なアプリケーションの創出が期待されるが、更に進歩したハードウェアを生かすことで、動作アプリケーションの高性能化が期待できる。しかし、そのためには、動作させるハードウェアに合わせたプログラミングや設定が必要である。例えば、CUDA(Compute Unified Device Architecture)、 OpenCL(Open Computing Language)といった多くの技術知識が求められ、ハードルは高い。
 GPUやFPGAをユーザのIoTアプリケーションで容易に利用できるようにするため下記が求められる。すなわち、動作させる画像処理、暗号処理等の汎用アプリケーションをOpenIoT環境にデプロイする際に、OpenIoTのプラットフォームがアプリケーションロジックを分析し、GPU、FPGAに自動で処理をオフロードすることが望まれる。
(GPUへのオフロード)
 GPUの計算能力を画像処理以外にも使うGPGPU(General Purpose GPU)のための開発環境CUDAが発展している。CUDAは、GPGPU向けの開発環境である。また、GPU、FPGA、メニーコアCPU等のヘテロハードウェアを統一的に扱うための標準規格としてOpenCLも登場している。
 CUDAやOpenCLでは、C言語の拡張によるプログラミングを行う。ただし、GPU等のデバイスとCPUの間のメモリコピー、解放等を記述する必要があり、記述の難度は高い。実際に、CUDAやOpenCLを使いこなせる技術者は数多くはいない。
 簡易にGPGPUを行うため、ディレクティブベースで、ループ文等の並列処理すべき個所を指定し、ディレクティブに従いコンパイラがデバイス向けコードに変換する技術がある。技術仕様としてOpenACC(Open Accelerator)等、コンパイラとしてPGIコンパイラ(登録商標)等がある。例えば、OpenACCを使った例では、ユーザはC/C++/Fortran言語で書かれたコードに、OpenACCディレクティブで並列処理させる等を指定する。PGIコンパイラは、コードの並列可能性をチェックして、GPU用、CPU用実行バイナリを生成し、実行モジュール化する。IBM JDK(登録商標)は、Java(登録商標)のlambda形式に従った並列処理指定を、GPUにオフロードする機能をサポートしている。これらの技術を用いることで、GPUメモリへのデータ割り当て等を、プログラマーは意識する必要がない。
 このように、OpenCL、CUDA、OpenACC等の技術により、GPUへのオフロード処理が可能になっている。
 しかし、GPU処理は行えるようになっても、高速化には課題が多い。マルチコアCPU向けには、例えば、Intelコンパイラ(登録商標)等の自動並列化機能を持つコンパイラがある。自動並列化時は、プログラム上のfor文(繰り返し文)等の並列可能部を抽出するが、GPUを用いる場合は、CPU-GPUメモリ間のデータ転送オーバヘッドのため性能が出ないことも多い。GPUを用いて高速化する際は、スキル者が、CUDAでのチューニングや、PGI(登録商標)コンパイラ等で適切な並列処理部を探索することが必要になっている(非特許文献1参照)。
 このため、スキルが無いユーザがGPUやFPGAを使ってアプリケーションを高性能化することは難しいし、自動並列化技術等を使う場合も並列処理可否の試行錯誤や高速化できない場合があった。
 IoTデバイスに関しては、計算リソース等が限られているIoTデバイスでは、細かい制御を行う際は、アセンブリ等の組み込みソフトウェアの知識が必要になるのが現状である。Rasberry Pi(登録商標)等のシングルボードコンピュータでは、リソース量は限られるものの、Linux(登録商標)やJava等が動作するため、Rasberry PiをGW(gateway)として複数のIoTデバイスからデータを収集したり制御したりする等の自由度が開発者に出てくる。しかし、IoTデバイスを何台収容するかや、IoTデバイスとシングルボードコンピュータでどのように処理を分担するか等は、アプリケーション、利用形態によって異なり、環境に合わせた設計が必要である。
Y. Yamato, T. Demizu, H. Noguchi and M. Kataoka, "Automatic GPU Offloading Technology for Open IoT Environment," IEEE Internet of Things Journal, DOI: 10.1109/JIOT.2018.2872545, Sep. 2018. K. Shirahata, H. Sato and S. Matsuoka, "Hybrid Map Task Scheduling for GPU-Based Heterogeneous Clusters,"IEEE Second International Conference on Cloud Computing Technology and Science (CloudCom), pp.733-740, Dec. 2010. Y. Yamato, "Automatic verification technology of software patches for user virtual environments on IaaS cloud," Journal of Cloud Computing, Springer, 2015, 4:4, DOI: 10.1196/s13677-015-0028-6, Feb. 2015. Y. Yamato, M. Muroi, K. Tanaka and M. Uchimura, "Development of Template Management Technology for Easy Deployment of Virtual Resources on OpenStack," Journal of Cloud Computing, Springer, 2014, 3:7, DOI: 10.1196/s13677-014-0007-3, June 2014. Y. Yamato, "Server Selection, Configuration and Reconfiguration Technology for IaaS Cloud with Multiple Server Types," Journal of Network and Systems Management, Springer, DOI: 10.1007/s10922-017-9418-z, Aug. 2017.
 近年、クラウドファーストという言葉もあるように、アプリケーションをクラウド等の事業者設備で動作させることは一般的となっている。その際に、ユーザはアプリケーションを低コストで高性能に運用することを求めている。アプリケーションを動作させる場合にコストや性能に大きく影響する点として以下の考慮が必要である。
 (1)まず、GPUやFPGA等のアクセラレータを使う方が性能、コストで効果がある場合にそれらの利用が考えられる。勿論、通常のCPU向けに作られたコードではそれらのアクセラレータは使えないため、画像処理やFFT(Fast Fourier Transform)処理といった、GPUやFPGAに適した処理を、それらハードウェアにオフロードするコードに変換やライブラリ呼び出しを行う必要がある。コード変換は、IoTデバイスの制御等の処理を、Rasberry Piのようなシングルボードコンピュータに切り出して、配置する際も必要である。
 (2)動作させるアプリケーションのコードが決まると、どの程度のリソース量を確保するかの決定が必要である。例えば、CPUとGPUで動作させるアプリケーションの場合に、CPU処理が1000秒で、GPU処理が1秒等の場合は、仮想マシンのCPUリソースを増強した方がシステムとして性能が出ることが期待できる。
 (3)アプリケーションを実行する場所も性能に影響する。例えば、IoTカメラの画像分析で不審者探索を0.5sec以内に行いたい場合に、クラウドまでデータを上げてから画像分析していては遅延が大きくなるので、カメラデータを集約するゲートウェイや、NWの端点であるエッジサーバで画像分析することが必要になる等、処理場所の考慮が必要である。また、画像分析をエッジサーバで行い、不審者がいる場合だけ詳細画像をクラウドに送る場合でも、処理場所によって、計算量、通信トラフィックが変わるため、コストも変化する。
 (4)ハードウェアに合わせたコード変換、リソース量調整、配置場所調整が終わり、アプリケーションの運用を開始しても、運用中にリクエスト特性が大きく変わった場合など、開始当初の性能が保てなくなる場合がある。そういった際は、運用中に構成を変更することで、システムとしての性能、コストを改善することも考慮が必要である。
 このような点に鑑みて本発明がなされたのであり、アプリケーションを環境に合わせて適応させるとともに、高性能にアプリケーションを動作させることができるオフロードサーバのソフトウェア最適配置方法およびプログラムを提供することを課題とする。
 前記した課題を解決するため、請求項1に記載の発明は、アプリケーションの特定処理をアクセラレータにオフロードするオフロードサーバのソフトウェア最適配置方法であって、前記オフロードサーバは、アプリケーションのソースコードを分析するアプリケーションコード分析ステップと、前記アプリケーションの並列処理可能なループ文、特定処理の機能ブロック、ライブラリ呼び出しを含むオフロード可能な処理を特定するオフロード処理指定ステップと、配置先環境に合わせたコード変換をするコード変換ステップと、コード変換された前記アプリケーションをコンパイルして、アクセラレータ検証用装置に配置し、前記アクセラレータ検証用装置にオフロードした際の性能測定用処理を実行する検証環境用性能測定ステップと、を反復し、前記配置先環境に合わせたリソース量の設定を行うリソース量設定ステップと、前記コード変換ステップがコード変換した変換コードを、前記リソース量設定ステップが設定したリソース量を確保して配置する際に、性能およびコストをもとに配置先を計算して配置場所を選択する配置場所選択ステップと、本番環境配置後に、前記アプリケーションをコンパイルして、運用装置に配置し、前記運用装置にオフロードした実際の性能測定テストを実行する性能測定テストステップと、を備え、前記コード変換ステップ、前記リソース量設定ステップ、前記配置場所選択ステップ、前記検証環境用性能測定ステップ、前記性能測定テストステップのいずれか一つ以上のステップを実行することを特徴とするオフロードサーバのソフトウェア最適配置方法とした。
 このようにすることで、例えば、GPU,FPGA,IoTデバイス等環境が多様になる中で、アプリケーションを環境に合わせて適応させとともに、GPUやFPGAを適切に活用し、高性能にアプリケーションを動作させることができる。また、一度記述したソフトウェアを、異なる環境でも高性能に動作させることができる。
 請求項2に記載の発明は、コンパイルエラーが出るループ文に対して、オフロード対象外とするとともに、コンパイルエラーが出ないループ文に対して、オフロード処理するかしないかの指定を行うオフロード処理パターンを作成するオフロードパターン作成ステップと、所定回数繰り返された、性能測定結果をもとに、複数のオフロードパターンから最高処理性能のオフロードパターンを選択し、最高処理性能のオフロードパターンをコンパイルして実行ファイルを作成する実行ファイル作成ステップと、をさらに有し、前記オフロード処理指定ステップにおいて、遺伝的アルゴリズムに基づき、コンパイルエラーが出ないループ文の数を遺伝子長とし、前記オフロードパターン作成ステップにおいて、アクセラレータ処理をする場合を1または0のいずれか一方、しない場合を他方の0または1として、アクセラレータ処理可否を遺伝子パターンにマッピングし、前記遺伝子の各値を1か0にランダムに作成した指定個体数の前記遺伝子パターンを準備し、前記性能測定ステップにおいて、各個体に応じて、前記アクセラレータにおける並列処理指定文を指定したアプリケーションコードをコンパイルして、前記アクセラレータ検証用装置に配置し、前記アクセラレータ検証用装置において性能測定用処理を実行し、前記実行ファイル作成ステップにおいて、全個体に対して、性能測定を行い、処理時間の短い個体ほど適合度が高くなるように評価し、全個体から、前記適合度が所定値より高いものを性能の高い個体として選択し、選択された個体に対して、交叉、突然変異の処理を行い、次世代の個体を作成し、指定世代数の処理終了後、最高性能の前記オフロードパターンを解として選択することを特徴とする請求項1に記載のオフロードサーバのソフトウェア最適配置方法とした。
 このように、最初に並列可能なループ文のチェックを行い、次に並列可能繰り返し文群に対してGA(Genetic Algorithm:遺伝的アルゴリズム)を用いて検証環境で性能検証試行を反復し適切な領域を探索する。並列可能なループ文(例えばfor文)に絞った上で、遺伝子の部分の形で、高速化可能なオフロードパターンを保持し組み換えていくことで、取り得る膨大なオフロードパターンから、効率的に高速化可能なパターンを探索できる。
 請求項3に記載の発明は、前記配置先環境が、前記アクセラレータとしてFPGA(Field Programmable Gate Array)を備え、前記オフロード処理指定ステップにおいて、機能ブロック処理、ライブラリ呼び出しを含むアプリケーションの処理構造から、コードパターンDBを参照して、機能ブロック処理、ライブラリ呼び出しを含む前記FPGAにオフロード可能な処理を特定し、前記コードパターンDBからオフロードに該当する中間言語の定義情報を、アプリケーションソースコードに置換することを特徴とする請求項1に記載のオフロードサーバのソフトウェア最適配置方法とした。
 このようにすることで、機能ブロック処理、ライブラリ呼び出しを含むFPGAにオフロード可能な処理を特定して、アプリケーションソースコードに置換することができる。
 請求項4に記載の発明は、前記リソース量設定ステップにおいて、アプリケーションテストケースの処理時間から、CPUとオフロード先の処理時間が同等のオーダーになるように、CPUとオフロード先のリソース比を定め、前記リソース比の決定後は、想定するテストケースの処理性能が、要求性能およびコスト要求を満たすように前記リソース比はキープしつつ、リソース量を設定することを特徴とする請求項1に記載のオフロードサーバのソフトウェア最適配置方法とした。
 このように、CPUとオフロード先のリソース比を定めて、要求性能およびコスト要求を満たした上で、リソース量を設定することができる。
 請求項5に記載の発明は、前記配置場所選択ステップにおいて、アプリケーションテストケースの結果から、アプリケーションを配置した際の計算量と発生トラフィックを算出し、クラウド、エッジ、Home GW(gateway)を含むリンク関係をモデル化し、アプリケーションを特定のノードに配置した際に、コストが要求条件に収まることを制約条件に、処理遅延および/またはスループットの性能を最大化する配置、あるいは性能が要求条件を満たす形でコストが最低になる配置のいずれかを計算することを特徴とする請求項1に記載のオフロードサーバのソフトウェア最適配置方法とした。
 このようにすることで、処理遅延、スループットの性能の最大化、または性能が要求条件を満たす形でコストが最低になる配置場所を選択することができる。
 請求項6に記載の発明は、アプリケーション運用開始後に、当初期待していた性能が出ない場合に、ソフトウェア設定を再構成する再構成実行ステップを有し、前記再構成実行ステップにおいて、ソフトウェア設定の変更では、リソース量設定、配置場所選択の試行計算を周期的、または、性能がある閾値以下となった場合に試行模擬し、性能向上やコスト低減度合を計算し、リソース量の変更や配置場所の変更で性能やコストが改善できる見込みがある場合に、ユーザに再構成を提案し、ユーザ了承を得て、再構成を実行する場合に、リソースを変更する再構成先構築ステップと、配置場所変更の際、移行先環境を複製して、そこに移行元からアプリケーション実行環境をマイグレーションするマイグレーション処理ステップと、を実行することを特徴とする請求項1に記載のオフロードサーバのソフトウェア最適配置方法とした。
 このようにすることで、ユーザに再構成を提案して、ユーザ了承を得た場合には、アプリケーション実行環境をマイグレーションすることができる。
 請求項7に記載の発明は、前記再構成実行ステップにおいて、コード変換処理を、周期的、または、性能がある閾値以下となった場合に試行模擬し、コード変換して、GPUオフロードのソフトロジック変更および/またはFPGA(Field Programmable Gate Array)のハードロジックの変更で、性能やコストが改善できる見込みがある場合は、ユーザに再構成を提案し、ユーザ了承を得て、再構成を実行する際に、GPUオフロードするソフトロジックの変更を行い、ソフトウェア構成の変更の場合は、前記マイグレーション処理ステップが、更新する実行ファイルを起動する環境を複製後、アプリケーションのデータのマイグレーションを行い、FPGAのハードロジックを変更する場合は、前記マイグレーション処理ステップにおいて、移行先にハードロジックを構成済みのFPGAを準備し当該FPGAを制御するコンテナのマイグレーションを行う、もしくは、前記再構成実行ステップにおいて、当該FPGAのハードロジックを再構成することを特徴とする請求項6に記載のオフロードサーバのソフトウェア最適配置方法とした。
 このようにすることで、ユーザに再構成を提案して、ユーザ了承を得た場合、ソフトウェア構成の変更のときは、アプリケーションのデータのマイグレーションを、またハードロジックを構成済みのFPGAを準備しFPGAを制御するコンテナ等をマイグレーションすることができる。
 請求項8に記載の発明は、コンピュータを、請求項1乃至請求項7のうちいずれか1項に記載のオフロードサーバとして機能させるためのオフロードプログラムとした。
 このようにすることにより、一般的なコンピュータを用いて、請求項1乃至請求項7のいずれか1項に記載のオフロードサーバの各機能を実現させることができる。
 本発明によれば、アプリケーションを環境に合わせて適応させるとともに、高性能にアプリケーションを動作させることができるオフロードサーバのソフトウェア最適配置方法およびプログラムを提供することができる。
本発明の実施形態に係るオフロードサーバを含むシステムを示す図である。 上記実施形態に係るオフロードサーバの構成例を示す機能ブロック図である。 上記実施形態に係るオフロードサーバのソフトウェア最適配置処理を示すフローチャートである。 上記実施形態に係るオフロードサーバのGAを用いた自動オフロード処理を示す図である。 上記実施形態に係るオフロードサーバのSimple GAによる制御部(環境適応機能部)の探索イメージを示す図である。 上記実施形態に係るオフロードサーバのCPUからGPUへのデータ転送する場合のループ文において、CPUプログラム側で定義した変数とGPUプログラム側で参照する変数が重なる場合の例を示す図である。 上記実施形態に係るオフロードサーバのGPUからCPUへのデータ転送する場合のループ文において、CPUプログラム側で定義した変数とGPUプログラム側で参照する変数が重なる場合の例を示す図である。 上記実施形態に係るオフロードサーバの実装の動作概要を説明するフローチャートである。 上記実施形態に係るオフロードサーバの実装の動作概要を説明するフローチャートである。
 次に、本発明を実施するための形態(以下、「本実施形態」と称する。)における、オフロードサーバ1等について説明する。
 図1は、本実施形態に係るオフロードサーバ1を含むシステムを示す図である。
 本実施形態に係るシステムは、オフロードサーバ1を含むことを特徴とする。オフロードサーバ1は、アプリケーションの特定処理をアクセラレータにオフロードするオフロードサーバである。また、オフロードサーバ1は、クラウドレイヤ2、ネットワークレイヤ3、デバイスレイヤ4の3層に位置する各装置と通信可能に接続される。クラウドレイヤ2にはデータセンタ(DC:data center)30が、ネットワークレイヤ3にはネットワークエッジ20が、デバイスレイヤ4にはゲートウェイ10が、それぞれ配設される。
 そこで、本実施形態に係るオフロードサーバ1を含むシステムでは、デバイスレイヤ2、ネットワークレイヤ3、クラウドレイヤ4のそれぞれのレイヤにおいて、機能配置や処理オフロードを適切に行うことによる効率化を実現する。主に、機能を3レイヤの適切な場所に配置し処理させる機能配置効率化と、画像分析等の機能処理をGPUやFPGA等のヘテロハードウェアにオフロードすることでの効率化を図る。クラウドレイヤでは、GPUやFPGA等のヘトロジニアスなHW(ハードウェア)(以下、「ヘトロデバイス」と称する。)を備えたサーバが増えてきている。例えば、Microsoft(登録商標)社のBing検索においても、FPGAが利用されている。このように、へトロデバイスを活用し、例えば、行列計算等をGPUにオフロードしたり、FFT(Fast Fourier Transform)計算等の特定処理をFPGAにオフロードしたりすることで、高性能化を実現している。
 以下、本実施形態に係るオフロードサーバ1が、ユーザ向けサービス利用のバックグラウンドで行うオフロード処理を行う際の構成例について説明する。
 図2は、本発明の実施形態に係るオフロードサーバ1の構成例を示す機能ブロック図である。
 オフロードサーバ1は、アプリケーションの特定処理をアクセラレータに自動的にオフロードする装置である。
 図2に示すように、オフロードサーバ1は、制御部11と、入出力部12と、記憶部13と、検証用マシン14(Verification machine)(アクセラレータ検証用装置)と、運用装置15と、を含んで構成される。
 入出力部12は、クラウドレイヤ2、ネットワークレイヤ3およびデバイスレイヤ4に属する各デバイス等との間で情報の送受信を行うための通信インタフェースと、タッチパネルやキーボード等の入力装置や、モニタ等の出力装置との間で情報の送受信を行うための入出力インタフェースとから構成される。
 記憶部13は、ハードディスクやフラッシュメモリ、RAM(Random Access Memory)等により構成される。
 この記憶部13には、テストケースDB(Test case database)131、コードパターンDB132、および設備リソースDB133が記憶されるとともに、制御部11の各機能を実行させるためのプログラム(オフロードプログラム)や、制御部11の処理に必要な情報(例えば、中間言語ファイル(Intermediate file)134)が一時的に記憶される。
 テストケースDB131には、性能試験項目が格納される。テストケースDB131は、性能試験項目に対応した、価格(例えば、IoTサービスの課金情報)、性能(アクセラレータの計算リソース)等のデータを格納する。
 コードパターンDB132には、FPGAにオフロード可能な処理のライブラリ呼び出しや機能ブロックと、オフロードするFPGAの処理ロジックをOpenCLやHDLで記述したコードを、登録している。
 設備リソースDB133には、ネットワークやコンピュータの設備などのリソース情報を蓄積する。設備リソースDB133を参照することで、ネットワークやコンピュータの設備などのリソースを割り当てることができる。また、分散システムや記憶装置等のリソースを仮想化技術によって一つのリソースとみなし、必要な時に必要な分だけオンデマンドでリソースを割り当てることができる。
 検証用マシン14は、検証環境用としてのCPU・GPU・FPGA(アクセラレータ)・IoT GWである。検証用マシン14は、後記検証環境用性能測定部119が行う検証環境で、適切なコードパターン生成時の性能測定のために用いられる。
 運用装置15は、本番環境としてのユーザ宅のHome GWやそれがつながるエッジルータ等である。運用装置15は、本番環境配置後に、後記本番環境性能測定テスト実行部123が実際にどのくらいの性能が出るかを見せる性能測定のために用いられる。
 <制御部11>
 制御部11は、オフロードサーバ1全体の制御を司る環境適応機能部である。制御部11は、例えば、記憶部13に格納されたプログラム(オフロードプログラム)を不図示のCPU(Central Processing Unit)が、RAMに展開し実行することにより実現される。
 制御部11は、アプリケーションコード指定部(Specify application code)111と、アプリケーションコード分析部(Analyze application code)112と、データ転送指定部113と、オフロード処理指定部114と、オフロードパターン作成部115(コード変換部)と、リソース量計算部116(リソース量設定部)と、リソース量指定部117(リソース量設定部)と、配置先計算部118(配置場所選択部)と、検証環境用性能測定部119と、実行ファイル作成部120と、本番環境配置部(Deploy final binary files to production environment)121と、本番環境性能測定テスト抽出実行部(Extract performance test cases)122と、本番環境性能測定テスト実行部(Run performance test cases automatically)123と、再構成必要性定期チェック部124と、再構成シミュレーション試算部125と、再構成実行部126と、ユーザ提供部(Provide price and performance to a user to judge)127と、を備える。
 制御部11は、環境適応機能部として、後記する、コード変換ステップ、リソース量設定ステップ、配置場所選択ステップ、性能測定ステップ、性能測定テストステップのいずれか一つ以上のステップを実行する。
 <アプリケーションコード指定部111>
 ユーザは動作させたいアプリケーションコードと利用を想定したテストケース、要望する性能とコストを、アプリケーションコード指定部111に指定する。アプリケーションコード指定部111は、入力されたアプリケーションコードの指定を行う。具体的には、アプリケーションコード指定部111は、ユーザに提供しているサービスの処理機能(画像分析等)を特定する。
 <アプリケーションコード分析部112>
 アプリケーションコード分析部112は、アプリケーションのコードを分析するアプリケーションコード分析ステップを実行する。アプリケーションコード分析部112は、処理機能のソースコードを分析し、ループ文や変数の参照関係、処理する機能ブロック(FFT:Fast Fourier Transform処理)等、コードの構造を把握する。
 <データ転送指定部113>
 データ転送指定部113は、アプリケーションのループ文の中で用いられる変数の参照関係を分析し、ループ外でデータ転送してよいデータについては、ループ外でのデータ転送を明示的に指定する明示的指定行(#pragma acc data copyin/copyout/copy(a[…]) ただし、変数a)を用いたデータ転送指定を行う。
 データ転送指定部113は、CPUからGPUへのデータ転送を明示的に指定する明示的指定行(#pragma acc data copyin (a[…]))と、GPUからCPUへのデータ転送を明示的に指定する明示的指定行(#pragma acc data copyout (a[…]))と、同じ変数に関してCPUからGPUへの転送とGPUからCPUへの転送とが重なる場合、データコピーの往復をまとめて明示的に指定する明示的指定行(#pragma acc data copy(a[…]))と、を用いたデータ転送指定を行う。
 データ転送指定部113は、CPUプログラム側で定義した変数とGPUプログラム側で参照する変数が重なる場合、CPUからGPUへのデータ転送の指示を行い、データ転送を指定する位置を、GPU処理するループ文かそれより上位のループ文で、該当変数の設定、定義を含まない最上位のループとする。また、データ転送指定部113は、GPUプログラム側で設定した変数とCPUプログラム側で参照する変数とが重なる場合、GPUからCPUへのデータ転送の指示を行い、データ転送を指定する位置を、GPU処理するループ文か、それより上位のループ文で、該当変数の参照、設定、定義を含まない最上位のループとする。
 <オフロード処理指定部114>
 オフロード処理指定部114は、アプリケーションのループ文(繰り返し文)や特定処理の機能ブロック、ライブラリ呼び出しを含むオフロード可能な処理を特定するオフロード処理指定ステップを実行し、各ループ文に対して、アクセラレータにおける並列処理指定文を指定してコンパイルする。
 具体的には、オフロード処理指定部114は、機能ブロック処理、ライブラリ呼び出しを含むアプリケーションの処理構造から、コードパターンDB132を参照して、機能ブロック処理、ライブラリ呼び出しを含むFPGAにオフロード可能な処理を特定し、コードパターンDBからオフロードに該当する中間言語の定義情報を、アプリケーションソースコードに置換する。
 オフロード処理指定部114は、オフロード可能部抽出部(Extract offloadable area)114aと、中間言語ファイル出力部(Output intermediate file)114bと、を備える。
 オフロード可能部抽出部114aは、ループ文やFFT等、GPU・FPGAにオフロード可能な処理を特定し、オフロード処理に応じた中間言語を抽出する。オフロード可能部抽出部114aは、アプリケーションコードの並列処理可能なループ文やFFT処理の機能ブロック、ライブラリ呼び出し等のオフロード可能な処理をコードパターンDB132を参照して特定し、オフロード先に応じた中間言語(OpenCL等)を抽出する。
 中間言語ファイル出力部114bは、抽出した中間言語ファイル134を出力する。中間言語抽出は、一度で終わりでなく、適切なオフロード領域探索のため、実行を試行して最適化するため反復される。なお、中間言語抽出は一度で終わりでなく、適切なオフロード領域探索のため、実行試行して最適化するため反復(例えば、GAの20世代、100回試行など)される。
 <オフロードパターン作成部115>
 オフロードパターン作成部115は、配置先環境に合わせたコード変換であるコード変換ステップを実行する。本実施形態では、オフロードパターン作成部115は、コンパイルエラーが出るループ文(繰り返し文)に対して、オフロード対象外とするとともに、コンパイルエラーが出ない繰り返し文に対して、並列処理するかしないかの指定を行うオフロードパターンを作成するオフロードパターン作成ステップを実行する。
 <リソース量計算部116>
 リソース量計算部116は、配置先環境に合わせたリソース量の設定を行う。具体的には、リソース量計算部116は、アプリケーションテストケースの処理時間から、CPUとオフロード先の処理時間が同等のオーダーになるように、CPUとオフロード先のリソース比を定め、前記リソース比を決定後は、想定するテストケースの処理性能が、要求性能およびコスト要求を満たすように前記リソース比はキープしつつ、リソース量を設定であるリソース量設定ステップを実行する。
 図4を参照して、リソース量計算部116の機能を説明する。リソース量計算部116は、図4のステップS21,S22のコードパターンを決定後、適切なリソース量の設定を行う。具体的には、図4のステップS21,S22の検証環境性能測定で取得される、想定するテストケースの処理時間の中で、CPU処理時間とGPU等のCPU以外ハードウェアの処理時間を分析し、適切なリソース比を定める。上記リソース比は、CPUとGPU等ハードウェアの確保するリソースの比である。例えば、リソースの比は、vCPUコア:仮想GPU=4:1が適切であるとする。次に、リソース量計算部116は、ユーザの要望する性能、コストと適切なリソース比を鑑みて、実際に確保するリソース量を定める。例えば、リソース量は、vCPUコアが「8」で仮想GPUが「2」の場合、性能およびコストを満たす量であるとする。
 このように、リソース量計算部116は、まずリソース比を定め、その上でリソース比を鑑みて、実際に確保するリソース量を定める。これにより、CPUとオフロード先のリソース比を定めて、要求性能およびコスト要求を満たした上で、リソース量を設定することができる。
 <リソース量指定部117>
 リソース量指定部117は、リソース量計算部116で計算したリソース量を実行ファイルに指定する。
 <配置先計算部118>
 配置先計算部118は、オフロードパターン作成部115がコード変換した変換コードを、リソース量計算部116が計算したリソース量を確保して配置する際に、性能およびコストをもとに配置先を計算して配置場所を選択する配置場所選択ステップを実行する。
 具体的には、配置先計算部118は、アプリケーションテストケースの結果から、アプリケーションを配置した際の計算量と発生トラフィックを算出し、クラウド、エッジ、Home GWを含むリンク関係をモデル化し、アプリケーションを特定のノードに配置した際に、コストが要求条件に収まることを制約条件に、処理遅延および/またはスループットの性能を最大化する配置、あるいは性能が要求条件を満たす形でコストが最低になる配置のいずれかを線形計画手法を用いて計算する。
 図4を参照して、配置先計算部118の機能を説明する。配置先計算部118は、図4のステップS21,S22で定めたコードパターン(図2のコードパターンDB132に格納されている)の実行ファイルを、図4のステップS14,S15で定めたリソース量を確保して配置する際に、性能およびコストが適切になる場所を計算し配置先を決める。配置先計算部118は、実行するアプリケーションの想定するテストケースの特性、設備リソースDB133(図2参照)の情報から、性能とコストが適切になる配置場所を計算する。
 例えば、IoTカメラの画像情報を分析して不審者を見つける処理を、0.5sec以内の遅延で行いたいような場合は、IoTカメラに近いエッジサーバを特定して、配置する。ここで、配置したい場所には、リソース量制限から、必要なリソースを確保できない場合等は、リソース量や場所を再調整するため、図4のステップS14に処理を戻す場合がある。
 <検証環境用性能測定部119>
 検証環境用性能測定部119は、オフロードパターンのアプリケーションをコンパイルして、検証用マシン14に配置し、アクセラレータにオフロードした際の性能測定用処理である検証環境用性能測定ステップを実行する。
 検証環境用性能測定部119は、バイナリファイル配置部(Deploy binary files)116aを備える。バイナリファイル配置部119aは、検証環境用として、GPUやFPGA、IoTデバイス用GW等を備えた検証環境用である検証用マシン14に、中間言語から導かれる実行ファイルをデプロイ(配置)する。
 検証環境用性能測定部119は、GPUやFPGAを備えた検証環境(例えば、通信事業者の実験室等)で、検証用マシン14を用いて、for文のGPU処理パターンを試行錯誤する際の性能測定を行う。
 具体的には、検証環境用性能測定部119は、配置したファイルを起動し、想定するテストケースを実行して、オフロードした際の性能を測定するとともに、性能測定結果を、オフロード可能部抽出部114aに戻す。この場合、オフロード可能部抽出部114aは、別のオフロードパターン抽出を行い、中間言語ファイル出力部114bは、抽出された中間言語をもとに、性能測定を試行する(後記図4の符号e参照)。
 上記検証環境での性能測定を繰り返し、最終的に配置するコードパターンを決定する。
 ここで、オフロードパターン作成部115による配置先環境に合わせたコード変換であるコード変換ステップと、検証環境用性能測定部119による、コード変換されたアプリケーションをコンパイルして、検証用マシン14に配置しアクセラレータにオフロードした際の検証環境用性能測定ステップと、を反復する。すなわち、検証環境用性能測定は、コード変換と繰り返すように反復される。
 <実行ファイル作成部120>
 実行ファイル作成部120は、所定回数繰り返された、性能測定結果をもとに、複数のオフロードパターンから最高処理性能のオフロードパターンを選択し、最高処理性能のオフロードパターンをコンパイルして実行ファイルを作成する実行ファイル作成ステップを実行する。
 <本番環境配置部121> 
 本番環境配置部121は、作成した実行ファイルを、ユーザ向けの本番環境に配置する(「最終バイナリファイルの本番環境への配置」)。本番環境配置部121は、最終的なオフロード領域を指定したパターンを決定し、ユーザ向けの本番環境に配置(デプロイ)する本番環境配置ステップを実行する。
 <本番環境性能測定テスト抽出部122>
 本番環境性能測定テスト抽出部122は、実行ファイル配置後、テストケースDB131から性能試験項目を抽出する(「最終バイナリファイルの本番環境への配置」)。
 <本番環境性能測定テスト実行部123>
 本番環境性能測定テスト実行部123は、実行ファイル配置後、ユーザに性能を示すため、本番環境性能測定テスト抽出部122が抽出した性能試験項目を、運用装置15を用いて自動実行する(「最終バイナリファイルの本番環境への配置」)。ここで、運用装置15は、本番環境としてのユーザ宅のHome GWやそれがつながるエッジルータ等である。本番環境性能測定テスト実行部123は、本番環境(ユーザ宅のHome GWやそれがつながるエッジルータ等)に実行ファイルを配置後に、性能測定を実行してその結果をユーザに見せる。
 図4を参照して、本番環境性能測定テスト抽出部122の機能を説明する。本番環境性能測定テスト抽出部122は、図4のステップS15で定めた商用環境配置場所に、図4のステップS21,S22で定めたコードパターンの実行ファイルを、図4のステップS14で定めたリソース量を確保して配置すると、期待通りの動作となるかを動作検証する。具体的には、ユーザが指定した想定テストケースや、テストケースDB131に保持されているアプリケーションリグレッションテストケースを用いて、動作検証する。この際に、想定テストケースの商用環境での実際の性能を、確保した全リソースのスペックやコストも含めて、ユーザに提示し、ユーザにサービス開始判断をしてもらい、OKの場合にアプリケーションの運用を開始する。
 <再構成必要性定期チェック部124>
 再構成必要性定期チェック部124は、再構成必要性を定期的にチェックする。
 <再構成シミュレーション試算部125>
 再構成シミュレーション試算部125は、再構成必要性がある場合、再構成をシミュレーション試算する。
 図4を参照して、再構成シミュレーション試算部125の機能を説明する。再構成シミュレーション試算部125は、図4のステップS23で開始したアプリケーション運用にて、リクエスト特性変化等で当初期待していた性能が出ない場合に、ソフトウェア設定、ソフトウェア/ハードウェア構成を再構成する。ソフトウェア設定とは、リソース量や配置場所の再変更を意味しており、例えば、CPUとGPUの処理時間バランスが悪い場合に、リソースの比を変更したり、リクエスト量が増え応答時間が劣化してきた場合に、リソースの比はキープして量を増やす。あるいは、配置する場所を別のクラウドに変えるなどである。ソフトウェア/ハードウェア構成とは、コード変換から行い、GPUであればオフロード処理するロジックを変更したり、FPGAのようにハードウェアロジックを運用中に変更できる場合はハードウェアロジックを再構成することを意味している。例えば、後者で、SQL DBとNo SQLのDBを両運用している場合に、元々SQLリクエストが多かったが、No SQLリクエストが一定よりも増えてきた場合に、No SQLをアクセラレートするFPGAにロジックを再構成する。
 ここで図4のステップS25で、環境適応に必要な、コード変換、リソース量調整、配置場所調整、運用中再構成を一括して行う処理フローを説明したが、行いたい処理だけ切出すことも可能である。例えば、GPU向けにコード変換だけ行いたい場合は、図4のステップS11-S13だけ行い、環境適応機能部11や検証環境等必要な部分だけ利用すればよい。
 <再構成実行部126>
 再構成実行部126は、アプリケーション運用開始後に、当初期待していた性能が出ない場合に、ソフトウェア設定を再構成する。
 再構成実行部126は、再構成先構築部126aと、マイグレーション処理部126bと、を備える。
 再構成先構築部126aは、ソフトウェア設定の変更において、リソース量設定、配置場所選択の試行計算を周期的、または、性能がある閾値以下となった場合に試行模擬し、性能向上やコスト低減度合を計算し、リソース量の変更や配置場所の変更で性能やコストが改善できる見込みがある場合に、ユーザに再構成を提案し、ユーザ了承を得て、再構成を実行する場合に、リソースを変更する再構成先構築ステップを実行する。
 マイグレーション処理部126bは、配置場所変更の際、移行先環境を複製して、そこに移行元からアプリケーション実行環境をマイグレーションするマイグレーション処理ステップを実行する。
 再構成実行部126は、コード変換処理を、周期的、または、性能がある閾値以下となった場合に試行模擬し、コード変換して、GPUオフロードのソフトロジック変更やFPGAのハードロジックの変更で、性能やコストが改善できる見込みがある場合は、ユーザに再構成を提案し、ユーザ了承を得て、再構成を実行する際に、GPUオフロードするソフトロジックの変更を行う。
 ソフトウェア構成の変更の場合は、マイグレーション処理部126bが、更新する実行ファイルを起動する環境を複製後、アプリケーションのデータのマイグレーションを行い、FPGAのハードロジックを変更する場合は、マイグレーション処理部126bが、移行先にハードロジックを構成済みのFPGAを準備しFPGAを制御するコンテナ等をマイグレーションを行う、もしくは、再構成実行部126が、FPGAのハードロジックを再構成する。
 <ユーザ提供部127>
 ユーザ提供部127は、性能試験結果を踏まえた、価格・性能等の情報をユーザに提示する(「価格・性能等の情報のユーザへの提供」)。テストケースDB131には、性能試験項目に対応した、価格、性能等のデータが格納されている。ユーザ提供部127は、テストケースDB131に格納された試験項目に対応した、価格、性能等のデータを読み出して、上記性能試験結果と共にユーザに提示する。ユーザは、提示された価格・性能等の情報をもとに、IoTサービスの課金利用開始を判断する。ここで、本番環境への一括デプロイには、非特許文献3の既存技術を、また、性能自動試験には、非特許文献4の既存技術を用いればよい。
 <性能測定>
 上述したように、制御部11(環境適応機能部)が行う性能測定は2種類ある。
(1)検証環境で、適切なコードパターン生成時の性能測定
 GPUとかFPGAを備えた検証環境(通信事業者の実験室等)で、for文のGPU処理パターンを試行錯誤する際の性能測定。本実施形態では、検証環境用性能測定部119が検証用マシン14を用いて行う。
(2)本番環境配置後に、実際にどのくらいの性能が出るかを見せるための性能測定
 本番環境(ユーザ宅のHGWやそれがつながるエッジルータ等)に実行ファイルを配置後に、性能測定してその結果をユーザに見せる。本実施形態では、本番環境性能測定テスト抽出部122が、実行ファイル配置後、テストケースDB131から性能試験項目を抽出し、本番環境性能測定テスト実行部123が運用装置15を用いて行う。
[遺伝的アルゴリズムの適用]
 オフロードサーバ1は、オフロードの最適化にGAを用いることができる。GAを用いた場合のオフロードサーバ1の構成は下記の通りである。
 すなわち、オフロード処理指定部114は、遺伝的アルゴリズムに基づき、コンパイルエラーが出ないループ文(繰り返し文)の数を遺伝子長とする。オフロードパターン作成部115は、アクセラレータ処理をする場合を1または0のいずれか一方、しない場合を他方の0または1として、アクセラレータ処理可否を遺伝子パターンにマッピングする。
 オフロードパターン作成部115は、遺伝子の各値を1か0にランダムに作成した指定個体数の遺伝子パターンを準備し、検証環境用性能測定部119は、各個体に応じて、アクセラレータにおける並列処理指定文を指定したアプリケーションコードをコンパイルして、検証用マシン14に配置する。検証環境用性能測定部119は、検証用マシン14において性能測定用処理を実行する。
 ここで、検証環境用性能測定部119は、途中世代で、以前と同じオフロードパターンの遺伝子が生じた場合は、当該オフロードパターンに該当するアプリケーションコードのコンパイル、および、性能測定はせずに、性能測定値としては同じ値を使う。
 また、検証環境用性能測定部119は、コンパイルエラーが生じるアプリケーションコード、および、性能測定が所定時間で終了しないアプリケーションコードについては、タイムアウトの扱いとして、性能測定値を所定の時間(長時間)に設定する。
 実行ファイル作成部120は、全個体に対して、性能測定を行い、処理時間の短い個体ほど適合度が高くなるように評価する。実行ファイル作成部120は、全個体から、適合度が所定値(例えば、全個数の上位n%、または全個数の上位m個 n,mは自然数)より高いものを性能の高い個体として選択し、選択された個体に対して、交叉、突然変異の処理を行い、次世代の個体を作成する。実行ファイル作成部120は、指定世代数の処理終了後、最高性能のオフロードパターンを解として選択する。
 以下、上述のように構成されたオフロードサーバ1のソフトウェア最適配置方法について説明する。
[最適配置動作]
 図3は、オフロードサーバ1のソフトウェア最適配置処理を示すフローチャートである。
 ステップS1で制御部11のアプリケーションコード分析部112は、アプリケーションの処理機能のソースコードを分析し、ループ文や変数の参照関係、処理する機能ブロック等、コードの構造を把握する。
 ステップS2でオフロード処理指定部114は、アプリケーションの並列処理可能なループ文、特定処理の機能ブロック、ライブラリ呼び出しを含むオフロード可能な処理を特定する。オフロード処理指定部114は、各ループ文に対して、アクセラレータにおける並列処理指定文を指定してコンパイルする。
 ステップS3でオフロードパターン作成部115は、配置先環境に合わせたコード変換をする。
 ステップS4でリソース量計算部116は、配置先環境に合わせたリソース量の設定を行う。リソース量計算部116は、アプリケーションテストケースの処理時間から、CPUとオフロード先の処理時間が同等のオーダーになるように、CPUとオフロード先のリソース比を定め、リソース比を決定後は、想定するテストケースの処理性能が、要求性能およびコスト要求を満たすようにリソース比はキープしつつ、リソース量を設定する。
 ステップS5で配置先計算部118は、オフロードパターン作成部115がコード変換した変換コードを、リソース量計算部116およびリソース量指定部117が設定したリソース量を確保して配置する際に、性能およびコストをもとに配置先を計算して配置場所を選択する。具体的には、配置先計算部118は、アプリケーションテストケースの結果から、アプリケーションを配置した際の計算量と発生トラフィックを算出し、クラウド、エッジ、Home GWを含むリンク関係をモデル化し、アプリケーションを特定のノードに配置した際に、コストが要求条件に収まることを制約条件に、処理遅延および/またはスループットの性能を最大化する配置、あるいは性能が要求条件を満たす形でコストが最低になる配置のいずれかを最適化手法(例えば、線形計画手法等)を用いて計算する。
 ステップS6で検証環境用性能測定部119は、コード変換されたアプリケーションをコンパイルして、検証用マシン14に配置し、アクセラレータにオフロードした際の性能測定用処理を実行する。
 ステップS7で制御部(環境適応機能部)11は、コード変換ステップ、リソース量設定ステップ、配置場所選択ステップ、性能測定ステップのいずれか一つ以上のステップを実行する環境適応処理を行い本フローの処理を終了する。
[自動オフロード動作]
 本実施形態のオフロードサーバ1を、ユーザアプリケーションロジックの、GPU自動オフロード技術に適用した例について説明する。
 図4は、オフロードサーバ1のGAを用いた自動オフロード処理を示す図である。
 図4に示すように、オフロードサーバ1は、制御部(環境適応機能部)11と、テストケースDB131と、コードパターンDB132と、設備リソースDB133と、中間言語ファイル134と、検証用マシン14と、を有している。
 オフロードサーバ1は、ユーザが利用するアプリケーションコード(Application code)130を取得する。
 ユーザは、OpenIoTリソース(OpenIoTResources)15を利用する。OpenIoTリソース15は、例えば、各種デバイス(Device)としてIoT GW151、CPU-GPUを有する装置152、CPU-FPGAを有する装置153、CPUを有する装置154である。オフロードサーバ1は、機能処理をCPU-GPUを有する装置152、CPU-FPGAを有する装置153のアクセラレータに自動オフロードする。
 以下、図4のステップ番号を参照して各部の動作を説明する。
 <ステップS11:Specify application code>
 ステップS11において、アプリケーションコード指定部111(図2参照)は、ユーザに提供しているサービスの処理機能(画像分析等)を特定する。具体的には、アプリケーションコード指定部111は、入力されたアプリケーションコードの指定を行う。
 <ステップS12:Analyze application code>
 ステップS12において、アプリケーションコード分析部112(図2参照)は、処理機能のソースコードを分析し、ループ文やFFTライブラリ呼び出し等の構造を把握する。
 <ステップS13:Extract offloadable area>
 ステップS13において、オフロード処理指定部114(図2参照)は、アプリケーションのループ文(繰り返し文)を特定し、各繰り返し文に対して、アクセラレータにおける並列処理指定文を指定してコンパイルする。具体的には、オフロード可能部抽出部114a(図2参照)は、ループ文やFFT等、GPU・FPGAにオフロード可能な処理を特定し、オフロード処理に応じた中間言語を抽出する。
 <ステップS14:Output intermediate file>
 ステップS14において、中間言語ファイル出力部114b(図2参照)は、中間言語ファイル134を出力する。中間言語抽出は、一度で終わりでなく、適切なオフロード領域探索のため、実行を試行して最適化するため反復される。
 <ステップS15:Compile error>
 ステップS15において、オフロードパターン作成部115(図2参照)は、コンパイルエラーが出るループ文に対して、オフロード対象外とするとともに、コンパイルエラーが出ない繰り返し文に対して、並列処理するかしないかの指定を行うオフロードパターンを作成する。
 <ステップS21:Deploy binary files>
 ステップS21において、バイナリファイル配置部119a(図2参照)は、GPU・FPGA・IoT GWを備えた検証用マシン14に、中間言語から導かれる実行ファイルをデプロイする。
 <ステップS22:Measure performances>
 ステップS22において、検証環境用性能測定部119(図2参照)は、配置したファイルを実行し、オフロードした際の性能を測定する。
 オフロードする領域をより適切にするため、この性能測定結果は、オフロード可能部抽出部114aに戻され、オフロード可能部抽出部114aが、別パターンの抽出を行う。そして、中間言語ファイル出力部114bは、抽出された中間言語をもとに、性能測定を試行する(図4の符号a参照)。
 図4の符号a,bに示すように、制御部11は、上記ステップS12乃至ステップS22を繰り返し実行する。制御部11の自動オフロード機能をまとめると、下記である。すなわち、オフロード処理指定部114は、アプリケーションのループ文(繰り返し文)を特定し、各繰返し文に対して、GPUでの並列処理指定文を指定して、コンパイルする。そして、オフロードパターン作成部115は、コンパイルエラーが出るループ文を、オフロード対象外とし、コンパイルエラーが出ないループ文に対して、並列処理するかしないかの指定を行うオフロードパターンを作成する。そして、バイナリファイル配置部119aは、該当オフロードパターンのアプリケーションをコンパイルして、検証用マシン14に配置し、検証環境用性能測定部119が、検証用マシン14で性能測定用処理を実行する。実行ファイル作成部120は、所定回数繰り返された、性能測定結果をもとに、複数のオフロードパターンから最高処理性能のパターンを選択し、選択パターンをコンパイルして実行ファイルを作成する。
 <ステップS23:Deploy final binary files to production environment>
 ステップS23において、本番環境配置部121は、最終的なオフロード領域を指定したパターンを決定し、ユーザ向けの本番環境にデプロイする。
 <ステップS24:Extract performance test cases and  run automatically>
 ステップS24において、本番環境性能測定テスト抽出部122は、実行ファイル配置後、ユーザに性能を示すため、性能試験項目をテストケースDB131から抽出し、抽出した性能試験を自動実行する。
 <ステップS25:Provide price and performance to a user to judge>
 ステップS25において、ユーザ提供部127は、性能試験結果を踏まえた、価格・性能等の情報をユーザに提示する。ユーザは、提示された価格・性能等の情報をもとに、IoTサービスの課金利用開始を判断する。
 上記ステップS11~ステップS25は、ユーザのIoTサービス利用のバックグラウンドで行われ、例えば、仮利用の初日の間に行う等を想定している。また、コスト低減のためにバックグラウンドで行う処理は、機能配置最適化とGPU・FPGAオフロードのみを対象としてもよい。
 上記したように、オフロードサーバ1の制御部(環境適応機能部)11は、機能処理のオフロードのため、ユーザが利用するアプリケーションのソースコードから、オフロードする領域を抽出して中間言語を出力する(ステップS11~ステップS15)。制御部11は、中間言語から導かれる実行ファイルを、検証用マシン14に配置実行し、オフロード効果を検証する(ステップS21~ステップS22)。検証を繰り返し、適切なオフロード領域を定めたのち、制御部11は、実際にユーザに提供する本番環境に、実行ファイルを配置(デプロイ)し、サービスとして提供する(ステップS23~ステップS25)。
[GAを用いたGPU自動オフロード]
 GPU自動オフロードは、GPUに対して、図4のステップS12~ステップS22を繰り返し、最終的にステップS23でデプロイするオフロードコードを得るための処理である。
 GPUは、一般的にレイテンシーは保証しないが、並列処理によりスループットを高めることに向いたデバイスである。IoTで動作させるアプリケーションは、多種多様である。IoTデータの暗号化処理や、カメラ映像分析のための画像処理、大量センサデータ分析のための機械学習処理等が代表的であり、それらは、繰り返し処理が多い。そこで、アプリケーションの繰り返し文をGPUに自動でオフロードすることでの高速化を狙う。
 しかし、従来技術で記載の通り、高速化には適切な並列処理が必要である。特に、GPUを使う場合は、CPUとGPU間のメモリ転送のため、データサイズやループ回数が多くないと性能が出ないことが多い。また、メモリデータ転送のタイミング等により、並列高速化できる個々のループ文(繰り返し文)の組み合わせが、最速とならない場合等がある。例えば、10個のfor文(繰り返し文)で、1番、5番、10番の3つがCPUに比べて高速化できる場合に、1番、5番、10番の3つの組み合わせが最速になるとは限らない等である。
 適切な並列領域指定のため、PGIコンパイラを用いて、for文の並列可否を試行錯誤して最適化する試みがある。しかし、試行錯誤には多くの稼働がかかり、IoTサービスとして提供する際に、ユーザの利用開始が遅くなり、コストも上がってしまう問題がある。
 そこで、本実施形態では、並列化を想定していない汎用プログラムから、自動で適切なオフロード領域を抽出する。このため、最初に並列可能for文のチェックを行い、次に並列可能for文群に対してGAを用いて検証環境で性能検証試行を反復し適切な領域を探索すること、を実現する。並列可能for文に絞った上で、遺伝子の部分の形で、高速化可能なオフロードパターンを保持し組み換えていくことで、取り得る膨大なオフロードパターンから、効率的に高速化可能なパターンを探索できる。
[Simple GAによる制御部(環境適応機能部)11の探索イメージ]
 図5は、Simple GAによる制御部(環境適応機能部)11の探索イメージを示す図である。図5は、処理の探索イメージと、for文の遺伝子配列マッピングを示す。
 GAは、生物の進化過程を模倣した組合せ最適化手法の一つである。GAのフローチャートは、初期化→評価→選択→交叉→突然変異→終了判定となっている。
 本実施形態では、GAの中で、処理を単純にしたSimple GAを用いる。Simple GAは、遺伝子は1、0のみとし、ルーレット選択、一点交叉、突然変異は1箇所の遺伝子の値を逆にする等、単純化されたGAである。
 <初期化>
 初期化では、アプリケーションコードの全for文の並列可否をチェック後、並列可能for文を遺伝子配列にマッピングする。GPU処理する場合は1、GPU処理しない場合は0とする。遺伝子は、指定の個体数Mを準備し、1つのfor文にランダムに1、0の割り当てを行う。
 具体的には、制御部(環境適応機能部)11(図2参照)は、ユーザが利用するアプリケーションコード(Application code)130(図4参照)を取得し、図5に示すように、アプリケーションコード130のコードパターン(Code patterns)141からfor文の並列可否をチェックする。図5に示すように、コードパターン141から5つのfor文が見つかった場合(図5の符号c参照)、各for文に対して1桁、ここでは5つのfor文に対し5桁の1または0をランダムに割り当てる。例えば、CPUで処理する場合0、GPUに出す場合1とする。ただし、この段階では1または0をランダムに割り当てる。
 遺伝子長に該当するコードが5桁であり、5桁の遺伝子長のコードは2=32パターン、例えば10001、10010、…となる。なお、図5では、コードパターン141中の丸印(○印)をコードのイメージとして示している。
 <評価>
 評価では、デプロイとパフォーマンスの測定(Deploy & performance measurement)を行う(図5の符号d参照)。すなわち、検証環境用性能測定部119(図2参照)は、遺伝子に該当するコードをコンパイルして検証用マシン14にデプロイして実行する。検証環境用性能測定部119は、ベンチマーク性能測定を行う。性能が良いパターン(オフロードパターン)の遺伝子の適合度を高くする。
 <選択>
 選択では、適合度に基づいて、高性能コードパターンを選択(Select high performance code patterns)する(図5の符号e参照)。検証環境用性能測定部119(図2参照)は、適合度に基づいて、高適合度の遺伝子を、指定の個体数選択する。本実施形態では、適合度に応じたルーレット選択および最高適合度遺伝子のエリート選択を行う。
 図5では、選択されたコードパターン(Select code patterns)142の中の丸印(○印)が、3つに減ったことを探索イメージとして示している。
 <交叉>
 交叉では、一定の交叉率Pcで、選択された個体間で一部の遺伝子をある一点で交換し、子の個体を作成する。
 ルーレット選択された、あるパターン(オフロードパターン)と他のパターンとの遺伝子を交叉させる。一点交叉の位置は任意であり、例えば上記5桁のコードのうち3桁目で交叉させる。
 <突然変異>
 突然変異では、一定の突然変異率Pmで、個体の遺伝子の各値を0から1または1から0に変更する。
 また、局所解を避けるため、突然変異を導入する。なお、演算量を削減するために突然変異を行わない態様でもよい。
 <終了判定>
 図5に示すように、クロスオーバーと突然変異後の次世代コードパターンの生成(Generate next generation code patterns after crossover & mutation)を行う(図5の符号f参照)。
 終了判定では、指定の世代数T回、繰り返しを行った後に処理を終了し、最高適合度の遺伝子を解とする。
 例えば、性能測定して、速い3つ10010、01001、00101を選ぶ。この3つをGAにより、次の世代は、組み換えをして、例えば新しいパターン(オフロードパターン)10101(一例)を作っていく。このとき、組み換えをしたパターンに、勝手に0を1にするなどの突然変異を入れる。上記を繰り返して、一番早いパターンを見付ける。指定世代(例えば、20世代)などを決めて、最終世代で残ったパターンを、最後の解とする。
 <デプロイ(配置)>
 最高適合度の遺伝子に該当する、最高処理性能のオフロードパターンで、本番環境に改めてデプロイして、ユーザに提供する。
 <補足説明>
 GPUにオフロードできないfor文(ループ文;繰り返し文)が相当数存在する場合について説明する。例えば、for文が200個あっても、GPUにオフロードできるものは30個くらいである。ここでは、エラーになるものを除外し、この30個について、GAを行う。
 OpenACCには、ディレクティブ #pragma acc kernelsで指定して、GPU向けバイトコードを抽出し、実行によりGPUオフロードを可能とするコンパイラがある。この#pragmaに、for文のコマンドを書くことにより、そのfor文がGPUで動くか否かを判定することができる。
 例えばC/C++を使った場合、C/C++のコードを分析し、for文を見付ける。for文を見付けると、OpenACCで並列処理の文法である #pragma acc kernelsを使ってfor文に対して書き込む。詳細には、何も入っていない #pragma acc kernels に、一つ一つfor文を入れてコンパイルして、エラーであれば、そのfor文はそもそも、GPU処理できないので、除外する。このようにして、残るfor文を見付ける。そして、エラーが出ないものを、長さ(遺伝子長)とする。エラーのないfor文が5つであれば、遺伝子長は5であり、エラーのないfor文が10であれば、遺伝子長は10である。なお、並列処理できないものは、前の処理を次の処理に使うようなデータに依存がある場合である。
 以上が準備段階である。次にGA処理を行う。
 for文の数に対応する遺伝子長を有するコードパターンが得られている。始めはランダムにオフロードパターン10010、01001、00101、…を割り当てる。GA処理を行い、コンパイルする。その時に、オフロードできるfor文であるにもかかわらず、エラーがでることがある。for文が階層になっている(どちらか指定すればGPU処理できる)場合である。この場合は、エラーとなったfor文は、残してもよい。具体的には、処理時間が多くなった形にして、タイムアウトさせる方法がある。
 検証用マシン14でデプロイして、ベンチマーク、例えば画像処理であればその画像処理でベンチマークする、その処理時間が短い程、適応度が高いと評価する。例えば、処理時間の逆数、処理時間10秒かかるものは1、100秒かかるものは0.1、1秒のものは10とする。
 適応度が高いものを選択して、例えば10個のなかから、3~5個を選択して、それを組み替えて新しいコードパターンを作る。作成途中で、前と同じものができる場合がある。この場合、同じベンチマークを行う必要はないので、前と同じデータを使う。本実施形態では、コードパターンと、その処理時間は記憶部13に保存しておく。
 以上で、Simple GAによる制御部(環境適応機能部)11の探索イメージについて説明した。次に、データ転送の一括処理手法について述べる。
[データ転送の一括処理手法]
 上述したように、遺伝的アルゴリズムを用いることで、GPU処理で効果のある並列処理部を自動チューニングしている。しかしながら、CPU-GPUメモリ間のデータ転送によっては高性能化できないアプリケーションもあった。このため、スキルが無いユーザがGPUを使ってアプリケーションを高性能化することは難しいし、自動並列化技術等を使う場合も並列処理可否の試行錯誤が必要であり、高速化できない場合があった。
 そこで、本実施形態では、より多くのアプリケーションを、自動でGPUで高性能化することを狙うとともに、GPUへのデータ転送回数を低減できる技術を提供する。
 次に、本実施形態のオフロードサーバ1によるデータ転送の一括処理手法について説明する。
 図6および図7は、本実施形態の環境適応機能部が処理するアプリケーションのソースコードのループ文を示す図であり、CPUプログラム側で定義した変数とGPUプログラム側で参照する変数が重なる場合の例である。
 本実施形態の制御部(環境適応機能部)11(図2参照)は、データ転送指定部113を備えている。
《本実施形態のCPUからGPUへのデータ転送》
 本実施形態では、CPUプログラム側で設定、定義した変数とGPUプログラム側で参照する変数が重なる場合は、CPUからGPUへのデータ転送が必要として、データ転送指定を行う。
 データ転送を指定する位置は、GPU処理するループ文かそれより上位のループ文で、かつ、該当変数の設定、定義を含まない最上位のループとする(図6参照)。データ転送指示行の挿入位置は、for,do,while等のループの直前に行う。
 図6は、CPUからGPUへのデータ転送する場合のループ文において、CPUプログラム側で定義した変数とGPUプログラム側で参照する変数が重なる場合の例である。
 図6に示す本実施形態のループ文は、CPUプログラム側で記述され、
(1) ループ〔 for|do|while 〕 {
}
の中に、
 (2) ループ〔 for|do|while 〕 {
 }
があり、さらにその中に、
  (3) ループ〔 for|do|while 〕 {
  }
があり、さらにその中に、
   (4) ループ〔 for 〕 {
   }
がある。
 また、(1) ループ〔 for|do|while 〕 {
}で、変数aが設定され、(4) ループ〔 for 〕 {
}で、変数aが参照される。
 さらに、(3) ループ〔 for|do|while 〕 {
}で、PGIコンパイラによるfor文等の並列処理可能処理部を、OpenACCのディレクティブ #pragma acc kernels(並列処理指定文)で指定している(詳細後記)。
 図6に示す本実施形態のループ文では、図6の符号mに示す位置に、データ転送指示行、ここでは変数aの copyin 節の #pragma acc data copyin(a[…])を挿入する。
 上記 #pragma acc data copyin(a[…])は、変数aの設定、定義を含まない最上位のループ(ここでは、(1) ループ〔 for|do|while 〕の中)に指定され、その挿入位置は、for,do,while等のループの直前(ここでは、(2) ループ〔 for|do|while 〕の前)である。
 このように、CPUからGPUへのデータ転送において、変数aの copyin 節の #pragma acc data copyin(a[…])を、上述した位置に挿入することによりデータ転送を明示的に指示する。これにより、できるだけ上位のループでデータ転送を一括して行うことができ、ループ毎に毎回データを転送する非効率な転送を避けることができる。
《本実施形態のGPUからCPUへのデータ転送》
 本実施形態では、GPUプログラム側で設定した変数とCPUプログラム側で参照、設定、定義する変数または大域変数(グローバル変数:全ての関数から直接アクセスすることができる変数)とが重なる場合は、GPUからCPUへのデータ転送が必要として、データ転送指定を行う。
 データ転送を指定する位置は、GPU処理するループ文か、それより上位のループ文で、かつ、該当変数の参照、設定、定義を含まない最上位のループとする(後記図7参照)。データ転送指示行の挿入位置は、for,do,while等のループの直前に行う。
 ここで、「設定」まで含めるのは、その設定がif文等で実行されたり、されなかったりするケースを考慮するためである。また、条件にCPU側で「定義」も含めているのは、変数のスコープ外に 展開しないためのガードである。大域変数は、解析対象ソース外で「参照」される可能性があるため、条件に含める。
 図7は、GPUからCPUへのデータ転送する場合のループ文において、CPUプログラム側で定義した変数とGPUプログラム側で参照する変数が重なる場合の例である。
 図7に示す本実施形態のループ文は、CPUプログラム側で記述され、
 (1) ループ〔 for|do|while 〕 {
}
の中に、
 (2) ループ〔 for|do|while 〕 {
 }
があり、さらにその中に、
  (3) ループ〔 for|do|while 〕 {
  }
があり、さらにその中に、
   (4) ループ〔 for 〕 {
   }
がある。
 また、(3) ループ〔 for|do|while 〕 {
}で、PGIコンパイラによるfor文等の並列処理可能処理部を、OpenACCのディレクティブ #pragma acc kernels(並列処理指定文)で指定している。
 さらに、(4) ループ〔 for 〕 {
}で、変数aが設定され、(2) ループ〔 for|do|while 〕 {
}で、変数aが参照される。
 図7に示す本実施形態のループ文では、図7の符号nに示す位置に、データ転送指示行、ここでは変数aの copyout 節の #pragma acc data copyout(a[…])を挿入する。
 上記 #pragma acc data copyout(a[…])は、変数aの参照、設定、定義を含まない最上位のループ(ここでは、(1) ループ〔 for|do|while 〕の中)に指定され、その挿入位置は、for,do,while等のループの直前(ここでは、(2) ループ〔 for|do|while 〕の前)である。
 上記copyout 動作が実行されるのは、図7の符号oに示すように、ループ終了後である。
 このように、GPUからCPUへのデータ転送において、変数aの copyout 節の #pragma acc data copyout(a[…])を、上述した位置に挿入することによりデータ転送を明示的に指示する。これにより、できるだけ上位のループでデータ転送を一括して行うことができ、ループ毎に毎回データを転送する非効率な転送を避けることができる。
《本実施形態のCPUからGPUへのデータ転送と、GPUからCPUへのデータ転送の往復》
 同じ変数に関して、CPUからGPUへの転送と、GPUからCPUへの転送が重なる場合は、データコピーの往復にまとめて指示する。
 具体的には、前記図6に示す本実施形態のループ文の #pragma acc data copyin(a[…])に代えて、#pragma acc data copy (a[…])を挿入する。
 上記 #pragma acc data copy(a[…])は、変数aの設定、定義を含まない最上位のループ(ここでは、(1) ループ〔 for|do|while 〕の中)に指定され、その挿入位置は、for,do,while等のループの直前(ここでは、(2) ループ〔 for|do|while 〕の前)である。
 このように、CPUからGPUへのデータ転送と、GPUからCPUへのデータ転送の往復において、変数aの copy 節の #pragma acc data copy(a[…])を、上述した位置に挿入することによりデータ転送を明示的に指示する。また、上記 #pragma acc data copy(a[…])を用いることで、前記図7に示す上記 #pragma acc data copyout(a[…])を挿入を省略することができる。
 以上、本実施形態では、できるだけ上位のループでデータ転送を一括して行うように、データ転送を明示的に指示することで、ループ毎に毎回データを転送する非効率な転送を避けることができる。
[GPUオフロード処理]
 上述したデータ転送の一括処理手法により、オフロードに適切なループ文を抽出し、非効率なデータ転送を避けることができる。
 ただし、上記データ転送の一括処理手法を用いても、GPUオフロードに向いていないプログラムも存在する。効果的なGPUオフロードには、オフロードする処理のループ回数が多いことが必要である。
 そこで、本実施形態では、本格的なオフロード処理探索の前段階として、プロファイリングツールを用いて、ループ回数を調査する。プロファイリングツールを用いると、各行の実行回数を調査できるため、例えば、5000万回以上のループを持つプログラムをオフロード処理探索の対象とする等、事前に振り分けることができる。以下、具体的に説明する(前記図5で述べた内容と一部重複する)。
 本実施形態では、まず、オフロード処理部を探索するアプリケーションを分析し、for,do,while等のループ文を把握する。次に、サンプル処理を実行し、プロファイリングツールを用いて、各ループ文のループ回数を調査し、一定の値以上のループがあるか否かで、オフロード処理部探索を本格的に行うか否かの判定を行う。
 探索を本格的に行うと決まった場合は、GAの処理に入る(前記図5参照)。初期化ステップでは、アプリケーションコードの全ループ文の並列可否をチェックした後、並列可能ループ文をGPU処理する場合は1、しない場合は0として遺伝子配列にマッピングする。遺伝子は、指定の個体数が準備されるが、遺伝子の各値にはランダムに1,0の割り当てをする。
 ここで、遺伝子に該当するコードでは、GPU処理すると指定されたループ文内の変数データ参照関係から、データ転送の明示的指示(#pragma acc data copyin/copyout/copy)を追加する。
 評価ステップでは、遺伝子に該当するコードをコンパイルして検証用マシンにデプロイして実行し、ベンチマーク性能測定を行う。性能が良いパターンの遺伝子の適合度を高くする。遺伝子に該当するコードは、上述のように、並列処理指示行とデータ転送指示行(例えば、図6の符号l、図7の符号m参照参照)が挿入されている。
 選択ステップでは、適合度に基づいて、高適合度の遺伝子を、指定の個体数選択する。本実施形態では、適合度に応じたルーレット選択および最高適合度遺伝子のエリート選択を行う。交叉ステップでは、一定の交叉率Pcで、選択された個体間で一部の遺伝子をある一点で交換し、子の個体を作成する。突然変異ステップでは、一定の突然変異率Pmで、個体の遺伝子の各値を0から1または1から0に変更する。
 突然変異ステップまで終わり、次の世代の遺伝子が指定個体数作成されると、初期化ステップと同様に、データ転送の明示的指示を追加し、評価、選択、交叉、突然変異ステップを繰り返す。
 最後に、終了判定ステップでは、指定の世代数、繰り返しを行った後に処理を終了し、最高適合度の遺伝子を解とする。最高適合度の遺伝子に該当する、最高性能のコードパターンで、本番環境に改めてデプロイして、ユーザに提供する。
 以下、図2に示すオフロードサーバ1の制御部(環境適応機能部)11の動作について、図4を参照して説明する。
<FPGA向けオフロード>
 GPUでは高速化は、ループ文等の並列処理が中心であった。一方、FPGAでは、並列処理とパイプライン処理を活用して高速化するのが一般的であり、オフロードの自由度は高いが、機械がオフロード用のロジックを自動生成することは難しいのが現状である。そこで、FPGAのオフロードでは、今までにプログラマーが蓄積したノウハウ(Well-knownパターン)を活かして、大きな単位でオフロードする。
 具体的には、図4のステップS11のコード分析で把握した、類似コード検出等を用いたコード機能ブロックが、例えばFFT処理である場合や、ライブラリ呼び出しでFFT処理を呼び出している場合に、FFT処理で既に定義されているFPGAロジックに置換して、オフロードを行う。この置換のために、コードパターンDB132は、FPGAにオフロード可能な処理のライブラリ呼び出しや機能ブロックと、オフロードするFPGAの処理ロジックをOpenCLやHDLで記述したコードを、登録している。制御部(環境適応機能部)11は、コード分析結果と、コードパターンDB132を照合し、オフロード可能な処理を、FPGAにオフロードする処理ロジック記述に置換する。
 <リソース量調整>
 図4のステップS14,S15のリソース量調整については、まず適切なリソース比を決め、次に性能、コスト要件に合うリソース量に設定する。アプリケーションをCPUとGPUで動作させるようオフロードするコードに、図4のステップS11-S13で変換したとして、コード自体は適切であっても、CPUとオフロード先であるGPUとのリソース量が適切なバランスでない場合は、性能が出ない。例えば、ある処理を行う際に、CPUの処理時間が1000秒,GPUの処理時間が1秒では、CPUがボトルネックとなるっている。非特許文献2では、CPUとGPUを使ってMapReduceフレームワークで処理している際に、CPUとGPUの実行時間が同じになるようMapタスクを配分することで、全体の高性能化を図っている。本実施形態では、リソース比を決める際は、何れかのハードウェアでの処理がボトルネックとなる配置を避けるため、想定するテストケースの処理時間から、リソース量計算部116が、CPUとオフロード先の処理時間が同等のオーダーになるように、リソース比を決定する。
 リソース比を決定後は、想定するテストケースの処理性能が、図4のステップS14,S15でユーザが指定した要求性能およびコスト要求を満たすように、リソース量計算部116が、リソース比をキープして、リソース量を決定する。
 <配置場所調整>
 図4のステップS15の配置場所調整では、性能、コストが適切になる場所を計算し配置先を決める。適切な配置先を決める手法については、最適化計算を用いた手法をとる。配置先を決めるための情報としては、配置するアプリケーションの想定するテストケースの性能情報(処理遅延やスループット)と、システムで利用できる設備リソース情報(クラウド、エッジ、Home GW等の計算リソース、ノード間帯域、およびその既に利用されている量と、利用した際のコスト)がある。
 配置先を決定するロジックは、以下のようになる。想定テストケースの性能結果から、アプリケーションを配置した際の計算量と発生トラフィックを算出する。併せて、クラウド、エッジ、Home GW等のリンク関係をモデル化しておく。アプリケーションを特定のノードに配置した際に、コストが要求条件に収まることを制約条件に、処理遅延やスループット等の性能を最大化する配置、あるいは性能が要求条件を満たす形でコストが最低になる配置を、最適化手法(例えば、線形計画手法等)を用いて導く。ここで、アプリケーションが、エッジとクラウドのように分割される場合は、その組み合わせに対して最適計算を行う。
 <配置場所調整>
 図4のステップS23の動作検証では、図4のステップS12,S13で決まった実行ファイルを図4のステップS14の指定リソース量で図4のステップS15の指定場所に配置した後に、期待通りの動作であることを、性能検証テストケースやリグレッションテストケースを実行することで確認する。性能検証テストケースは、ユーザが指定した想定テストケースをJenkins等の試験自動実行ツールを用いて行い、処理時間やスループット等を測定する。リグレッションテストについては、システムにインストールされるミドルウェアやOS等のソフトウェアの情報を取得して、それらに対応するリグレッションテストをJenkins等を用いて実行する自動検証技術(非特許文献3参照)を用いる。
 動作検証の結果として、性能検証テストケースの処理時間やスループット、リグレッションテストの実行結果の情報が、ユーザに提示される。ユーザには合わせて、確保したリソース(仮想マシンスペックや数等)とその価格が提示されており、それら情報を参照してユーザは運用開始を判断する。
 <運用中再構成>
 アプリケーション運用において、図4のステップS23の運用開始後、リクエスト特性の変化等で当初期待していた性能が出ない場合に、再構成シミュレーション試算部125は、ソフトウェア設定、ソフトウェア/ハードウェア構成を再構成する。再構成の判断は、運用開始前に想定したテストケースでなく、現在の実運用にマッチするテストケースを元に、図4のステップS11-S15のコード変換、リソース量調整、配置場所調整を試行模擬し、性能、コストが、ユーザの期待を満たす場合に、ユーザ提供部127が、再構成をユーザに提案し、ユーザ了承後、再構成する。再構成は、再構成実行部126の再構成先構築部121a(図2参照)が実行する。
 <ソフトウェア設定>
 ソフトウェア設定の変更は、図4のステップS14,S15の処理を、周期的、または、性能がある閾値以下となった場合に試行模擬し、性能向上やコスト低減度合を計算する。リソース量の変更や配置場所の変更で性能やコストが改善できる見込みがある場合は、ユーザに再構成を提案する。ユーザ了承を得て、再構成を実施する場合に、リソースを変更する際は、クラウド関連技術により、メモリサイズ等の変更であれば断時間は無く変更できることが多い。
 <マイグレーション>
 配置場所変更の際は、一括プロビジョニング技術(OpenStack Heatを使った手法等(非特許文献4参照)を用いて、移行先環境を複製しておき、そこに移行元からマイグレーションを行う。マイグレーションは、再構成実行部126のマイグレーション処理部126b(図2参照)が行う。
 配置場所変更で、ディスクが共用でよい場合は、OpenStack等でサポートされる仮想マシンの移行を行うライブマイグレーションを行う。また、配置場所が大きく変わりディスク情報も含めて移行する場合は、ブロックマイグレーションを行う。GPU等のハードウェアは仮想マシンでなく、コンテナで制御する場合が多いため、コンテナの移行時は、LXD等のコンテナ管理技術を使ってマイグレーションを行う。
 <ソフトウェア/ハードウェア構成>
 ソフトウェア/ハードウェア構成の変更は、図4のステップS12,S13の処理を、周期的、または、性能がある閾値以下となった場合に試行模擬し、コード変換して、GPUオフロードのソフトロジック変更やFPGAのハードロジックの変更で、性能やコストが改善できる見込みがある場合は、ユーザに再構成を提案する(非特許文献5参照)。ユーザ了承を得て、再構成を実行する際に、GPUオフロードするソフトロジックの変更等や、ソフトウェア構成の変更の場合には、更新する実行ファイルを起動する環境を複製後、アプリケーション実行中のデータをマイグレーションする。
 <ハードロジック変更>
 再構成を実行する際に、FPGA等のハードロジックを変更する場合は、ソフトウェア構成の変更時と同様に移行先にハードロジックを構成済みのFPGAを準備し、アプリケーション実行中のデータをマイグレーションする方法と、FPGAのハードロジックを運用中に再構成する方法とがある。FPGAのハードロジック構成の再構成は、近年のAltera,Xilinxのツールを用いると、運用中の数秒単位での再構成が可能である。ハードロジックの変更は、SQL DBとNo SQLのDBを両運用している場合に、当初SQLリクエストが多かったが、No SQLリクエストが一定よりも増えてきた場合に、No SQLをアクセラレートするFPGAにロジックを再構成する等がある。
 以下、オフロードサーバ1の実装を説明する。本実装は、本実施形態の有効性を確認するためのものである。
<実装の動作概要>
 実装の動作概要を説明する。
 実装はPerl 5(Perlバージョン5)で行い、以下の処理を行う。
 下記図8のフローの処理を開始する前に、高速化するアプリケーションとそれを性能測定するベンチマークツールを準備する。
 実装では、アプリケーションの利用依頼があると、まず、アプリケーションのコードを解析して、for文を発見するとともに、for文内で使われる変数データ等の、プログラム構造を把握する。構文解析には、LLVM/Clangの構文解析ライブラリ(libClangのpython binding)等を使用する。
 実装では、最初に、そのアプリケーションがGPUオフロード効果があるかの見込みを得るため、ベンチマークを実行し、上記構文解析で把握したfor文のループ回数を把握する。ループ回数把握には、GNUカバレッジのgcov等を用いる。プロファイリングツールとしては、「GNUプロファイラ(gprof)」、「GNUカバレッジ(gcov)」が知られている。双方とも各行の実行回数を調査できるため、どちらを用いてもよい。実行回数は、例えば、1000万回以上のループ回数を持つアプリケーションのみ対象とするようにできるが、この値は変更可能である。
 CPU向け汎用アプリケーションは、並列化を想定して実装されているわけではない。そのため、まず、GPU処理自体が不可なfor文は排除する必要がある。そこで、各for文一つずつに対して、並列処理の#pragma acc kernels ディレクティブ挿入を試行し、コンパイル時にエラーが出るかの判定を行う。コンパイルエラーに関しては、幾つかの種類がある。for文の中で外部ルーチンが呼ばれている場合、ネストfor文で異なる階層が重複指定されている場合、break等でfor文を途中で抜ける処理がある場合、for文のデータにデータ依存性がある場合等がある。アプリケーションによって、コンパイル時エラーの種類は多彩であり、これ以外の場合もあるが、コンパイルエラーは処理対象外とし、#pragmaディレクティブは挿入しない。
 コンパイルエラーは自動対処が難しく、また対処しても効果が出ないことも多い。外部ルーチンコールの場合は、#pragma acc routineにより回避できる場合があるが、多くの外部コールはライブラリであり、それを含めてGPU処理してもそのコールがネックとなり性能が出ない。for文一つずつを試行するため、ネストのエラーに関しては、コンパイルエラーは生じない。また、break等で途中で抜ける場合は、並列処理にはループ回数を固定化する必要があり、プログラム改造が必要となる。データ依存が有る場合はそもそも並列処理自体ができない。
 ここで、並列処理してもエラーが出ないループ文の数がaの場合、aが遺伝子長となる。遺伝子の1は並列処理ディレクティブ有、0は無に対応させ、長さaの遺伝子に、アプリケーションコードをマッピングする。
 次に、初期値として、指定個体数の遺伝子配列を準備する。遺伝子の各値は、図5で説明したように、0と1をランダムに割当てて作成する。準備された遺伝子配列に応じて、遺伝子の値が1の場合は並列処理を指定するディレクティブ #pragma acc kernels をC/C++コードに挿入する。この段階で、ある遺伝子に該当するコードの中で、GPUで処理させる部分が決まる。上記Clangで解析した、for文内の変数データの参照関係をもとに、上述したルールに基づいて、CPUからGPUへのデータ転送、その逆の場合のディレクティブ指定を行う。
 具体的には、CPUからGPUへのデータ転送が必要な変数は、 #pragma acc data copyinで指定し(図6参照)、GPUからCPUへのデータ転送が必要な変数は、 #pragma acc data copyoutで指定する(図7参照)。同じ変数に関して、copyinとcopyoutが重なる場合は、#pragma acc data copyで纏め、記述をシンプルにする。
 並列処理およびデータ転送のディレクティブを挿入されたC/C++コードを、GPUを備えたマシン上のPGIコンパイラでコンパイルを行う。コンパイルした実行ファイルをデプロイし、ベンチマークツールで性能を測定する。
 全個体数に対して、ベンチマーク性能測定後、ベンチマーク処理時間に応じて、各遺伝子配列の適合度を設定する。設定された適合度に応じて、残す個体の選択を行う。選択された個体に対して、交叉処理、突然変異処理、そのままコピー処理のGA処理を行い、次世代の個体群を作成する。
 次世代の個体に対して、ディレクティブ挿入、コンパイル、性能測定、適合度設定、選択、交叉、突然変異処理を行う。ここで、GA処理の中で、以前と同じパターンの遺伝子が生じた場合は、その個体についてはコンパイル、性能測定をせず、以前と同じ測定値を用いる。
 指定世代数のGA処理終了後、最高性能の遺伝子配列に該当する、ディレクティブ付きコードを解とする。
 この中で、個体数、世代数、交叉率、突然変異率、適合度設定、選択方法は、GAのパラメータであり、別途指定する。提案技術は、上記処理を自動化することで、従来、専門技術者の時間とスキルが必要だった、GPUオフロードの自動化を可能にする。
 図8A-Bは、上述した実装の動作概要を説明するフローチャートであり、図8Aと図8Bは、結合子で繋がれる。
 <コード解析>
 ステップS101で、アプリケーションコード分析部112(図2参照)は、アプリのコード解析を行う。
 <ループ文特定>
 ステップS102で、オフロード処理指定部114(図2参照)は、アプリのループ文、参照関係および機能ブロックを特定する。
 <ループ文の並列処理可能性>
 ステップS103で、オフロード処理指定部114は、各ループ文の並列処理可能性をチェックする。
 <ループ文の繰り返し>
 制御部(環境適応機能部)11は、ステップS104のループ始端とステップS107のループ終端間で、ステップS105-S106の処理についてループ文の数だけ繰り返す。
 ステップS105で、オフロード処理指定部114は、各ループ文に対して、中間言語でパイプライン処理を指定してコンパイルする。なお、パイプライン処理の一つに並列処理がある。
 ステップS106で、オフロード処理指定部114は、エラー時は、該当ループ文は、対象外とする。
 ステップS108で、オフロード処理指定部114は、コンパイルエラーが出ないループ文の数と機能ブロック数をカウントし、遺伝子長とする。
 <指定個体数パターン準備>
 次に、初期値として、オフロード処理指定部114は、指定個体数の遺伝子配列を準備する。ここでは、0と1をランダムに割当てて作成する。
 ステップS109で、オフロード処理指定部114は、アプリコードを、遺伝子にマッピングし、指定パターン数準備を行う。
 準備された遺伝子配列に応じて、遺伝子の値が1の場合は並列処理を指定するディレクティブをコードに挿入する(例えば図5(b)の#pragmaディレクティブ参照)。
 制御部(環境適応機能部)11は、ステップS110のループ始端とステップS118のループ終端間で、ステップS111-S118の処理について指定世代数繰り返す。
 また、上記指定世代数繰り返しにおいて、さらにステップS111のループ始端とステップS115のループ終端間で、ステップS112-S114の処理について指定個体数繰り返す。すなわち、指定世代数繰り返しの中で、指定個体数の繰り返しが入れ子状態で処理される。
 <データ転送指定>
 ステップS112で、データ転送指定部113は、変数参照関係をもとに、データ転送指定し、特定パターンで並列、パイプライン処理、機能ブロックのオフロードを指定したアプリの中間言語を作成する。
 上記ステップS112において、ループ文特定するところまでは共通処理であり、その後、GPU、FPGA、パイプライン処理、またはFFT処理などの機能ブロックに対応した処理を行う。例えば、GPUの際は並列処理を行う、FPGAの際は並列処理やパイプライン処理を行う、FFT処理などの機能ブロックであればオフロード用の中間言語を作成する。
 なお、パイプライン処理の一つである並列処理を例にとり、明示的指示行(#pragma acc data copy/in/out)を用いたデータ転送指定について、図6-図7により説明した。
 <コンパイル>
 ステップS113で、検証環境用性能測定部119(図2参照)は、CPU-GPU搭載の検証用マシン14に、中間言語をもとに実行ファイルを配置する。
 ステップS114で、検証環境用性能測定部119は、配置したバイナリファイルを実行し、テストケース性能を測定する。
 ここで、途中世代で、以前と同じパターンの遺伝子については測定せず、同じ値を使う。つまり、GA処理の中で、以前と同じパターンの遺伝子が生じた場合は、その個体についてはコンパイルや性能測定をせず、以前と同じ測定値を用いる。
 ステップS116で、実行ファイル作成部120(図2参照)は、処理時間が短いパターンほど適合度が高くなるように評価し、性能の高いパターンを選択する。
 ステップS117で、実行ファイル作成部120は、選択パターンに対して、交叉、突然変異の処理を行い、次世代のパターンを作成する。次世代のパターンに対して、コンパイル、性能測定、適合度設定、選択、交叉、突然変異処理を行う。
 すなわち、全個体に対して、ベンチマーク性能測定後、ベンチマーク処理時間に応じて、各遺伝子配列の適合度を設定する。設定された適合度に応じて、残す個体の選択を行う。選択された個体に対して、交叉処理、突然変異処理、そのままコピー処理のGA処理を行い、次世代の個体群を作成する。
 ステップS119で、実行ファイル作成部120は、指定世代数のGA処理終了後、最高性能の遺伝子配列に該当するコード(最高性能のオフロードパターン)を解とする。
 <GAのパラメータ>
 上記、個体数、世代数、交叉率、突然変異率、適合度設定、選択方法は、GAのパラメータである。GAのパラメータは、例えば、以下のように設定してもよい。
 実行するSimple GAの、パラメータ、条件は例えば以下のようにできる。
 遺伝子長:並列可能ループ文数
 個体数M:遺伝子長以下
 世代数T:遺伝子長以下
 適合度:(処理時間)(-1/2)
 この設定により、ベンチマーク処理時間が短い程、高適合度になる。また、適合度を、処理時間の(-1/2)乗とすることで、処理時間が短い特定の個体の適合度が高くなり過ぎて、探索範囲が狭くなるのを防ぐことができる。また、性能測定が一定時間で終わらない場合は、タイムアウトさせ、処理時間1000秒等の時間(長時間)であるとして、適合度を計算する。このタイムアウト時間は、性能測定特性に応じて変更させればよい。
 選択:ルーレット選択
 ただし、世代での最高適合度遺伝子は交叉も突然変異もせず次世代に保存するエリート保存も合わせて行う。
 交叉率Pc:0.9
 突然変異率Pm:0.05
 <コストパフォーマンス>
 自動オフロード機能のコストパフォーマンスについて述べる。
 NVIDIA Tesla(登録商標)等の、GPUボードのハードウェアの価格だけを見ると、GPUを搭載したマシンの価格は、通常のCPUのみのマシンの約2倍となる。しかし、一般にデータセンタ等のコストでは、ハードウェアやシステム開発のコストが1/3以下であり、電気代や保守・運用体制等の運用費が1/3超であり、サービスオーダ等のその他費用が1/3程度である。本実施形態では、暗号処理や画像処理等動作させるアプリケーションで時間がかかる処理を2倍以上高性能化できる。このため、サーバハードウェア価格自体は2倍となっても、コスト効果が十分に期待できる。
 本実施形態では、gcov,gprof等を用いて、ループが多く実行時間がかかっているアプリケーションを事前に特定して、オフロード試行をする。これにより、効率的に高速化できるアプリケーションを見つけることができる。
 <本番サービス利用開始までの時間>
 本番サービス利用開始までの時間について述べる。
 コンパイルから性能測定1回は3分程度とすると、20の個体数、20の世代数のGAで最大20時間程度解探索にかかるが、以前と同じ遺伝子パターンのコンパイル、測定は省略されるため、8時間以下で終了する。多くのクラウドやホスティング、ネットワークサービスではサービス利用開始に半日程度かかるのが実情である。本実施形態では、例えば半日以内の自動オフロードが可能である。このため、半日以内の自動オフロードであれば、最初は試し利用ができるとすれば、ユーザ満足度を十分に高めることが期待できる。
 より短時間でオフロード部分を探索するためには、複数の検証用マシンで個体数分並列で性能測定することが考えられる。アプリケーションに応じて、タイムアウト時間を調整することも短時間化に繋がる。例えば、オフロード処理がCPUでの実行時間の2倍かかる場合はタイムアウトとする等である。また、個体数、世代数が多い方が、高性能な解を発見できる可能性が高まる。しかし、各パラメータを最大にする場合、個体数×世代数だけコンパイル、および性能ベンチマークを行う必要がある。このため、本番サービス利用開始までの時間がかかる。本実施形態では、GAとしては少ない個体数、世代数で行っているが、交叉率Pcを0.9と高い値にして広範囲を探索することで、ある程度の性能の解を早く発見するようにしている。
 以上説明したように、本実施形態に係るオフロードサーバ1(図2参照)は、アプリケーションのソースコードを分析するアプリケーションコード分析部112と、アプリケーションの並列処理可能なループ文、特定処理の機能ブロック、ライブラリ呼び出しを含むオフロード可能な処理を特定するオフロード処理指定部114と、配置先環境に合わせたコード変換をするオフロードパターン作成部115(コード変換部)と、コード変換されたアプリケーションをコンパイルして、検証用マシン14に配置し、検証用マシン14にオフロードした際の性能測定用処理を実行する検証環境用性能測定部119と、を反復し、配置先環境に合わせたリソース量の設定を行うリソース量指定部117と、オフロードパターン作成部115がコード変換した変換コードを、リソース量指定部117が設定したリソース量を確保して配置する際に、性能およびコストをもとに配置先を計算して配置場所を選択する配置先計算部118と、実行ファイル配置後、本番環境性能測定テスト抽出部122が抽出した性能試験項目を、運用装置15を用いて自動実行する本番環境性能測定テスト実行部123と、コード変換ステップ、リソース量設定ステップ、配置場所選択ステップ、性能測定ステップ、性能測定テストステップのいずれか一つ以上のステップを実行する環境適応処理を行う制御部11(環境適応機能部)と、を備える。
 この構成により、GPU,FPGA,IoTデバイス等環境が多様になる中で、アプリケーションを環境に合わせて適応させ、GPUやFPGAを適切に活用し、高性能にアプリケーションを動作させることができる。また、一度記述したソフトウェアを、異なる環境でも高性能に動作させることができる。
 本実施形態では、オフロード処理指定部114は、遺伝的アルゴリズムに基づき、コンパイルエラーが出ないループ文の数を遺伝子長とし、オフロードパターン作成部は、アクセラレータ処理をする場合を1または0のいずれか一方、しない場合を他方の0または1として、アクセラレータ処理可否を遺伝子パターンにマッピングし、遺伝子の各値を1か0にランダムに作成した指定個体数の遺伝子パターンを準備し、検証環境用性能測定部119は、各個体に応じて、アクセラレータにおける並列処理指定文を指定したアプリケーションコードをコンパイルして、検証用マシン14に配置し、検証用マシン14において性能測定用処理を実行する。実行ファイル作成部120は、全個体に対して、性能測定を行い、処理時間の短い個体ほど適合度が高くなるように評価し、全個体から、適合度が所定値より高いものを性能の高い個体として選択し、選択された個体に対して、交叉、突然変異の処理を行い、次世代の個体を作成し、指定世代数の処理終了後、最高性能のオフロードパターンを解として選択する。
 このように、最初に並列可能なループ文のチェックを行い、次に並列可能繰り返し文群に対してGAを用いて検証環境で性能検証試行を反復し適切な領域を探索する。並列可能なループ文(例えばfor文)に絞った上で、遺伝子の部分の形で、高速化可能なオフロードパターンを保持し組み換えていくことで、取り得る膨大なオフロードパターンから、効率的に高速化可能なパターンを探索できる。
 本実施形態では、配置先環境がFPGAを備え、オフロード処理指定部114は、機能ブロック処理、ライブラリ呼び出しを含むアプリケーションの処理構造から、コードパターンDBを参照して、機能ブロック処理、ライブラリ呼び出しを含むFPGAにオフロード可能な処理を特定し、コードパターンDBからオフロードに該当する中間言語の定義情報を、アプリケーションソースコードに置換する。
 このようにすることで、機能ブロック処理、ライブラリ呼び出しを含むFPGAにオフロード可能な処理を特定して、アプリケーションソースコードに置換することができる。
 本実施形態では、リソース量指定部117は、アプリケーションテストケースの処理時間から、CPUとオフロード先の処理時間が同等のオーダーになるように、CPUとオフロード先のリソース比を定め、リソース比を決定後は、想定するテストケースの処理性能が、要求性能およびコスト要求を満たすようにリソース比はキープしつつ、リソース量を設定する。
 このように、CPUとオフロード先のリソース比を定めて、要求性能およびコスト要求を満たした上で、リソース量を設定することができる。
 本実施形態では、配置先計算部118は、アプリケーションテストケースの結果から、アプリケーションを配置した際の計算量と発生トラフィックを算出し、クラウド、エッジ、Home GWを含むリンク関係をモデル化し、アプリケーションを特定のノードに配置した際に、コストが要求条件に収まることを制約条件に、処理遅延および/またはスループットの性能を最大化する配置、あるいは性能が要求条件を満たす形でコストが最低になる配置のいずれかを線形計画手法を用いて計算する。
 この構成により、処理遅延、スループットの性能の最大化、または性能が要求条件を満たす形でコストが最低になる配置場所を選択することができる。
 本実施形態では、アプリケーション運用開始後に、当初期待していた性能が出ない場合に、ソフトウェア設定を再構成する再構成実行部126を備える。
 この構成により、ユーザに再構成を提案して、ユーザ了承を得た場合には、アプリケーション実行環境をマイグレーションすることができる。
 本実施形態では、再構成実行部126が、コード変換処理を、周期的、または、性能がある閾値以下となった場合に試行模擬し、コード変換して、GPUオフロードのソフトロジック変更やFPGAのハードロジックの変更で、性能やコストが改善できる見込みがある場合は、ユーザに再構成を提案し、ユーザ了承を得て、再構成を実行する際に、GPUオフロードするソフトロジックの変更を行う。ソフトウェア構成の変更の場合は、マイグレーション処理部126bが、更新する実行ファイルを起動する環境を複製後、アプリケーションのデータのマイグレーションを行い、FPGAのハードロジックを変更する場合は、マイグレーション処理部126bが、移行先にハードロジックを構成済みのFPGAを準備しFPGAを制御するコンテナ等をマイグレーションを行う、もしくは、再構成実行部が、FPGAのハードロジックを再構成する。
 この構成により、ユーザに再構成を提案して、ユーザ了承を得た場合、ソフトウェア構成の変更のときは、アプリケーションのデータのマイグレーションを、またハードロジックを構成済みのFPGAを準備しFPGAを制御するコンテナ等をマイグレーションすることができる。
 また、上記実施形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部又は一部を手作業で行うこともでき、あるいは、手作業で行われるものとして説明した処理の全部又は一部を公知の方法で自動的に行うこともできる。この他、上述文書中や図面中に示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。
 また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。
 また、上記の各構成、機能、処理部、処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行するためのソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、又は、IC(Integrated Circuit)カード、SD(Secure Digital)カード、光ディスク等の記録媒体に保持することができる。
 また、本実施形態では、組合せ最適化問題を、限られた最適化期間中に解を発見できるようにするため、遺伝的アルゴリズム(GA)の手法を用いているが、最適化の手法はどのようなものでもよい。例えば、local search(局所探索法)、Dynamic Programming(動的計画法)、これらの組み合わせでもよい。
 また、本実施形態では、C/C++向けOpenACCコンパイラを用いているが、GPU処理をオフロードできるものであればどのようなものでもよい。例えば、Java lambda(登録商標) GPU処理、IBM Java 9 SDK(登録商標)でもよい。なお、並列処理指定文は、これらの開発環境に依存する。
 例えば、Java(登録商標)では、Java 8よりlambda形式での並列処理記述が可能である。IBM(登録商標)は、lambda形式の並列処理記述を、GPUにオフロードするJITコンパイラを提供している。Javaでは、これらを用いて、ループ処理をlambda形式にするか否かのチューニングをGAで行うことで、同様のオフロードが可能である。
 また、本実施形態では、繰り返し文(ループ文)として、for文を例示したが、for文以外のwhile文やdo-while文も含まれる。ただし、ループの継続条件等を指定するfor文がより適している。
 1 オフロードサーバ
 11 制御部
 12 入出力部
 13 記憶部
 14 検証用マシン(アクセラレータ検証用装置)
 15 運用装置
 15 OpenIoTリソース
 111 アプリケーションコード指定部
 112 アプリケーションコード分析部
 113 データ転送指定部
 114 オフロード処理指定部
 114a オフロード可能部抽出部
 114b 中間言語ファイル出力部
 115 オフロードパターン作成部
 116 リソース量計算部(リソース量設定部)
 117 リソース量指定部(リソース量設定部)
 118 配置先計算部(配置場所選択部)
 119 検証環境用性能測定部
 120 実行ファイル作成部
 121 本番環境配置部
 122 本番環境性能測定テスト抽出部
 123 本番環境性能測定テスト実行部
 124 再構成必要性定期チェック部
 125 再構成シミュレーション試算部
 126 再構成実行部
 126a 再構成先構築部
 126b マイグレーション処理部
 127 ユーザ提供部
 130 アプリケーションコード
 131 テストケースDB
 132 コードパターンDB
 133 設備リソースDB
 134 中間言語ファイル
 151 Io GWを有する装置
 152 CPU-GPUを有する装置
 153 CPU-FPGAを有する装置
 154 CPUを有する装置

Claims (8)

  1.  アプリケーションの特定処理をアクセラレータにオフロードするオフロードサーバのソフトウェア最適配置方法であって、
     前記オフロードサーバは、
     アプリケーションのソースコードを分析するアプリケーションコード分析ステップと、
     前記アプリケーションの並列処理可能なループ文、特定処理の機能ブロック、ライブラリ呼び出しを含むオフロード可能な処理を特定するオフロード処理指定ステップと、
     配置先環境に合わせたコード変換をするコード変換ステップと、
     コード変換された前記アプリケーションをコンパイルして、アクセラレータ検証用装置に配置し、前記アクセラレータ検証用装置にオフロードした際の性能測定用処理を実行する検証環境用性能測定ステップと、を反復し、
     前記配置先環境に合わせたリソース量の設定を行うリソース量設定ステップと、
     前記コード変換ステップがコード変換した変換コードを、前記リソース量設定ステップが設定したリソース量を確保して配置する際に、性能およびコストをもとに配置先を計算して配置場所を選択する配置場所選択ステップと、
     本番環境配置後に、前記アプリケーションをコンパイルして、運用装置に配置し、前記運用装置にオフロードした実際の性能測定テストを実行する性能測定テストステップと、を備え、
     前記コード変換ステップ、前記リソース量設定ステップ、前記配置場所選択ステップ、前記検証環境用性能測定ステップ、前記性能測定テストステップのいずれか一つ以上のステップを実行する
     ことを特徴とするオフロードサーバのソフトウェア最適配置方法。
  2.  コンパイルエラーが出るループ文に対して、オフロード対象外とするとともに、コンパイルエラーが出ないループ文に対して、オフロード処理するかしないかの指定を行うオフロード処理パターンを作成するオフロードパターン作成ステップと、
     所定回数繰り返された、性能測定結果をもとに、複数のオフロードパターンから最高処理性能のオフロードパターンを選択し、最高処理性能のオフロードパターンをコンパイルして実行ファイルを作成する実行ファイル作成ステップと、をさらに有し、
     前記オフロード処理指定ステップにおいて、遺伝的アルゴリズムに基づき、
     コンパイルエラーが出ないループ文の数を遺伝子長とし、
     前記オフロードパターン作成ステップにおいて、アクセラレータ処理をする場合を1または0のいずれか一方、しない場合を他方の0または1として、アクセラレータ処理可否を遺伝子パターンにマッピングし、
     前記遺伝子の各値を1か0にランダムに作成した指定個体数の前記遺伝子パターンを準備し、
     前記性能測定ステップにおいて、各個体に応じて、前記アクセラレータにおける並列処理指定文を指定したアプリケーションコードをコンパイルして、前記アクセラレータ検証用装置に配置し、
     前記アクセラレータ検証用装置において性能測定用処理を実行し、
     前記実行ファイル作成ステップにおいて、全個体に対して、性能測定を行い、処理時間の短い個体ほど適合度が高くなるように評価し、
     全個体から、前記適合度が所定値より高いものを性能の高い個体として選択し、
     選択された個体に対して、交叉、突然変異の処理を行い、次世代の個体を作成し、
     指定世代数の処理終了後、最高性能の前記オフロードパターンを解として選択する
     ことを特徴とする請求項1に記載のオフロードサーバのソフトウェア最適配置方法。
  3.  前記配置先環境が、前記アクセラレータとしてFPGA(Field Programmable Gate Array)を備え、
     前記オフロード処理指定ステップにおいて、
     機能ブロック処理、ライブラリ呼び出しを含むアプリケーションの処理構造から、コードパターンDBを参照して、機能ブロック処理、ライブラリ呼び出しを含む前記FPGAにオフロード可能な処理を特定し、前記コードパターンDBからオフロードに該当する中間言語の定義情報を、アプリケーションソースコードに置換する
     ことを特徴とする請求項1に記載のオフロードサーバのソフトウェア最適配置方法。
  4.  前記リソース量設定ステップにおいて、
     アプリケーションテストケースの処理時間から、CPUとオフロード先の処理時間が同等のオーダーになるように、CPUとオフロード先のリソース比を定め、
     前記リソース比の決定後は、想定するテストケースの処理性能が、要求性能およびコスト要求を満たすように前記リソース比はキープしつつ、リソース量を設定する
     ことを特徴とする請求項1に記載のオフロードサーバのソフトウェア最適配置方法。
  5.  前記配置場所選択ステップにおいて、
     アプリケーションテストケースの結果から、アプリケーションを配置した際の計算量と発生トラフィックを算出し、
     クラウド、エッジ、Home GW(gateway)を含むリンク関係をモデル化し、アプリケーションを特定のノードに配置した際に、コストが要求条件に収まることを制約条件に、処理遅延および/またはスループットの性能を最大化する配置、あるいは性能が要求条件を満たす形でコストが最低になる配置のいずれかを計算する
     ことを特徴とする請求項1に記載のオフロードサーバのソフトウェア最適配置方法。
  6.  アプリケーション運用開始後に、当初期待していた性能が出ない場合に、ソフトウェア設定を再構成する再構成実行ステップを有し、
     前記再構成実行ステップにおいて、
     ソフトウェア設定の変更では、リソース量設定、配置場所選択の試行計算を周期的、または、性能がある閾値以下となった場合に試行模擬し、性能向上やコスト低減度合を計算し、リソース量の変更や配置場所の変更で性能やコストが改善できる見込みがある場合に、ユーザに再構成を提案し、ユーザ了承を得て、再構成を実行する場合に、リソースを変更する再構成先構築ステップと、
     配置場所変更の際、移行先環境を複製して、そこに移行元からアプリケーション実行環境をマイグレーションするマイグレーション処理ステップと、を実行する
     ことを特徴とする請求項1に記載のオフロードサーバのソフトウェア最適配置方法。
  7.  前記再構成実行ステップにおいて、コード変換処理を、周期的、または、性能がある閾値以下となった場合に試行模擬し、コード変換して、GPUオフロードのソフトロジック変更および/またはFPGA(Field Programmable Gate Array)のハードロジックの変更で、性能やコストが改善できる見込みがある場合は、ユーザに再構成を提案し、ユーザ了承を得て、再構成を実行する際に、GPUオフロードするソフトロジックの変更を行い、
     ソフトウェア構成の変更の場合は、前記マイグレーション処理ステップが、更新する実行ファイルを起動する環境を複製後、アプリケーションのデータのマイグレーションを行い、
     FPGAのハードロジックを変更する場合は、前記マイグレーション処理ステップにおいて、移行先にハードロジックを構成済みのFPGAを準備し当該FPGAを制御するコンテナのマイグレーションを行う、もしくは、前記再構成実行ステップにおいて、当該FPGAのハードロジックを再構成する
     ことを特徴とする請求項6に記載のオフロードサーバのソフトウェア最適配置方法。
  8.  コンピュータを、請求項1乃至請求項7のうちいずれか1項に記載のオフロードサーバのソフトウェア最適配置方法として機能させるためのプログラム。
PCT/JP2020/007255 2019-02-22 2020-02-21 オフロードサーバのソフトウェア最適配置方法およびプログラム WO2020171234A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/432,701 US11614927B2 (en) 2019-02-22 2020-02-21 Off-load servers software optimal placement method and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019030871A JP7063289B2 (ja) 2019-02-22 2019-02-22 オフロードサーバのソフトウェア最適配置方法およびプログラム
JP2019-030871 2019-02-22

Publications (1)

Publication Number Publication Date
WO2020171234A1 true WO2020171234A1 (ja) 2020-08-27

Family

ID=72144250

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/007255 WO2020171234A1 (ja) 2019-02-22 2020-02-21 オフロードサーバのソフトウェア最適配置方法およびプログラム

Country Status (3)

Country Link
US (1) US11614927B2 (ja)
JP (1) JP7063289B2 (ja)
WO (1) WO2020171234A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115134243A (zh) * 2022-09-02 2022-09-30 北京科技大学 一种工业控制任务分布式部署方法及系统
WO2023228369A1 (ja) * 2022-05-26 2023-11-30 日本電信電話株式会社 オフロードサーバ、オフロード制御方法およびオフロードプログラム

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230385178A1 (en) 2020-10-12 2023-11-30 Nippon Telegraph And Telephone Corporation Offload server, offload control method, and offload program
JPWO2022097245A1 (ja) * 2020-11-05 2022-05-12
JPWO2022102071A1 (ja) * 2020-11-12 2022-05-19
KR102382884B1 (ko) * 2020-11-13 2022-04-06 한국전자기술연구원 엣지 단말의 클러스터 구성 및 운용 시스템 및 방법
US11917230B2 (en) * 2020-12-21 2024-02-27 Quanta Cloud Technology Inc. Method and system for maximizing uplink bandwidth in a communication system
US11972297B2 (en) * 2021-05-18 2024-04-30 Microsoft Technology Licensing, Llc Generating abstractions for offloading tasks to heterogeneous accelerators
US11726904B2 (en) * 2021-09-23 2023-08-15 International Business Machines Corporation Controlled input/output in progress state during testcase processing
WO2023188437A1 (ja) * 2022-04-01 2023-10-05 日本電信電話株式会社 制御装置、制御方法、及びプログラム
WO2024079886A1 (ja) * 2022-10-14 2024-04-18 日本電信電話株式会社 オフロードサーバ、オフロード制御方法およびオフロードプログラム

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011186701A (ja) * 2010-03-08 2011-09-22 Nec Corp リソース割当装置、リソース割当方法、およびリソース割当プログラム
JP2017142581A (ja) * 2016-02-08 2017-08-17 日本電信電話株式会社 構成選択システム、構成選択方法及びプログラム
WO2017170309A1 (ja) * 2016-03-31 2017-10-05 日本電気株式会社 ネットワークシステム、その管理方法および装置ならびにサーバ
JP2017204213A (ja) * 2016-05-13 2017-11-16 日本電信電話株式会社 設定サーバ、設定方法および設定プログラム

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190042232A1 (en) * 2018-09-28 2019-02-07 Intel Corporation Technologies for automatic compilation of storage offloads

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011186701A (ja) * 2010-03-08 2011-09-22 Nec Corp リソース割当装置、リソース割当方法、およびリソース割当プログラム
JP2017142581A (ja) * 2016-02-08 2017-08-17 日本電信電話株式会社 構成選択システム、構成選択方法及びプログラム
WO2017170309A1 (ja) * 2016-03-31 2017-10-05 日本電気株式会社 ネットワークシステム、その管理方法および装置ならびにサーバ
JP2017204213A (ja) * 2016-05-13 2017-11-16 日本電信電話株式会社 設定サーバ、設定方法および設定プログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YAMATO, YOJI ET AL.: "3. Tacit Computing and automatic GPU offloading, ''4. Implementation", STUDY OF AUTOMATIC GPU OFFLOADING TECHNOLOGY FOR OPEN IOT '', IEICE TECHNICAL REPORT, vol. 118, no. 72, 25 May 2018 (2018-05-25), pages 53 - 58 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023228369A1 (ja) * 2022-05-26 2023-11-30 日本電信電話株式会社 オフロードサーバ、オフロード制御方法およびオフロードプログラム
CN115134243A (zh) * 2022-09-02 2022-09-30 北京科技大学 一种工业控制任务分布式部署方法及系统

Also Published As

Publication number Publication date
JP2020137017A (ja) 2020-08-31
US20220188086A1 (en) 2022-06-16
US11614927B2 (en) 2023-03-28
JP7063289B2 (ja) 2022-05-09

Similar Documents

Publication Publication Date Title
WO2020171234A1 (ja) オフロードサーバのソフトウェア最適配置方法およびプログラム
Pérez et al. Simplifying programming and load balancing of data parallel applications on heterogeneous systems
Yamato Study of parallel processing area extraction and data transfer number reduction for automatic GPU offloading of IoT applications
JP6927424B2 (ja) オフロードサーバおよびオフロードプログラム
WO2021156956A1 (ja) オフロードサーバ、オフロード制御方法およびオフロードプログラム
JP6992911B2 (ja) オフロードサーバおよびオフロードプログラム
WO2021156955A1 (ja) オフロードサーバ、オフロード制御方法およびオフロードプログラム
WO2022097245A1 (ja) オフロードサーバ、オフロード制御方法およびオフロードプログラム
Angelelli et al. Towards a multi-objective scheduling policy for serverless-based edge-cloud continuum
Yamato Proposal and evaluation of adjusting resource amount for automatically offloaded applications
US11947975B2 (en) Offload server, offload control method, and offload program
JP7184180B2 (ja) オフロードサーバおよびオフロードプログラム
WO2024147197A1 (ja) オフロードサーバ、オフロード制御方法およびオフロードプログラム
US12033235B2 (en) Offload server, offload control method, and offload program
WO2023144926A1 (ja) オフロードサーバ、オフロード制御方法およびオフロードプログラム
US20230066594A1 (en) Offload server, offload control method, and offload program
WO2023228369A1 (ja) オフロードサーバ、オフロード制御方法およびオフロードプログラム
WO2023002546A1 (ja) オフロードサーバ、オフロード制御方法およびオフロードプログラム
WO2022102071A1 (ja) オフロードサーバ、オフロード制御方法およびオフロードプログラム
CN112106023B (zh) 卸载服务器和卸载程序
WO2024079886A1 (ja) オフロードサーバ、オフロード制御方法およびオフロードプログラム
JP7473003B2 (ja) オフロードサーバ、オフロード制御方法およびオフロードプログラム
Yamato Study and evaluation of automatic offloading method in mixed offloading destination environment
Knight et al. Using Malleable Task Scheduling to Accelerate Package Manager Installations
Wang et al. Clustered Workflow Execution of Retargeted Data Analysis Scripts** This work is supported by the National Science Foundation under grants ATM-0231380 and IIS-0431203.

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20758834

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20758834

Country of ref document: EP

Kind code of ref document: A1