KR20160116434A - Apparatus and method for optimizing resource of system based on self-adaptive for natwork application - Google Patents

Apparatus and method for optimizing resource of system based on self-adaptive for natwork application Download PDF

Info

Publication number
KR20160116434A
KR20160116434A KR1020150044066A KR20150044066A KR20160116434A KR 20160116434 A KR20160116434 A KR 20160116434A KR 1020150044066 A KR1020150044066 A KR 1020150044066A KR 20150044066 A KR20150044066 A KR 20150044066A KR 20160116434 A KR20160116434 A KR 20160116434A
Authority
KR
South Korea
Prior art keywords
application
network
performance
queue
quality value
Prior art date
Application number
KR1020150044066A
Other languages
Korean (ko)
Other versions
KR102066591B1 (en
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 KR1020150044066A priority Critical patent/KR102066591B1/en
Publication of KR20160116434A publication Critical patent/KR20160116434A/en
Application granted granted Critical
Publication of KR102066591B1 publication Critical patent/KR102066591B1/en

Links

Images

Classifications

    • H04L67/322
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers

Abstract

Disclosed are an apparatus and a method for optimizing system resources based on self-adaptation for a network application. The apparatus for optimizing the system resources based on the self-adaptation includes: an application state information acquisition unit for acquiring application state information corresponding to an application; a network-monitoring unit for monitoring a transmission state of a network connected for executing the application; and a resource control unit for controlling the system resources allocated to the application in consideration of at least one of the application state information and the transmission state.

Description

네트워크 어플리케이션을 위한 자가적응 기반의 시스템 리소스 최적화 장치 및 방법 {APPARATUS AND METHOD FOR OPTIMIZING RESOURCE OF SYSTEM BASED ON SELF-ADAPTIVE FOR NATWORK APPLICATION}[0001] APPARATUS AND METHOD FOR OPTIMIZING RESOURCE OF SYSTEM BASED ON SELF-ADAPTIVE FOR NATURAL APPLICATION [0002]

본 발명은 멀티코어를 구비한 임베디드 시스템에서 복수 개의 네트워크 어플리케이션들의 성능과 네트워크 상태를 기반으로 하여 네트워크 어플리케이션들에게 최적의 리소스가 할당되도록 제어할 수 있는 네트워크 어플리케이션을 위한 자가적응 기반의 시스템 리소스 최적화 기술에 관한 것이다.The present invention relates to a self-adaptive system resource optimization technique for a network application capable of controlling optimal resource allocation to network applications based on performance and network status of a plurality of network applications in an embedded system having a multi- .

최근 임베디드 디바이스 내에 CPU, GPU, 멀티미디어 인코더 및 디코더 등 다양한 용도의 멀티코어 프로세서가 탑재되면서 시스템 내부가 점차 복잡해지고 있는 추세이다. 이에 따라 개발자들이 다양한 종류의 단말기에 대해서 소프트웨어를 최적화하기 위해서는 많은 시간과 노력을 필요로 한다. 특히, 스마트폰과 같은 임베디드 단말기의 활용도가 높아짐에 따라, 사용자들은 앱 스토어를 통해 다양한 어플리케이션들을 단말기에 추가로 탑재하고, 이를 동시에 운용하기 때문에 초기 상태에 비해 점차 성능이 저하되는 현상이 발생한다.In recent years, embedded systems have become increasingly complex as multicore processors for various purposes such as CPU, GPU, multimedia encoder and decoder are installed in embedded devices. Thus, it takes a lot of time and effort for developers to optimize the software for various types of terminals. In particular, as the utilization of embedded terminals such as a smart phone is increased, users are loaded with various applications through the application store and simultaneously operate the applications. Therefore, the performance gradually deteriorates compared to the initial state.

근래에 급격히 증가되고 있는 스마트폰 사용자들은 단말기 내에 자체 설치되고 실행되는 단독 어플리케이션(Stand-alone) 보다는 네트워크와 연결되어 동영상, 게임 및 SNS 등 온라인 형태의 어플리케이션을 더 선호하는 추세이다. 또한, 모바일 단말기 기술의 발전으로 멀티태스킹 기능이 지원됨으로써 하나의 단말에서 동시에 여러 개의 어플리케이션을 실행할 수 있게 되었다. 하지만 단말기에 제공되는 CPU와 네트워크 리소스는 한정되어 있으므로, 현재 단말기의 상황을 판단하여 보다 효율적인 실시간 동적 자원 분배나 시스템 리소스의 최적화가 요구된다.In recent years, smartphone users who are rapidly increasing tend to prefer online-type applications such as video, game, and SNS by connecting to a network rather than a stand-alone application installed and executed in the terminal itself. In addition, with the development of mobile terminal technology, multitasking function is supported, so that a plurality of applications can be executed simultaneously in one terminal. However, since the CPU and the network resources provided to the terminal are limited, it is necessary to determine the current status of the terminal and to optimize the real-time dynamic resource allocation or the system resource more efficiently.

이와 같은 임베디드 시스템의 리소스 최적화를 위해서는 복수 개의 어플리케이션을 동시에 실행하면서 저전력과 고성능에 대한 Trade-off 관계를 항상 고려해야 한다. 특히, 안드로이드 시스템에서는 시스템 자체에서 여러 개의 CPU 정책 관리기와 스케줄러들을 내장하고 있어서, 필요에 따라 설정하여 사용할 수 있도록 되어있다. 하지만 이는 특정 어플리케이션이 아닌 사용자들이 일반적으로 많이 사용하는 소프트웨어나 단말 초기 상태에 탑재될 소프트웨어만을 대상으로 수행되게 때문에, 개발 단계에서 설정된 이후 거의 변경이 발생하지 않는 문제점이 있다. In order to optimize the resources of such an embedded system, it is necessary to always consider the trade-off relationship between low power and high performance while simultaneously executing a plurality of applications. Especially, in the Android system, there are several CPU policy managers and schedulers built in the system itself, so that they can be set and used as needed. However, since this is performed only for software commonly used by users, rather than a specific application, or software to be loaded in the initial state of the terminal, there is a problem that almost no change occurs after being set at the development stage.

따라서, 시스템을 탑재한 단말이 출시된 이후에도 지속적으로 일정한 수준의 어플리케이션 성능을 유지하기 위해, 시스템 스스로 어플리케이션의 특성과 네트워크 등을 고려하여 시스템 리소스를 적절하게 할당할 수 있는 최적화 기술의 필요성이 절실하게 대두된다.Therefore, in order to maintain a constant level of application performance even after the terminal equipped with the system is released, there is an urgent need for an optimization technique capable of appropriately allocating system resources in consideration of the characteristics of the application and the network .

한국 공개 특허 제10-2014-0110486호, 2014년 9월 17일 공개(명칭: 모바일 클라우드 컴퓨팅 환경에서의 리소스 관리 시스템 및 그 방법)Korean Patent Laid-Open No. 10-2014-0110486, September 17, 2014 (Name: Resource Management System and Method in Mobile Cloud Computing Environment)

본 발명의 목적은 하나의 단말에서 복수 개의 네트워크 어플리케이션이 동시에 실행되어도 각각의 어플리케이션의 성능이 저하되지 않도록 시스템 스스로 판단하여 최적의 리소스를 할당하는 것이다.An object of the present invention is to determine the system itself so that the performance of each application is not deteriorated even if a plurality of network applications are simultaneously executed in one terminal, and allocate the optimal resource.

또한, 본 발명의 목적은 단말에서 리소스를 할당할 때, 실시간 네트워크의 상태 변동에 따라 리소스의 할당을 조절하여 사용자에게 최적의 품질을 제공하는 것이다.It is another object of the present invention to provide an optimal quality for a user by allocating a resource according to a state change of a real time network when a resource is allocated in a terminal.

또한, 본 발명의 목적은 복수 개의 어플리케이션에 대해서 각각의 어플리케이션이 갖는 특성에 따라 시스템 리소스를 분배함으로써 한정적인 리소스를 보다 효율적으로 사용하는 것이다.It is also an object of the present invention to use a limited resource more efficiently by distributing system resources according to the characteristics of each application for a plurality of applications.

상기한 목적을 달성하기 위한 본 발명에 따른 자가적응 기반의 시스템 리소스 최적화 장치는, 어플리케이션에 상응하는 어플리케이션 상태 정보를 획득하는 어플리케이션 상태 정보 획득부; 상기 어플리케이션의 실행을 위해 연결되는 네트워크의 전송 상태를 모니터링하는 네트워크 모니터링부; 및 상기 어플리케이션 상태 정보 및 상기 전송 상태 중 적어도 하나를 고려하여 상기 어플리케이션에 할당되는 시스템 리소스를 제어하는 리소스 제어부를 포함한다.According to an aspect of the present invention, there is provided an apparatus for optimizing a system resource based on self-adaptation, the apparatus comprising: an application status information acquisition unit for acquiring application status information corresponding to an application; A network monitoring unit monitoring a transmission status of a network to which the application is connected for execution; And a resource control unit for controlling system resources allocated to the application in consideration of at least one of the application state information and the transmission state.

이 때, 리소스 제어부는 상기 어플리케이션 상태 정보 및 상기 전송 상태 중 적어도 하나를 기반으로 상기 어플리케이션의 현재 품질 수치를 측정하는 품질 수치 측정부; 및 상기 어플리케이션에 상응하는 목표 품질 수치와 상기 현재 품질 수치의 일치 여부에 따라 상기 시스템 리소스의 할당을 조절하는 리소스 조절부를 더 포함할 수 있다.In this case, the resource control unit may include: a quality measurement unit for measuring a current quality value of the application based on at least one of the application state information and the transmission state; And a resource adjusting unit for adjusting the allocation of the system resources according to whether the target quality value corresponding to the application matches the current quality value.

이 때, 어플리케이션 상태 정보어플리케이션 상태 정보는 상기 어플리케이션의 정적인 정보에 해당하는 품질 요구사항 및 상기 어플리케이션에 대해 실시간으로 수집된 동적 상태 정보 중 적어도 하나를 포함할 수 있다.At this time, the application state information application state information may include at least one of a quality requirement corresponding to the static information of the application and dynamic state information collected in real time for the application.

이 때, 동적 상태 정보는 어플리케이션 식별정보, 포트번호, 순간 데이터 사용량, 평균 데이터 사용량 및 대역폭 중 적어도 하나에 상응하는 시스템 수집 정보 및 실행 시간, 프레임 레이트(FPS, Frame Per Second) 및 화면 크기 중 적어도 하나에 상응하는 어플리케이션 측정 정보 중 적어도 하나를 포함하고, 기설정된 체크 주기마다 체크하여 갱신될 수 있다.At this time, the dynamic status information includes at least system collection information corresponding to at least one of the application identification information, the port number, the instantaneous data usage, the average data usage and the bandwidth, and the execution time, the frame rate (FPS) And at least one of the application measurement information corresponding to one of the application programs, and may be updated by checking every predetermined check period.

이 때, 리소스 조절부는 성능 측정 단위, 성능 최대치, 성능 정상치, 성능 최소치 중 적어도 하나를 포함하는 상기 품질 요구사항품질 요구사항을 기반으로 상기 목표 품질 수치를 계산할 수 있다.At this time, the resource controller may calculate the target quality value based on the quality requirement quality requirement including at least one of a performance measurement unit, a performance maximum value, a performance normal value, and a performance minimum value.

이 때, 네트워크 모니터링부는 네트워크 통신 스택으로부터 큐 모니터링 상태 정보를 실시간으로 획득하고, 상기 큐 모니터링 상태 정보를 기반으로 상기 네트워크의 전송 상태를 판단할 수 있다.At this time, the network monitoring unit may obtain the queue monitoring status information from the network communication stack in real time, and may determine the transmission status of the network based on the queue monitoring status information.

이 때, 큐 모니터링 상태 정보는 상기 어플리케이션이 설치된 단말로 수신되는 TCP 패킷이 임시로 저장되는 적어도 하나의 큐의 상태를 상기 단말에서 실행되고 있는 적어도 하나 이상의 어플리케이션 별로 모니터링 하여 생성될 수 있다.At this time, the queue monitoring status information may be generated by monitoring the state of at least one queue in which the TCP packet received at the terminal installed with the application is temporarily stored, for each at least one application executed in the terminal.

이 때, 적어도 하나의 큐는 백로그 큐(Backlog queue), 프리큐(Prequeue), 역전 큐(Out of order sequeue) 및 수신큐(Received queue) 중 적어도 하나를 포함할 수 있다.At this time, the at least one queue may include at least one of a backlog queue, a prequeue, an out of order queue, and a received queue.

이 때, 어플리케이션 상태 정보 획득부는 상기 어플리케이션에 상응하는 소스 코드 및 상기 어플리케이션의 성능을 외부 프로그램 및 시스템 커널 중 적어도 하나로 측정하여 생성된 외부 어플리케이션 상태 정보 중 적어도 하나를 기반으로 상기 어플리케이션 상태 정보를 획득할 수 있다.At this time, the application state information obtaining unit obtains the application state information based on at least one of the source code corresponding to the application and the external application state information generated by measuring the performance of the application with at least one of the external program and the system kernel .

이 때, 리소스 조절부는 CPU 코어 클럭 주파수, 코어 개수, 코어 타입 및 네트워크 대역폭 중 적어도 하나에 상응하는 상기 시스템 리소스를 조절할 수 있다.At this time, the resource controller may adjust the system resource corresponding to at least one of a CPU core clock frequency, a number of cores, a core type, and a network bandwidth.

이 때, 리소스 조절부는 상기 어플리케이션의 네트워크 포트번호로 수신된 패킷을 강제 누락시키는 강제 누락 주기를 조절하여 상기 네트워크 대역폭을 조절할 수 있다.In this case, the resource controller may adjust the network bandwidth by adjusting the forced drop period for forcibly dropping the packet received at the network port number of the application.

이 때, 리소스 조절부는 상기 목표 품질 수치를 기준으로 목표 성능 범위를 설정하고, 상기 현재 품질 수치가 상기 목표 성능 범위에 상응하면 상기 목표 품질 수치와 상기 현재 품질 수치가 일치하는 것으로 판단할 수 있다.At this time, the resource adjustment unit sets a target performance range based on the target quality value, and can determine that the target quality value and the current quality value match when the current quality value corresponds to the target performance range.

또한, 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 방법은, 어플리케이션에 상응하는 어플리케이션 상태 정보를 획득하는 단계; 상기 어플리케이션의 실행을 위해 연결되는 네트워크의 전송 상태를 모니터링 하는 단계; 및 상기 어플리케이션 상태 정보 및 상기 전송 상태 중 적어도 하나를 고려하여 상기 어플리케이션에 할당되는 시스템 리소스를 제어하는 단계를 포함한다.In addition, the self-adaptation-based system resource optimization method according to an embodiment of the present invention includes: acquiring application state information corresponding to an application; Monitoring a transmission state of a connected network for execution of the application; And controlling a system resource allocated to the application in consideration of at least one of the application state information and the transmission state.

이 때, 시스템 리소스를 제어하는 단계는 상기 어플리케이션 상태 정보 및 상기 전송 상태 중 적어도 하나를 기반으로 상기 어플리케이션의 현재 품질 수치를 측정하는 단계; 및 상기 어플리케이션에 상응하는 목표 품질 수치와 상기 현재 품질 수치의 일치 여부에 따라 상기 시스템 리소스의 할당을 조절하는 단계를 더 포함할 수 있다.In this case, the step of controlling the system resource may include: measuring a current quality value of the application based on at least one of the application state information and the transmission state; And adjusting the allocation of the system resources according to a match between the target quality value corresponding to the application and the current quality value.

이 때, 어플리케이션 상태 정보는 상기 어플리케이션의 정적인 정보에 해당하는 품질 요구사항 및 상기 어플리케이션에 대해 실시간으로 수집된 동적 상태 정보 중 적어도 하나를 포함할 수 있다.At this time, the application state information may include at least one of a quality requirement corresponding to static information of the application and dynamic state information collected in real time for the application.

이 때, 동적 상태 정보는 어플리케이션 식별정보, 포트번호, 순간 데이터 사용량, 평균 데이터 사용량 및 대역폭 중 적어도 하나에 상응하는 시스템 수집 정보 및 실행 시간, 프레임 레이트(FPS, Frame Per Second) 및 화면 크기 중 적어도 하나에 상응하는 어플리케이션 측정 정보 중 적어도 하나를 포함하고, 기설정된 체크 주기마다 체크하여 갱신될 수 있다.At this time, the dynamic status information includes at least system collection information corresponding to at least one of the application identification information, the port number, the instantaneous data usage, the average data usage and the bandwidth, and the execution time, the frame rate (FPS) And at least one of the application measurement information corresponding to one of the application programs, and may be updated by checking every predetermined check period.

이 때, 조절하는 단계는 성능 측정 단위, 성능 최대치, 성능 정상치, 성능 최소치 중 적어도 하나를 포함하는 상기 품질 요구사항을 기반으로 상기 목표 품질 수치를 계산하 계산하는 단계를 포함할 수 있다.In this case, the adjusting step may include calculating and calculating the target quality value based on the quality requirement including at least one of a performance measurement unit, a performance maximum value, a performance normal value, and a performance minimum value.

이 때, 모니터링 하는 단계는 네트워크 통신 스택으로부터 큐 모니터링 상태 정보를 실시간으로 획득하는 단계를 포함하고, 상기 큐 모니터링 상태 정보를 기반으로 상기 네트워크 전송 상태를 판단할 수 있다.In this case, the monitoring step may include acquiring queue monitoring status information from the network communication stack in real time, and may determine the network transmission status based on the queue monitoring status information.

이 때, 큐 모니터링 상태 정보는 상기 어플리케이션이 설치된 단말로 수신되는 TCP 패킷이 임시로 저장되는 적어도 하나의 큐의 상태를 상기 단말에서 실행되고 있는 적어도 하나 이상의 어플리케이션 별로 모니터링 하여 생성될 수 있다.At this time, the queue monitoring status information may be generated by monitoring the state of at least one queue in which the TCP packet received at the terminal installed with the application is temporarily stored, for each at least one application executed in the terminal.

이 때, 적어도 하나의 큐는 백로그 큐(Backlog queue), 프리큐(Prequeue), 역전 큐(Out of order sequeue) 및 수신큐(Received queue) 중 적어도 하나를 포함할 수 있다.At this time, the at least one queue may include at least one of a backlog queue, a prequeue, an out of order queue, and a received queue.

이 때, 획득하는 단계는 상기 어플리케이션에 상응하는 소스 코드 및 상기 어플리케이션의 성능을 외부 프로그램 및 시스템 커널 중 적어도 하나로 측정하여 생성된 외부 어플리케이션 상태 정보 중 적어도 하나를 기반으로 상기 어플리케이션 상태 정보를 획득할 수 있다.At this time, the acquiring step may acquire the application state information based on at least one of the source code corresponding to the application and the external application state information generated by measuring the performance of the application with at least one of an external program and a system kernel have.

이 때, 조절하는 단계는 CPU 코어 클럭 주파수, 코어 개수, 코어 타입 및 네트워크 대역폭 중 적어도 하나에 상응하는 상기 시스템 리소스를 조절하고, 상기 어플리케이션의 네트워크 포트번호로 수신된 패킷을 강제 누락시키는 강제 누락 주기를 조절하여 상기 네트워크 대역폭을 조절할 수 있다.At this time, the adjusting step adjusts the system resource corresponding to at least one of the CPU core clock frequency, the number of cores, the core type, and the network bandwidth, and forcibly misses the packet received at the network port number of the application. To adjust the network bandwidth.

이 때, 조절하는 단계는 상기 목표 품질 수치를 기준으로 목표 성능 범위를 설정하고, 상기 현재 품질 수치가 상기 목표 성능 범위에 상응하면 상기 목표 품질 수치와 상기 현재 품질 수치가 일치하는 것으로 판단할 수 있다.In this case, the adjusting step may set a target performance range based on the target quality value, and may determine that the target quality value and the current quality value match when the current quality value corresponds to the target performance range .

본 발명에 따르면, 하나의 단말에서 복수 개의 네트워크 어플리케이션이 동시에 실행되어도 각각의 어플리케이션의 성능이 저하되지 않도록 시스템 스스로 판단하여 최적의 리소스를 할당할 수 있다.According to the present invention, even if a plurality of network applications are simultaneously executed in one terminal, the system itself can determine the optimal resource so that the performance of each application is not deteriorated.

또한, 본 발명은 단말에서 리소스를 할당할 때, 실시간 네트워크의 상태 변동에 따라 리소스의 할당을 조절하여 사용자에게 최적의 품질을 제공할 수 있다.In addition, when resources are allocated in a terminal, the present invention can provide optimum quality to a user by adjusting allocation of resources according to a state change of a real-time network.

또한, 본 발명은 복수 개의 어플리케이션에 대해서 각각의 어플리케이션이 갖는 특성에 따라 시스템 리소스를 분배함으로써 한정적인 리소스를 보다 효율적으로 사용할 수 있다.Further, the present invention can use the limited resource more efficiently by distributing system resources according to the characteristics of each application for a plurality of applications.

도 1은 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 시스템을 나타낸 블록도이다.
도 2는 도 1에 도시된 시스템 리소스 최적화 장치를 나타낸 블록도이다.
도 3은 도 2에 도시된 리소스 제어부를 나타낸 블록도이다.
도 4는 도 1에 도시된 시스템 리소스 최적화 장치와 네트워크 통신 스택을 상세하게 나타낸 블록도이다.
도 5는 본 발명의 일실시예에 따른 어플리케이션 상태 정보를 나타낸 도면이다.
도 6은 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 방법을 나타낸 동작 흐름도이다.
도 7은 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 방법을 상세하게 나타낸 동작 흐름도이다.
도 8은 본 발명의 실시예가 구현된 컴퓨터 시스템을 나타낸 도면이다.
1 is a block diagram illustrating a self-adaptive system resource optimization system in accordance with an embodiment of the present invention.
2 is a block diagram illustrating the system resource optimization apparatus shown in FIG.
3 is a block diagram showing the resource control unit shown in FIG.
4 is a block diagram illustrating in detail the system resource optimization apparatus and network communication stack shown in FIG.
5 is a diagram illustrating application status information according to an exemplary embodiment of the present invention.
6 is a flowchart illustrating a self-adaptive system resource optimization method according to an exemplary embodiment of the present invention.
FIG. 7 is a flowchart illustrating a method of optimizing a self-adaptive system resource according to an exemplary embodiment of the present invention.
8 is a diagram of a computer system in which an embodiment of the present invention is implemented.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시 예들을 도면에 예시하고 상세하게 설명하고자 한다.While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail.

그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprises" or "having" and the like are used to specify that there is a feature, a number, a step, an operation, an element, a component or a combination thereof described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가진 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the relevant art and are to be interpreted in an ideal or overly formal sense unless explicitly defined in the present application Do not.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 전체적인 이해를 용이하게 하기 위하여 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In order to facilitate the understanding of the present invention, the same reference numerals are used for the same constituent elements in the drawings and redundant explanations for the same constituent elements are omitted.

도 1은 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 시스템을 나타낸 블록도이다.1 is a block diagram illustrating a self-adaptive system resource optimization system in accordance with an embodiment of the present invention.

도 1을 참조하면, 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 시스템은 복수 개의 네트워크 어플리케이션을 동시에 실행 시, 어플리케이션의 품질 요구사항품질 요구사항과 네트워크의 동적 상태 정보를 모니터링 하여 최적의 시스템 리소스 할당을 제공할 수 있는 시스템으로, 시스템 리소스 최적화 장치(110), 네트워크 기반 어플리케이션(120), 네트워크 통신 스택(130), 멀티코어 프로세스(140) 및 네트워크 디바이스(150)를 포함한다.Referring to FIG. 1, a self-adaptive system resource optimization system according to an exemplary embodiment of the present invention monitors application quality requirements quality requirements and dynamic state information of a network when a plurality of network applications are simultaneously executed, The system resource optimization apparatus 110, the network-based application 120, the network communication stack 130, the multicore process 140, and the network device 150, which can provide system resource allocation of the system resources.

시스템 리소스 최적화 장치(110)는 어플리케이션에 상응하는 어플리케이션 상태 정보를 획득한다. The system resource optimization apparatus 110 obtains application state information corresponding to the application.

이 때, 어플리케이션 상태 정보는 어플리케이션의 정적인 정보에 해당하는 품질 요구사항 및 어플리케이션에 대해 실시간으로 수집된 동적 상태 정보 중 적어도 하나를 포함할 수 있다.At this time, the application status information may include at least one of quality requirements corresponding to static information of the application and dynamic status information collected in real time for the application.

이 때, 동적 상태 정보는 어플리케이션 식별정보, 포트번호, 순간 데이터 사용량, 평균 데이터 사용량 및 대역폭 중 적어도 하나에 상응하는 시스템 수집 정보 및 실행 시간, 프레임 레이트(FPS, Frame Per Second) 및 화면 크기 중 적어도 하나에 상응하는 어플리케이션 측정 정보 중 적어도 하나를 포함하고, 기설정된 체크 주기마다 체크하여 갱신될 수 있다.At this time, the dynamic status information includes at least system collection information corresponding to at least one of the application identification information, the port number, the instantaneous data usage, the average data usage and the bandwidth, and the execution time, the frame rate (FPS) And at least one of the application measurement information corresponding to one of the application programs, and may be updated by checking every predetermined check period.

이 때, 어플리케이션에 상응하는 소스 코드 및 어플리케이션의 성능을 외부 프로그램 및 시스템 커널 중 적어도 하나로 측정하여 생성된 외부 어플리케이션 상태 정보 중 적어도 하나를 기반으로 어플리케이션 상태 정보를 획득할 수 있다.At this time, the application state information can be obtained based on at least one of the source code corresponding to the application and the external application state information generated by measuring the performance of the application with at least one of the external program and the system kernel.

또한, 시스템 리소스 최적화 장치(110)는 어플리케이션의 실행을 위해 연결되는 네트워크의 전송 상태를 모니터링 한다.In addition, the system resource optimization apparatus 110 monitors the transmission status of the connected network for execution of the application.

이 때, 네트워크 통신 스택으로부터 큐 모니터링 상태 정보를 실시간으로 획득하고, 큐 모니터링 상태 정보를 기반으로 네트워크 전송 상태를 판단할 수 있다.At this time, the queue monitoring status information can be acquired in real time from the network communication stack, and the network transmission status can be determined based on the queue monitoring status information.

이 때, 큐 모니터링 상태 정보는 어플리케이션이 설치된 단말로 수신되는 TCP 패킷이 임시로 저장되는 적어도 하나의 큐의 상태를 단말에서 실행되고 있는 적어도 하나 이상의 어플리케이션 별로 모니터링 하여 생성될 수 있다.At this time, the queue monitoring status information may be generated by monitoring the state of at least one queue in which the TCP packet received at the terminal installed with the application is temporarily stored for each at least one application executing in the terminal.

이 때, 적어도 하나의 큐는 백로그 큐(Backlog queue), 프리큐(Prequeue), 역전 큐(Out of order sequeue) 및 수신큐(Received queue) 중 적어도 하나를 포함할 수 있다.At this time, the at least one queue may include at least one of a backlog queue, a prequeue, an out of order queue, and a received queue.

또한, 시스템 리소스 최적화 장치(110)는 어플리케이션 상태 정보 및 전송 상태 중 적어도 하나를 고려하여 어플리케이션에 할당되는 시스템 리소스를 제어한다.In addition, the system resource optimization apparatus 110 controls a system resource allocated to an application in consideration of at least one of application state information and transmission state.

이 때, 어플리케이션 상태 정보 및 전송 상태 중 적어도 하나를 기반으로 어플리케이션의 현재 품질 수치를 측정하고, 어플리케이션에 상응하는 목표 품질 수치와 현재 품질 수치의 일치 여부에 따라 시스템 리소스의 할당을 조절할 수 있다.At this time, the current quality value of the application may be measured based on at least one of the application state information and the transmission state, and the allocation of the system resource may be adjusted according to whether the target quality value corresponding to the application matches the current quality value.

이 때, 성능 측정 단위, 성능 최대치, 성능 정상치, 성능 최소치 중 적어도 하나를 포함하는 품질 요구사항품질 요구사항을 기반으로 목표 품질 수치를 계산할 수 있다.At this time, the target quality value can be calculated based on the quality requirement quality requirement including at least one of the performance measurement unit, the performance maximum value, the performance normal value, and the performance minimum value.

이 때, CPU 코어 클럭 주파수, 코어 개수, 코어 타입 및 네트워크 대역폭 중 적어도 하나에 상응하는 시스템 리소스를 조절할 수 있다.At this time, the system resource corresponding to at least one of the CPU core clock frequency, the number of cores, the core type, and the network bandwidth can be adjusted.

이 때, 어플리케이션의 네트워크 포트번호로 수신된 패킷을 강제 누락시키는 강제 누락 주기를 조절하여 네트워크 대역폭을 조절할 수 있다.At this time, it is possible to adjust the network bandwidth by adjusting the forcible drop period for forcibly dropping the received packet to the network port number of the application.

이 때, 목표 품질 수치를 기준으로 목표 성능 범위를 설정하고, 현재 품질 수치가 목표 성능 범위에 상응하면 목표 품질 수치와 현재 품질 수치가 일치하는 것으로 판단할 수 있다.At this time, the target performance range is set based on the target quality value, and if the current quality value corresponds to the target performance range, it can be determined that the target quality value matches the current quality value.

이와 같은 시스템 리소스 최적화 장치(110)를 통해 단말에서 운용 중인 복수 개의 어플리케이션들에 대해서 사전에 정의된 성능에 대한 요구 사항을 받고, 현재 가용할 수 있는 시스템의 리소스를 최대한 활용하여 어플리케이션의 성능 및 품질을 유지할 수 있다.Through the system resource optimizing apparatus 110, a plurality of applications operating in the terminal are required to receive a predefined performance requirement and utilize the available resources of the system to maximize the application performance and quality Lt; / RTI >

네트워크 기반 어플리케이션(120)은 단말 자체에 설치되어 실행되는 단독 어플리케이션(Stand-alone)의 형태가 아닌 단말이 네트워크와 연결되어 실행되는 어플리케이션의 형태에 상응할 수 있다. 예를 들어, 방송 미디어나, 유투브, IPTV, VOD 서비스와 같이 인터넷에 연결하여 시청할 수 있는 미디어 어플리케이션이나 인터넷에 접속하여 다른 사용자와 함께 플레이 하는 게임 어플리케이션 및 소셜 네트워크에 접속할 수 있는 SNS 어플리케이션 등이 네트워크 기반 어플리케이션(120)에 상응할 수 있다. 또한, 미디어, 게임, SNS에 상응하는 어플리케이션 말고도 네트워크에 접속하여 실행하는 어플리케이션은 네트워크 기반 어플리케이션(120)에 상응할 수 있다.The network-based application 120 may correspond to a form of an application in which a terminal is connected to a network and is not a stand-alone application installed and executed in the terminal itself. For example, media applications such as broadcast media, YouTube, IPTV, and VOD services, media applications that can be viewed and connected to the Internet, game applications that connect to the Internet and play with other users, and SNS applications that can connect to social networks, Based application 120 as shown in FIG. In addition, applications that connect to and run on the network may correspond to network-based applications 120, as well as applications that correspond to media, games, and SNS.

이와 같은 네트워크 기반 어플리케이션(120)은 단말 시스템의 CPU 및 네트워크 리소스를 주로 사용할 수 있다.Such a network-based application 120 can mainly use the CPU and network resources of the terminal system.

네트워크 통신 스택(130)은 네트워크를 통해 외부로부터 수신되는 통신 메시지를 처리하며, TCP/IP, UDP 및 FTP 패킷과 같이 IP 패킷 레벨 이상의 인터넷 통신 프로토콜을 다룰 수 있다. 또한, 네트워크 통신 스택(120)은 수신되는 데이터 량이 증가할 경우에 이를 처리하기 위해 많은 네트워크 대역폭뿐만 아니라 CPU 리소스를 사용할 수 도 있다.The network communication stack 130 processes communication messages received from the outside via the network and can handle Internet communication protocols at IP packet level or higher such as TCP / IP, UDP, and FTP packets. In addition, the network communication stack 120 may use CPU resources as well as a large amount of network bandwidth to handle the amount of data received as it is increased.

이러한 네트워크 통신 스택(130)은 여러 레이어(layer)가 있으며, 크게 유저(User) 영역, 커널(Kernel) 영역 및 디바이스(device) 영역으로 나눌 수 있다. 유저 영역과 커널 영역에서의 동작은 CPU가 수행할 수 있는데, 이러한 유저 영역과 커널 영역은 디바이스 영역과 구별하기 위해 호스트(host)라고 나타낼 수 있다. 이 때, 디바이스는 패킷을 송수신하는 NIC(Network Interface Card)에 상응할 수 있다. 흔히 부르는 랜카드가 이에 상응할 수 있다. The network communication stack 130 has a plurality of layers and can be roughly divided into a user area, a kernel area, and a device area. The operation in the user area and the kernel area can be performed by the CPU. Such a user area and a kernel area can be referred to as a host in order to distinguish them from the device area. At this time, the device may correspond to a network interface card (NIC) that transmits and receives a packet. Commonly called LAN cards can be equivalent.

네트워크 통신 스택(130)을 통해 데이터를 전송할 시, 우선 어플리케이션이 전송할 데이터를 생성하고, write 시스템 콜을 호출해서 데이터를 보낼 수 있다. 이 때, 소켓은 이미 생성되어 연결되어 있다고 가정한다면, 시스템 콜을 호출하면 커널 영역으로 전환될 수 있다. Linux나 Unix를 포함한 POSIX 계열 운영체제는 소켓을 file descriptor로 어플리케이션에 노출할 수 있다. 이런 POSIX 계열의 운영체제에서 소켓은 파일에 한 종류로, 파일 레이어는 단순한 검사만 하고 파일 구조체에 연결된 소켓 구조체를 사용해서 소켓 함수를 호출할 수 있다.When data is transmitted through the network communication stack 130, the application can generate data to be transmitted first, and can send data by calling a write system call. At this time, assuming that the socket is already created and connected, you can switch to the kernel area by calling the system call. POSIX operating systems, including Linux and Unix, can expose sockets to applications as file descriptors. In this POSIX operating system, sockets are a kind of file, the file layer can simply call a socket function using a socket structure connected to the file structure.

또한, 커널 소켓은 두 개의 버퍼를 가질 수 있는데, 송신용으로 준비한 send socket buffer와 수신용으로 준비한 receive socket buffer가 이에 상응할 수 있다. Write 시스템 콜을 호출하면 유저 영역의 데이터가 커널 메모리로 복사되고, send socket buffer의 뒷부분에 추가될 수 있다. 이는 데이터를 순서대로 전송하기 위함일 수 있다. 이 후에 TCP를 호출할 수 있는데, 소켓과 연결된 TCP Control Block(TCB)에는 TCP 연결 처리에 필요한 정보가 있을 수 있다. 이 때, TCB에 있는 데이터는 connection state, receive window, congestion window, sequeue 번호, 및 재전송 타이머 등에 상응할 수 있다. Also, a kernel socket can have two buffers, a send socket buffer prepared for transmission and a receive socket buffer prepared for reception. When a call to the Write system call is made, data in the user area is copied to the kernel memory and can be added to the end of the send socket buffer. This may be to transmit the data in order. After this, you can call TCP, and the TCP Control Block (TCB) associated with the socket may have the information needed to process the TCP connection. At this time, the data in the TCB may correspond to a connection state, a receive window, a congestion window, a sequeue number, and a retransmission timer.

이 때, 현재 TCP 상태가 데이터 전송을 허용하면 새로운 TCP segment, 즉 패킷을 생성할 수 있다. TCP segment에는 TCP 헤더와 페이로드(payload)가 있을 수 있다. 페이로드에는 ACK를 받지 않은 send socket buffer에 있는 데이터가 담겨 있을 수 있다. 페이로드의 최대 길이는 receive window, congestion window, MSS(Maximum Segment Size) 중 최대 값에 상응할 수 있다.At this time, if the current TCP state permits data transmission, a new TCP segment, that is, a packet can be generated. The TCP segment may have a TCP header and a payload. The payload may contain data in a send socket buffer that is not ACKed. The maximum payload length may correspond to the maximum of the receive window, congestion window, and MSS (Maximum Segment Size).

이 후, TCP checksum을 계산할 수 있는데, 이 checksum 계산에는 pseudo 헤더 정보(IP 주소들, segment 길이, 프로토콜 번호)를 포함시킬 수 있다. 여기서 TCP 상태에 따라 패킷을 한 개 이상 전송할 수 있다. 사실 요즘의 네트워크 통신 스택(130)에서는 checksum offload 기술을 사용하기 때문에, 커널이 직접 TCP checksum을 계산하지 않고 대신 NIC가 checksum을 계산할 수 있다. 여기서는 설명의 편의를 위해 커널이 checksum을 계산한다고 가정한다.Thereafter, a TCP checksum can be computed, which can include pseudo header information (IP addresses, segment length, protocol number). Here, one or more packets can be transmitted according to the TCP state. In fact, the current network communication stack 130 uses the checksum offload technique, so that the kernel does not calculate the TCP checksum directly, but instead the NIC can compute the checksum. For convenience of explanation, it is assumed that the kernel computes a checksum.

이 때, 생성된 TCP segment는 IP 레이어로 이동할 수 있다. IP 레이어에서는 TCP segment에 IP 헤더를 추가하고, IP routing을 수행할 수 있다. IP routing이란 목적지 IP 주소(destination IP)로 가기 위한 다음 장비의 IP 주소(next IP)를 찾는 과정을 말한다. 이 후, IP 레이어에서 IP 헤더 checksum을 계산하여 덧붙인 후, Ethernet 레이어로 데이터를 보낼 수 있다. Ethernet 레이어는 ARP(Address Resolution Protocol)를 사용해서 next hop IP의 MAC 주소를 찾을 수 있다. 그리고 Ethernet 헤더를 패킷에 추가할 수 있다. 이와 같이 Ethernet 헤더까지 붙으면 호스트의 패킷을 완성될 수 있다.At this time, the generated TCP segment can move to the IP layer. In the IP layer, IP header can be added to the TCP segment and IP routing can be performed. IP routing refers to the process of finding the IP address (next IP) of the next device to go to the destination IP address. After that, the IP layer checks the IP header checksum, adds the checksum, and sends the data to the Ethernet layer. The Ethernet layer can use ARP (Address Resolution Protocol) to find the MAC address of the next hop IP. You can also add an Ethernet header to the packet. When the Ethernet header is added as described above, the host packet can be completed.

이 후, IP routing을 수행하면 그 결과물로 next hop IP와 해당 IP로 패킷을 전송할 때 사용하는 인터페이스(transmit interface, 혹은 NIC)를 알 수 있다. 따라서 transmit NIC의 드라이버를 호출할 수 있다. 만약 tcpdump나 Wireshark 같은 패킷 캡처 프로그램이 작동 중이면 커널은 패킷 데이터를 프로그램이 사용하는 메모리 버퍼에 복사할 수 있다. 수신도 마찬가지로 드라이버 바로 위에서 패킷을 캡처할 수 있다. After that, if IP routing is performed, it is possible to know the next hop IP and the interface (transmit interface, or NIC) used to transmit the packet to the corresponding IP. Therefore, the driver of the transmit NIC can be called. If a packet capture program such as tcpdump or Wireshark is running, the kernel can copy the packet data into the memory buffer used by the program. Receiving can also capture packets just above the driver.

이 후, 드라이버는 NIC 제조사가 정의한 드라이버-NIC 통신 규약에 따라 패킷 전송을 요청할 수 있다. NIC는 패킷 전송 요청을 받고, 메인 메모리에 있는 패킷을 자신의 메모리로 복사하고, 네트워크 선으로 전송할 수 있다. 이 때, Ethernet 표준에 따라 IFG(Inter-Frame Gap), preamble, 그리고 CRC를 패킷에 추가할 수 있다. IFG, preamble은 패킷의 시작을 판단하기 위해 사용하고(네트워킹 용어로는 framing), CRC는 데이터 보호를 위해 사용한다(TCP, IP checksum과 같은 용도이다). 패킷 전송은 Ethernet의 물리적 속도, 그리고 Ethernet flow control에 따라 전송할 수 있는 상황일 때 시작될 수 있다. After that, the driver can request packet transmission according to the driver-NIC communication protocol defined by the NIC manufacturer. The NIC can receive a packet transmission request, copy the packet in main memory to its memory, and transmit it to the network line. At this time, IFG (Inter-Frame Gap), preamble, and CRC can be added to the packet according to the Ethernet standard. IFG, preamble is used to determine the start of a packet (framing in networking terms), and CRC is used for data protection (for purposes such as TCP and IP checksum). Packet transmission can be initiated when the physical speed of the Ethernet and the circumstances that can be transmitted according to the Ethernet flow control.

또한, NIC가 패킷을 전송할 때 NIC는 호스트 CPU에 인터럽트(interrupt)를 발생시킬 수 있다. 모든 인터럽트에는 인터럽트 번호가 있으며, 운영체제는 인터럽트 번호를 이용하여 해당 인터럽트를 처리할 수 있는 적합한 드라이버를 찾을 수 있다. 드라이버는 인터럽트를 처리할 수 있는 함수(인터럽트 핸들러)를 드라이브가 가동되었을 때 운영체제에 등록해둘 수 있다. 운영체제가 핸들러를 호출하고, 핸들러는 전송된 패킷을 운영체제에 반환할 수 있다. In addition, when the NIC transmits a packet, the NIC may cause an interrupt to the host CPU. All interrupts have an interrupt number, and the operating system can use the interrupt number to find a suitable driver to handle the interrupt. The driver can register an interrupt handler (interrupt handler) to the operating system when the drive is running. The operating system calls the handler, and the handler can return the transmitted packet to the operating system.

상기에서 설명한 것은 어플리케이션에서 입력을 하였을 때 데이터가 커널과 디바이스를 거쳐 전송되는 과정에 상응할 수 있다. 그런데 어플리케이션이 입력에 상응하게 쓰기 요청을 직접적으로 하지 않아도 커널이 TCP를 호출해서 패킷을 전송하는 경우가 있을 수도 있다. 예를 들어, ACK을 받아 receive window가 늘어나면 socket buffer에 남아있는 데이터를 포함한 TCP segment를 생성하여 상대편에 전송할 수 있다.The above description may correspond to a process in which data is transmitted through a kernel and a device when an input is made in an application. However, there may be cases where the kernel calls TCP to send a packet, even though the application does not directly request a write corresponding to the input. For example, when an ACK is received and the receive window is increased, a TCP segment containing data remaining in the socket buffer can be generated and transmitted to the other party.

네트워크 통신 스택(130)을 통해 데이터를 수신할 시, 우선 NIC가 패킷을 자신의 메모리에 기록할 수 있다. 이 후, CRC 검사로 패킷이 올바른지 검사하고, 호스트의 메모리 버퍼로 패킷을 전송할 수 있다. 이 때, 메모리 버퍼는 드라이버가 커널에 요청하여 패킷 수신용으로 미리 할당한 메모리이고, 할당을 받은 후 드라이버는 NIC에 메모리 주소와 크기를 알려 줄 수 있다. 만약, NIC가 패킷을 받았는데, 드라이버가 미리 할당해 놓은 호스트 메모리 버퍼가 없으면 NIC가 패킷을 버릴 수 있다 (packet drop). When receiving data via the network communication stack 130, the NIC may first write the packet to its memory. After this, the CRC check can check that the packet is correct and send the packet to the host's memory buffer. In this case, the memory buffer is a memory that the driver requests from the kernel to pre-allocate for the number of packets. After the memory buffer is allocated, the driver can inform the NIC of the memory address and size. If the NIC receives a packet and there is no host memory buffer already allocated by the driver, the NIC may drop the packet.

이 후, 패킷을 호스트 메모리로 전송한 후, NIC가 호스트운영체제에 인터럽트를 보낼 수 있다. 이 후, 드라이버가 새로운 패킷을 보고 자신이 처리할 수 있는 패킷인지 검사할 수 있다. 이 때, 지금까지의 과정은 제조사가 정의한 드라이버-NIC 통신 규약을 사용할 수 있다.After this, the NIC can send an interrupt to the host operating system after sending the packet to the host memory. After that, the driver can check the new packet and see if it can handle it. At this time, the process so far can use the driver-defined NIC communication protocol.

또한, 드라이버가 상위 레이어로 패킷을 전달하려면 운영체제가 이해할 수 있도록, 받은 패킷을 운영체제가 사용하는 패킷 구조체로 포장해야 한다. 예를 들어, Linux의 sk_buff, BSD 계열 커널의 mbuf, 그리고 Microsoft Windows의 NET_BUFFER_LIST가 운영체제의 패킷 구조체에 상응할 수 있다. 따라서, 드라이버는 이렇게 포장한 패킷을 상위 레이어로 전달할 수 있다. In order for the driver to pass the packet to the upper layer, the received packet must be packed into a packet structure used by the operating system so that the operating system can understand it. For example, sk_buff on Linux, mbuf on BSD family kernels, and NET_BUFFER_LIST on Microsoft Windows can correspond to the operating system's packet structure. Therefore, the driver can deliver the packed packet to the upper layer.

이 후, Ethernet 레이어에서도 패킷이 올바른지 검사하고, 상위 프로토콜(네트워크 프로토콜)을 찾을 수 있다(de-multiplex). 이 때, Ethernet 헤더의 ethertype 값을 사용할 수 있다. 이 때, IPv4 ethertype은 0x0800에 상응할 수 있다. 이 후, Ethernet 헤더를 제거하고 IP 레이어로 패킷을 전달할 수 있다.After that, the Ethernet layer also checks whether the packet is correct and de-multiplexes the upper layer protocol (network protocol). At this time, you can use the ethertype value of the Ethernet header. At this time, the IPv4 ethertype may correspond to 0x0800. You can then remove the Ethernet header and forward the packet to the IP layer.

또한, IP 레이어에서도 패킷이 올바른지 검사할 수 있다. 즉, IP 헤더 checksum을 확인하는 것이다. 논리적으로 여기서 IP routing을 해서 패킷을 로컬 장비가 처리해야 하는지, 아니면 다른 장비로 전달해야 하는지 판단할 수 있다. 로컬 장비가 처리해야 하는 패킷이면 IP 헤더의 proto 값을 보고 상위 프로토콜(트랜스포트 프로토콜)을 찾을 수 있다. 이 때, TCP proto 값은 6에 상응할 수 있다. 이 후, IP 헤더를 제거하고 TCP 레이어로 패킷을 전달할 수 있다.Also, the IP layer can check that the packet is correct. That is, it checks the IP header checksum. Logically, you can do IP routing here to determine whether the packet should be processed by the local device or another device. If the packet is a packet to be processed by the local device, the upper protocol (transport protocol) can be found by viewing the proto value of the IP header. At this time, the TCP proto value may correspond to 6. After that, the IP header can be removed and the packet can be forwarded to the TCP layer.

또한, 하위 레이어에서와 마찬가지로 TCP 레이어에서도 패킷이 올바른지 검사할 수 있다. 즉, TCP checksum도 확인한다. 앞서 언급했듯이 요즘의 네트워크 스택에는 checksum offload 기술이 적용되어 있기 때문에 커널이 checksum을 직접 계산하지 않을 수 있다.You can also check that the packet is correct on the TCP layer as well as on the lower layer. In other words, check the TCP checksum. As mentioned earlier, the current network stack has checksum offload technology, so the kernel may not calculate the checksum directly.

다음으로 패킷이 속하는 연결, 즉 TCP control block을 찾을 수 있다. 이 때, 패킷의 <소스 IP, 소스 port, 타깃 IP, 타깃 port>를 식별자로 사용할 수 있다. 연결을 찾으면 프로토콜을 수행해서 받은 패킷을 처리할 수 있다. 새로운 데이터를 받았다면, 데이터를 receive socket buffer에 추가하고, TCP 상태에 따라 새로운 TCP 패킷(예를 들어 ACK 패킷)을 전송할 수 있다. Next, you can find the connection to which the packet belongs, the TCP control block. In this case, the source IP, source port, target IP, and target port of the packet can be used as identifiers. Once the connection is found, the protocol can be processed to process the received packet. If new data is received, the data can be added to the receive socket buffer and a new TCP packet (eg an ACK packet) can be sent according to the TCP state.

멀티코어 프로세스(140)는 복수 개의 CPU 코어를 가지고 있어 다양한 멀티 알고리즘을 병렬 처리할 수 있다. 특히, 임베디드 시스템에서는 복수 개의 어플리케이션들을 서로 다른 코어에 할당해줌으로써 멀티 실행 환경을 제공할 수도 있다.The multi-core process 140 has a plurality of CPU cores and can process various multi-algorithms in parallel. In particular, in an embedded system, a plurality of applications may be allocated to different cores to provide a multi-execution environment.

네트워크 디바이스(150)는 네트워크를 통해 단말로 통신 메시지를 전달할 수 있다. 즉, 단말에 설치된 네트워크 기반 어플리케이션(120)과 통신을 수행하면서 어플리케이션 실행에 있어 필요한 데이터를 송수신할 수 있다.
The network device 150 may communicate a communication message over the network to the terminal. That is, data necessary for application execution can be transmitted and received while communicating with the network-based application 120 installed in the terminal.

도 2는 도 1에 도시된 시스템 리소스 최적화 장치를 나타낸 블록도이다.2 is a block diagram illustrating the system resource optimization apparatus shown in FIG.

도 2를 참조하면, 도 1에 도시된 시스템 리소스 최적화 장치(110)는 어플리케이션 상태 정보 획득부(210), 네트워크 모니터링부(220) 및 리소스 제어부(230)를 포함한다.Referring to FIG. 2, the system resource optimization apparatus 110 shown in FIG. 1 includes an application state information acquisition unit 210, a network monitoring unit 220, and a resource control unit 230.

어플리케이션 상태 정보 획득부(210)는 어플리케이션에 상응하는 어플리케이션 상태 정보를 획득한다. 단말에서 현재 가용할 수 있는 시스템 리소스를 최대한 활용하여 어플리케이션의 성능 및 품질을 유지하기 위해서, 복수 개의 어플리케이션들 각각 상응하는 어플리케이션 상태 정보를 획득할 수 있다. 이 때, 복수 개의 어플리케이션들은 자신의 품질에 대한 정보를 일정 주기마다 실시간으로 어플리케이션 상태 정보 획득부(210)로 전송할 수 있다.The application state information obtaining unit 210 obtains application state information corresponding to the application. The application state information corresponding to each of the plurality of applications can be obtained in order to maximize utilization of the system resources currently available in the terminal and to maintain the performance and quality of the application. At this time, a plurality of applications can transmit information on their quality to the application status information acquisition unit 210 in real time at regular intervals.

이 때, 어플리케이션 상태 정보는 정적인 정보에 해당하는 품질 요구사항 및 어플리케이션에 대해 실시간으로 수집된 동적 상태 정보 중 적어도 하나를 포함할 수 있다.  At this time, the application status information may include at least one of quality requirements corresponding to static information and dynamic status information collected in real time for the application.

또한, 네트워크 어플리케이션이 단말에서 초기 실행될 때, 네트워크 어플리케이션의 품질 요구사항을 전송할 수 있으며, 이를 위해 네트워크 어플리케이션 자체에 대한 품질 요구사항이 정의될 수 있다. Further, when the network application is initially executed in the terminal, the quality requirement of the network application can be transmitted, and the quality requirement for the network application itself can be defined for this purpose.

또한, 어플리케이션 상태 정보는 어플리케이션의 자체 실행에 필요한 아이디 정보, 버전 정보, 아이콘, 필요한 리소스 정보 등에 상응하는 어플리케이션 특성 정보를 포함할 수도 있다.In addition, the application status information may include application characteristic information corresponding to ID information, version information, icons, necessary resource information, and the like necessary for the self-execution of the application.

이 때, 동적 상태 정보는 어플리케이션 식별정보, 포트번호, 순간 데이터 사용량, 평균 데이터 사용량 및 대역폭 중 적어도 하나에 상응하는 시스템 수집 정보 및 실행 시간, 프레임 레이트(FPS, Frame Per Second) 및 화면 크기 중 적어도 하나에 상응하는 어플리케이션 측정 정보 중 적어도 하나를 포함하고, 기설정된 체크 주기마다 체크하여 갱신될 수 있다. 예를 들어, 단말에 설치된 네트워크 어플리케이션이 실행된 후에 어플리케이션의 상태 정보가 지속적으로 변동될 수 있기 때문에, 기설정된 주기마다 실시간으로 동적 상태 정보를 체크하여 어플리케이션에 할당되는 시스템 리소스를 제어하는데 참고할 수 있다.At this time, the dynamic status information includes at least system collection information corresponding to at least one of the application identification information, the port number, the instantaneous data usage, the average data usage and the bandwidth, and the execution time, the frame rate (FPS) And at least one of the application measurement information corresponding to one of the application programs, and may be updated by checking every predetermined check period. For example, since the state information of the application may continuously change after the network application installed in the terminal is executed, dynamic state information may be checked in real time every predetermined period to control the system resource allocated to the application.

이 때, 시스템 수집 정보는 시스템, 즉 단말이나 시스템 리소스 최적화 장치를 통해 수집될 수 있으며, 어플리케이션 측정 정보는 어플리케이션을 통해 실시간으로 측정될 수 있다.At this time, the system gathering information can be collected through the system, that is, the terminal or the system resource optimizing apparatus, and the application measurement information can be measured in real time through the application.

이 때, 어플리케이션에 상응하는 소스 코드 및 어플리케이션의 성능을 외부 프로그램 및 시스템 커널 중 적어도 어느 하나로 측정하여 생성된 외부 어플리케이션 상태 정보 중 적어도 하나를 기반으로 어플리케이션 상태 정보를 획득할 수 있다. 예를 들어, 어플리케이션에 소스 코드에 형태로 정의된 어플리케이션 상태 정보를 획득하거나, 어플리케이션의 성능을 측정하는 외부 프로그램을 실행하여 외부 어플리케이션 상태 정보를 생성할 수 있다.At this time, the application state information can be obtained based on at least one of the source code corresponding to the application and the external application state information generated by measuring the performance of the application with at least one of the external program and the system kernel. For example, it is possible to obtain application state information defined in the form of source code in an application or to generate external application state information by executing an external program measuring the performance of the application.

네트워크 모니터링부(220)는 어플리케이션의 실행을 위해 연결되는 네트워크의 전송 상태를 모니터링 한다. 이 때, 네트워크 통신 스택을 통해 네트워크의 전송 상태를 지속적으로 보고받음으로써 모니터링을 수행할 수 있다. The network monitoring unit 220 monitors the transmission status of the connected network for execution of the application. At this time, monitoring can be performed by continuously receiving and reporting the transmission status of the network through the network communication stack.

이 때, 네트워크 통신 스택으로부터 큐 모니터링 상태 정보를 실시간으로 획득하고, 큐 모니터링 상태 정보를 기반으로 네트워크의 전송 상태를 판단할 수 있다. 예를 들어, 네트워크 통신 스택은 네트워크 디바이스로부터 수신한 통신 메시지 중에서 단말의 어플리케이션에게 전달되어야 할 패킷만을 걸러낼 수 있다. 이 후, 어플리케이션에 전달된 패킷을 임시로 큐(queue)에 저장하였다가 전달될 수 있는데, 이 때 패킷이 저장되는 적어도 하나의 큐에 대한 큐 모니터링 상태 정보를 실시간으로 획득할 수 있다.At this time, the queue monitoring status information can be acquired in real time from the network communication stack, and the transmission status of the network can be determined based on the queue monitoring status information. For example, the network communication stack can filter only packets to be delivered to the application of the terminal among the communication messages received from the network device. Thereafter, the packet delivered to the application may be temporarily stored in a queue. In this case, the queue monitoring status information for at least one queue in which the packet is stored may be acquired in real time.

이 때, 큐 모니터링 상태 정보는 어플리케이션이 설치된 단말로 수신되는 TCP 패킷이 임시로 저장되는 적어도 하나의 큐의 상태를 단말에서 실행되고 있는 적어도 하나 이상의 어플리케이션 별로 모니터링 하여 생성될 수 있다. 예를 들어, 네트워크 디바이스로부터 수신된 통신 메시지 중 TCP 패킷만을 걸러내고, 시스템 리소스 최적화 장치에서 무시하도록 지정된 포드 목록을 기반으로 패킷들을 누락시켜 다시 한번 TCP 패킷을 필터링 할 수 있다. At this time, the queue monitoring status information may be generated by monitoring the state of at least one queue in which the TCP packet received at the terminal installed with the application is temporarily stored for each at least one application executing in the terminal. For example, it is possible to filter only TCP packets among communication messages received from a network device, and to reject TCP packets based on a list of pods designated to be ignored by the system resource optimization device.

이와 같이 네트워크 통신 스택에서 패킷을 필터링하여 전달함으로써 처리해야 할 메시지 수를 줄일 수 있어 시스템 리소스를 절약할 수 있고, 어플리케이션 별로 소요되는 네트워크 대역폭을 조절할 수도 있다.By filtering and delivering packets in the network communication stack, the number of messages to be processed can be reduced, so that system resources can be saved and the network bandwidth required for each application can be controlled.

이 때, 적어도 하나의 큐는 백로그 큐(Backlog queue), 프리큐(Prequeue), 역전 큐(Out of order sequeue) 및 수신큐(Received queue) 중 적어도 하나를 포함할 수 있다. At this time, the at least one queue may include at least one of a backlog queue, a prequeue, an out of order queue, and a received queue.

백로그 큐는 연결 요청 대기 상태에 있는 패킷이 저장되는 공간에 상응하며, 연결이 수락될 때까지 연결 요청 자체를 대기시킬 수 있는 상태에 있다는 것을 의미할 수 있다. 종래에는 백로그 큐의 크기를 5 정도로 설정하였으나, 웹 서버와 같이 잦은 연결 요청을 받는 서버를 구현할 경우에는 최소 15 이상의 크기로 설정될 수 있다.The backlog queue may correspond to the space in which the packets waiting for connection requests are stored and may be in a state in which the connection request itself can be queued until the connection is accepted. Conventionally, the backlog queue size is set to about 5. However, when a server receiving frequent connection requests such as a web server is implemented, the backlog queue size can be set to a minimum size of 15 or more.

역전큐는 여러 TCP 패킷이 중복되거나 순서가 많지 않게 들어와서 쌓이게 되는 공간에 상응하며, 역전큐에 TCP 패킷이 저장된다면 단말 외부의 네트워크 상태가 좋지 않음을 나타낼 수 있다. 또한, 네트워크 상태가 좋지 않음으로 인해 TCP 패킷 처리를 위해 CPU 리소스를 많이 사용하고 있다는 것을 알려줄 수도 있다.The reverse queue corresponds to the space in which multiple TCP packets are stacked or not stacked in order, and if a TCP packet is stored in the inversion queue, it may indicate that the network condition outside the terminal is not good. It can also tell you that you are using a lot of CPU resources to process TCP packets due to poor network conditions.

수신큐는 어플리케이션 레벨에서 패킷을 가져가지 않는 경우에 임시 저장되는 공간으로, 수신큐에 패킷이 임시 저장됨에 따라 어플리케이션이 이에 대해 대처할 수 있도록 알려줄 수 있다.The receive queue is a temporary storage space in case the packet is not taken at the application level, and can inform the application that the packet can be dealt with as the packet is temporarily stored in the receive queue.

프리큐는 수신된 TCP 패킷을 수신큐에 보낼 수 없을 때 임시 저장하는 공간에 상응할 수 있다.The free queue may correspond to a space for temporary storage when a received TCP packet can not be sent to the receive queue.

리소스 제어부(230)는 어플리케이션 상태 정보 및 전송 상태 중 적어도 하나를 고려하여 어플리케이션에 할당되는 시스템 리소스를 제어한다. 즉, 어플리케이션의 상태와 네트워크의 상태를 고려하여 최적의 시스템 리소스 분배를 결정하고, 결정된 시스템 리소스를 어플리케이션에 할당할 수 있다. 이 때, 리소스 제어부(230)는 도 1에 도시된 네트워크 통신 스택(130)과 멀티코어 프로세스(140)를 조정함으로써 시스템 리소스를 제어할 수 있다. The resource control unit 230 controls system resources allocated to the application in consideration of at least one of the application state information and the transfer state. That is, the optimum system resource distribution can be determined in consideration of the state of the application and the state of the network, and the determined system resource can be allocated to the application. At this time, the resource control unit 230 can control system resources by adjusting the network communication stack 130 and the multicore process 140 shown in FIG.

이 때, 어플리케이션 상태 정보 및 전송 상태 중 적어도 하나를 기반으로 어플리케이션의 현재 품질 수치를 측정할 수 있고, 어플리케이션에 상응하는 목표 품질 수치와 현재 품질 수치의 일치 여부에 따라 시스템 리소스의 할당을 조절할 수 있다.At this time, the current quality value of the application can be measured based on at least one of the application state information and the transmission state, and the allocation of the system resource can be adjusted according to whether the target quality value corresponding to the application matches the current quality value .

예를 들어, 현재 어플리케이션에서 측정된 현재 품질 수치가 목표로 하는 목표 품질 수치에서 벗어났다고 가정한다면, 현재 품질 수치가 목표 품질 수치를 초과하였는지 또는 미만인지 여부를 판단할 수 있다. 만약, 현재 품질 수치가 목표 품질 수치를 초과하였다면 어플리케이션에 필요 이상의 시스템 리소스를 할당하고 있는 것으로 판단하고, 어플리케이션에 상응하는 포트의 통신 패킷을 강제로 누락하도록 네트워크 통신 스택을 조정하여 네트워크 대역폭과 CPU 리소스를 절약할 수 있다. For example, if it is assumed that the current quality value measured in the current application has deviated from the target quality value to be targeted, it can be determined whether the current quality value exceeds or is below the target quality value. If the current quality value exceeds the target quality value, it is determined that the application allocates more system resources than necessary, and the network communication stack is adjusted so that the communication packet of the port corresponding to the application is forcibly omitted, . &Lt; / RTI &gt;

또한, 현재 품질 수치가 목표 품질 수치 미만이라면 어플리케이션의 성능이 향상되도록 설정할 수 있다. 예를 들어, 역전큐의 상태를 조회하여 역전큐에 저장된 패킷이 기설정된 임계치 이상이라면, 네트워크 상태가 좋지 않거나 강제 누락 주기가 짧아 누락되는 패킷이 필요이상 많은 것으로 판단할 수 있다. 따라서, 이와 같은 경우에는 특정 포트의 강제 누락 주기를 길게 조절하여 역전큐가 발생하지 않도록 할 수 있다.Further, if the current quality value is less than the target quality value, the performance of the application can be set to be improved. For example, if the state of the inversion queue is checked and the packet stored in the inversion queue is equal to or greater than a preset threshold, it can be determined that the packet is missed because the network state is poor or the forced omission period is short. Therefore, in this case, it is possible to prevent the inversion queue from occurring by adjusting the forced omission period of the specific port to be long.

또한, 현재 품질 수치가 목표 품질 수치 미만이면서 역전큐에 저장된 패킷이 기설정된 임계치 이상인 상태가 아니라면, 현재 할당된 시스템 리소스가 어플리케이션의 성능을 만족시키지 못하는 수준이라고 판단할 수 있다. 따라서, 이 때에는 CPU 코어 클럭 주파수를 증가시켜 어플리케이션으로 시스템 리소스를 추가로 할당하고, 어플리케이션에 상응하는 포트를 완전히 개방할 수 있도록 강제 누락 주기를 삭제하여 누락되는 패킷이 없도록 조정할 수 있다. 또한, CPU 코어 클럭 주파수 이외에도 CPU 코어 개수를 증가시키거나 고성능에 상응하는 타입으로 코어 타입을 전환하여 시스템 리소스를 추가로 할당할 수도 있다.If the current quality value is less than the target quality value and the packet stored in the inversion queue is not equal to or greater than the predetermined threshold value, it can be determined that the currently allocated system resource does not satisfy the performance of the application. Therefore, at this time, it is possible to increase the CPU core clock frequency so as to further allocate system resources to the application, and to eliminate the forcible drop period so as to completely open the port corresponding to the application, so that there is no missing packet. In addition to the CPU core clock frequency, the number of CPU cores may be increased, or the core type may be switched to a type corresponding to high performance to further allocate system resources.

이 때, 성능 측정 단위, 성능 최대치, 성능 정상치, 성능 최소치 중 적어도 하나를 포함하는 품질 요구사항을 기반으로 목표 품질 수치를 계산할 수 있다.At this time, the target quality value can be calculated based on the quality requirement including at least one of the performance measurement unit, the performance maximum value, the performance normal value, and the performance minimum value.

이 때, 성능 측정 단위는 어플리케이션에 대해서 측정하고자 하는 품질의 성능 지표를 나타낼 수 있다. 또한, 복수 개의 어플리케이션에 대해 전체적인 성능 개선을 위해 다른 성능 지표와 비교 및 변환에 활용될 수 있다.At this time, the performance measurement unit may represent a performance index of the quality to be measured for the application. In addition, it can be used for comparison and conversion with other performance indicators for overall performance improvement for a plurality of applications.

이 때, 성능 최대치와 성능 최소치는 네트워크 기반의 어플리케이션이 실행될 때 만족해야 할 품질의 범위를 표현할 수 있다. 즉, 성능 최소치부터 성능 최대치까지의 범위가 어플리케이션이 실행될 때 만족해야 할 품질의 범위에 상응할 수 있다. 또한, 성능 최소치는 어플리케이션이 가져야 하는 최소한의 품질 요구사항에 상응할 수 있고, 성능 최대치는 저전력과 같이 단말이 필요이상 시스템 리소스를 사용하지 않도록 하는데 활용될 수 있다.In this case, the maximum performance and the minimum performance can express a range of quality that should be satisfied when a network-based application is executed. That is, a range from a performance minimum to a performance maximum may correspond to a range of qualities that must be satisfied when an application is executed. Also, the minimum performance value may correspond to the minimum quality requirement that the application should have, and the maximum performance value may be utilized to prevent the terminal from using unnecessary system resources such as low power consumption.

성능 정상치는 단말의 시스템 리소스가 충분한 상태에서 사용자에게 최적의 품질에 상응하는 어플리케이션을 제공하는 값에 상응할 수 있으며, 목표 품질 수치를 계산하는 기준값에 상응할 수 있다.The performance normal value may correspond to a value that provides an application corresponding to the optimum quality to the user in a state in which the system resources of the terminal are sufficient, and may correspond to a reference value for calculating the target quality value.

이 때, CPU 코어 클럭 주파수, 코어 개수, 코어 타입 및 네트워크 대역폭 중 적어도 하나에 상응하는 시스템 리소스를 조절할 수 있다. 즉, 어플리케이션에 시스템 리소스를 더 할당해야 하는 경우에는 CPU 코어 클럭 주파수 증가, CPU 코어의 개수 증가 또는 코어의 타입을 고성능 타입으로 전환하는 등의 제어를 수행할 수 있고, 네트워크의 상태가 나쁜 경우에 네트워크 대역폭을 늘여서 원활한 통신이 가능하도록 조절할 수 있다.At this time, the system resource corresponding to at least one of the CPU core clock frequency, the number of cores, the core type, and the network bandwidth can be adjusted. That is, when more system resources are to be allocated to the application, it is possible to perform control such as increasing the CPU core clock frequency, increasing the number of CPU cores, or switching the core type to the high performance type. The network bandwidth can be increased to enable smooth communication.

이 때, 어플리케이션의 네트워크 포트번호로 수신된 패킷을 강제 누락시키는 강제 누락 주기를 조절하여 네트워크 대역폭을 조절할 수 있다. 예를 들어, 강제 누락 주기를 짧게 조절하여 네트워크 대역폭을 줄이거나, 강제 누락 주기를 길게 조절하여 네트워크 대역폭을 늘릴 수 있다.At this time, it is possible to adjust the network bandwidth by adjusting the forcible drop period for forcibly dropping the received packet to the network port number of the application. For example, you can shorten the forced drop period to shorten the network bandwidth, or adjust the forced drop period to increase the network bandwidth.

이 때, 목표 품질 수치를 기준으로 목표 품질 범위를 설정하고, 현재 품질 수치가 목표 품질 범위에 상응하면 목표 품질 수치와 현재 품질 수치가 일치하는 것으로 판단할 수 있다. 예를 들어, 목표 품질 수치가 N에 상응한다고 가정한다면, N을 기준으로 N을 초과하는 범위와 N 미만의 범위를 설정하여 목표 품질 범위를 설정할 수 있다. 이 후, 현재 품질 수치가 목표 품질 범위에 포함되는 경우 목표 품질 수치와 현재 품질 수치가 일치한다고 판단할 수 있다. At this time, the target quality range is set based on the target quality value, and it can be determined that the target quality value and the current quality value match when the current quality value corresponds to the target quality range. For example, if it is assumed that the target quality value corresponds to N, the target quality range can be set by setting a range exceeding N and a range of less than N based on N. [ Thereafter, when the current quality value is included in the target quality range, it can be determined that the target quality value matches the current quality value.

이 때, 목표 품질 범위는 개발자 또는 관리자에 의해 자유롭게 변경이 가능할 수 있다.At this time, the target quality range can be freely changed by the developer or the manager.

이와 같은 시스템 리소스 최적화 장치(110)는 상기에서 설명한 실시예에 한정되지 않고, 메모리, 미디어 인코더, 미디어 디코더 및 캐쉬 등 어플리케이션의 성능을 모니터링하고 제어할 수 있는 소프트웨어 및 하드웨어 장치들에 적용될 수 있다.
The system resource optimizing apparatus 110 may be applied to software and hardware devices capable of monitoring and controlling performance of an application such as a memory, a media encoder, a media decoder, and a cache, not limited to the above-described embodiments.

도 3은 도 2에 도시된 리소스 제어부를 나타낸 블록도이다.3 is a block diagram showing the resource control unit shown in FIG.

도 3을 참조하면, 도 2에 도시된 리소스 제어부(230)는 품질 수치 측정부(310) 및 리소스 조절부(320)를 포함한다.Referring to FIG. 3, the resource control unit 230 shown in FIG. 2 includes a quality measurement unit 310 and a resource control unit 320.

품질 수치 측정부(310)는 어플리케이션 상태 정보 및 전송 상태 중 적어도 하나를 기반으로 어플리케이션의 현재 품질 수치를 측정한다. 예를 들어, 네트워크의 전송 상태가 좋지 않거나 어플리케이션에 할당되는 시스템 리소스의 할당량이 적절하지 않은 경우에는 어플리케이션의 현재 품질 수치가 낮아질 가능성이 있다. 따라서, 어플리케이션을 최적의 조건에서 실행하기 위해 일단 어플리케이션의 성능에 영향을 줄 수 있는 요소들을 고려하여 현재에 상응하는 어플리케이션의 품질 수치를 측정할 수 있다.The quality measurement unit 310 measures the current quality level of the application based on at least one of the application status information and the transmission status. For example, if the transmission state of the network is not good or the allocation of system resources allocated to the application is not appropriate, the current quality level of the application may be lowered. Therefore, in order to execute the application under optimal conditions, it is possible to measure the quality value of the application corresponding to the present one, taking into consideration the factors that can once affect the performance of the application.

리소스 조절부(320)는 어플리케이션에 상응하는 목표 품질 수치와 현재 품질 수치의 일치 여부에 따라 시스템 리소스의 할당을 조절한다.The resource adjuster 320 adjusts the allocation of the system resources according to whether the target quality value corresponding to the application matches the current quality value.

예를 들어, 현재 품질 수치가 목표 품질 수치에서 벗어났다고 가정한다면, 현재 품질 수치가 목표 품질 수치를 초과하였는지 또는 미만인지 여부를 판단할 수 있다. 만약, 현재 품질 수치가 목표 품질 수치를 초과하였다면 어플리케이션에 필요 이상의 시스템 리소스를 할당하고 있는 것으로 판단하고, 어플리케이션에 상응하는 포트의 통신 패킷을 강제로 누락하도록 네트워크 통신 스택을 조정하여 네트워크 대역폭과 CPU 리소스를 절약할 수 있다. For example, if it is assumed that the current quality value deviates from the target quality value, it may be determined whether the current quality value exceeds or is below the target quality value. If the current quality value exceeds the target quality value, it is determined that the application allocates more system resources than necessary, and the network communication stack is adjusted so that the communication packet of the port corresponding to the application is forcibly omitted, . &Lt; / RTI &gt;

또한, 현재 품질 수치가 목표 품질 수치 미만이라면 어플리케이션의 성능이 향상되도록 설정할 수 있다. 예를 들어, 역전큐의 상태를 조회하여 역전큐에 저장된 패킷이 기설정된 임계치 이상이라면, 네트워크 상태가 좋지 않거나 강제 누락 주기가 짧아 누락되는 패킷이 필요이상 많은 것으로 판단할 수 있다. 따라서, 이와 같은 경우에는 특정 포트의 강제 누락 주기를 길게 조절하여 역전큐가 발생하지 않도록 할 수 있다.Further, if the current quality value is less than the target quality value, the performance of the application can be set to be improved. For example, if the state of the inversion queue is checked and the packet stored in the inversion queue is equal to or greater than a preset threshold, it can be determined that the packet is missed because the network state is poor or the forced omission period is short. Therefore, in this case, it is possible to prevent the inversion queue from occurring by adjusting the forced omission period of the specific port to be long.

또한, 현재 품질 수치가 목표 품질 수치 미만이면서 역전큐에 저장된 패킷이 기설정된 임계치 이상인 상태가 아니라면, 현재 할당된 시스템 리소스가 어플리케이션의 성능을 만족시키지 못하는 수준이라고 판단할 수 있다. 따라서, 이 때에는 CPU 코어 클럭 주파수를 증가시켜 어플리케이션으로 시스템 리소스를 추가로 할당하고, 어플리케이션에 상응하는 포트를 완전히 개방할 수 있도록 강제 누락 주기를 삭제하여 누락되는 패킷이 없도록 조정할 수 있다. 또한, 코어의 개수를 증가시키거나 고성능에 상응하게 코어 타입을 전환하여 시스템 리소스를 추가로 할당할 수도 있다.If the current quality value is less than the target quality value and the packet stored in the inversion queue is not equal to or greater than the predetermined threshold value, it can be determined that the currently allocated system resource does not satisfy the performance of the application. Therefore, at this time, it is possible to increase the CPU core clock frequency so as to further allocate system resources to the application, and to eliminate the forcible drop period so as to completely open the port corresponding to the application, so that there is no missing packet. Further, system resources may be further allocated by increasing the number of cores or switching the core type according to high performance.

이 때, 성능 측정 단위, 성능 최대치, 성능 정상치, 성능 최소치 중 적어도 하나를 포함하는 품질 요구사항을 기반으로 목표 품질 수치를 계산할 수 있다.At this time, the target quality value can be calculated based on the quality requirement including at least one of the performance measurement unit, the performance maximum value, the performance normal value, and the performance minimum value.

이 때, 성능 측정 단위는 어플리케이션에 대해서 측정하고자 하는 성능의 지표를 나타낼 수 있다. 또한, 복수 개의 어플리케이션에 대해 전체적인 품질 개선을 위해 다른 성능 지표와 비교 및 변환에 활용될 수 있다.At this time, the performance measurement unit may indicate an index of performance to be measured for the application. In addition, it can be used for comparison and conversion with other performance indicators for overall quality improvement for a plurality of applications.

이 때, 성능 최대치와 성능 최소치는 네트워크 기반의 어플리케이션이 실행될 때 만족해야 할 품질의 범위를 표현할 수 있다. 즉, 성능 최소치부터 성능 최대치까지의 범위가 어플리케이션이 실행될 때 만족해야 할 품질에 범위에 상응할 수 있다. 또한, 성능 최소치는 어플리케이션이 가져야 하는 최소한의 품질 요구사항에 상응할 수 있고, 성능 최대치는 저전력과 같이 단말이 필요이상 시스템 리소스를 사용하지 않도록 하는데 활용될 수 있다.In this case, the maximum performance and the minimum performance can express a range of quality that should be satisfied when a network-based application is executed. That is, a range from a performance minimum to a performance maximum may correspond to a range of qualities that an application must satisfy when it is executed. Also, the minimum performance value may correspond to the minimum quality requirement that the application should have, and the maximum performance value may be utilized to prevent the terminal from using unnecessary system resources such as low power consumption.

성능 정상치는 단말의 시스템 리소스가 충분한 상태에서 사용자에게 최적의 품질에 상응하는 어플리케이션을 제공하는 값에 상응할 수 있으며, 목표 품질 수치를 계산하는 기준값에 상응할 수 있다.The performance normal value may correspond to a value that provides an application corresponding to the optimum quality to the user in a state in which the system resources of the terminal are sufficient, and may correspond to a reference value for calculating the target quality value.

이 때, 목표 품질 수치를 기준으로 목표 품질 범위를 설정하고, 현재 품질 수치가 목표 품질 범위에 상응하면 목표 품질 수치와 현재 품질 수치가 일치하는 것으로 판단할 수 있다.
At this time, the target quality range is set based on the target quality value, and it can be determined that the target quality value and the current quality value match when the current quality value corresponds to the target quality range.

도 4는 도 1에 도시된 시스템 리소스 최적화 장치와 네트워크 통신 스택을 상세하게 나타낸 블록도이다.4 is a block diagram illustrating in detail the system resource optimization apparatus and network communication stack shown in FIG.

도 4를 참조하면, 시스템 리소스 최적화 장치(400)는 단말에서 실행되는 어플리케이션의 품질 요구사항을 기반으로 생성되는 어플리케이션의 어플리케이션 상태 정보와 네트워크 통신 스택(410)이 주기적으로 전송하는 네트워크의 상태 정보를 분석하여 시스템 리소스를 제어할 수 있다.Referring to FIG. 4, the system resource optimization apparatus 400 includes application state information of an application generated based on quality requirements of an application executed in a terminal, and state information of a network periodically transmitted by the network communication stack 410 You can analyze and control system resources.

이 때, 네트워크 통신 스택(410)은 크게 TCP 패킷 처리 모듈(420), TCP 패킷 필터링 모듈(430) 및 IP 패킷 처리 모듈(440)을 포함할 수 있다.At this time, the network communication stack 410 may include a TCP packet processing module 420, a TCP packet filtering module 430, and an IP packet processing module 440.

IP 패킷 처리 모듈(440)은 네트워크 디바이스로부터 네트워크를 통해 수신된 복수 개의 통신 패킷들 중에서 해당 단말에 관련된 패킷만을 필터링하여 상위 레이어에 해당하는 TCP 패킷 필터링 모듈(430)로 전달할 수 있다. The IP packet processing module 440 may filter only the packets related to the corresponding terminal among the plurality of communication packets received through the network from the network device and transmit the filtered packets to the TCP packet filtering module 430 corresponding to the upper layer.

TCP 패킷 필터링 모듈(430)은 IP 패킷 처리 모듈(440)로부터 전달된 적어도 하나 이상의 패킷 중에서 특정 포트에 해당되는 TCP 패킷을 걸러내는 역할을 수행할 수 있다.The TCP packet filtering module 430 may filter a TCP packet corresponding to a specific port from at least one or more packets transmitted from the IP packet processing module 440.

TCP 패킷 처리 모듈(420)은 TCP 패킷 필터링 모듈(430)을 통과한 TCP 패킷을 해석하고, 큐 그룹(422)에 속한 복수 개의 큐를 거쳐 최종적으로 TCP 패킷을 어플리케이션에 전달하는 역할을 수행할 수 있다. The TCP packet processing module 420 analyzes a TCP packet that has passed through the TCP packet filtering module 430 and finally transmits a TCP packet to an application through a plurality of queues belonging to the queue group 422 have.

도 4를 참조하여 전체적인 패킷의 흐름을 설명하면, 네트워크 디바이스로부터 수신된 복수개의 통신 패킷들은 IP 패킷 처리 모듈(440)로 전달될 수 있다. Referring to FIG. 4, the overall packet flow will be described. A plurality of communication packets received from the network device may be transmitted to the IP packet processing module 440.

이 후, IP 패킷 처리 모듈(440)은 전달된 복수 개의 통신 패킷들 중 단말에 해당되는 적어도 하나 이상의 TCP 패킷만 걸러내어 TCP 패킷 필터링 모듈(430)로 전달할 수 있다. Thereafter, the IP packet processing module 440 may filter at least one or more TCP packets corresponding to the terminal among the plurality of transmitted communication packets, and may transmit the at least one TCP packet to the TCP packet filtering module 430.

이 후, TCP 패킷 필터링 모듈(430)은 리소스 제어부(403)로부터 수신된 포트 제어에 상응하는 정보, 즉 포트 제어 목록을 확인하고 이에 해당하는 패킷을 강제로 누락하도록 제어할 수 있다. 이와 같은 패킷 강제 누락을 통해 상위 레이어에 상응하는 TCP 패킷 처리 모듈(420)에서 처리할 패킷의 수를 줄여줌으로써 패킷 처리를 위한 시스템 리소스를 절약할 수 있고, 어플리케이션 별로 할당되는 네트워크 대역폭을 조절할 수도 있다. Thereafter, the TCP packet filtering module 430 may check the information corresponding to the port control received from the resource control unit 403, that is, the port control list, and forcibly omit the corresponding packet. By reducing the number of packets to be processed by the TCP packet processing module 420 corresponding to the upper layer through the forced packet omission, system resources for packet processing can be saved and the network bandwidth allocated for each application can be adjusted .

이 후, TCP 패킷 필터링 모듈(430)은 적어도 하나 이상의 패킷 중에서 누락되지 않고 남은 TCP 패킷을 TCP 패킷 처리 모듈(420)의 큐 그룹(422)에 포함된 큐들로 전달할 수 있다.Thereafter, the TCP packet filtering module 430 can forward the remaining TCP packets to the queues included in the queue group 422 of the TCP packet processing module 420, without missing one or more packets.

이 후, 큐 모니터링 모듈(421)은 큐 그룹(422)에 속한 큐들을 모니터링 하면서 네트워크 모니터링부(402)에게 실시간으로 큐들의 상태를 전달할 수 있다. Thereafter, the queue monitoring module 421 may monitor the queues belonging to the queue group 422 and deliver the status of the queues to the network monitoring unit 402 in real time.

이 때, 단말에서 실행되고 있는 적어도 하나 이상의 어플리케이션 별로 큐들의 상태를 모니터링 할 수 있다. At this time, the state of the queues can be monitored by at least one application executed in the terminal.

이 때, 큐 그룹(422)에 속하는 큐들은 백로그큐(Backlog queue), 프리큐(Prequeue), 역전큐(Out of order sequeue) 및 수신큐(Received queue) 중 적어도 하나에 상응할 수 있다.At this time, the queues belonging to the queue group 422 may correspond to at least one of a backlog queue, a prequeue, an out of order sequeue, and a received queue.

이 때, 역전큐는 여러 개의 TCP 패킷이 중복되거나 순서가 많지 않게 들어와서 저장되는 공간으로 단말 외부 네트워크의 상태가 좋지 않음을 나타낼 수 있다. 또한, 이로 인해 TCP 패킷의 처리를 위한 CPU 리소스, 즉 시스템 리소스를 많이 사용하고 있다는 것을 알 수 있다.In this case, the inversion queue may indicate that the state of the external network is poor due to the overlapping of multiple TCP packets or a sequence of not many incoming packets. In addition, it can be seen that the CPU resource for processing the TCP packet, that is, the system resource is heavily used.

또한, 수신큐는 어플리케이션 레벨에서 패킷을 가져가지 않는 경우에 패킷들이 저장되는 공간으로 어플리케이션에 이를 처리할 수 있도록 알려줄 수 있다.In addition, the receive queue may inform the application to process the space in which the packets are stored in the case that the packet is not taken at the application level.

시스템 리소스 최소화 장치(400)는 상기와 같이 구성된 네트워크 통신 스택(410)으로부터 네트워크의 상태 정보를 수신하고, 어플리케이션 상태 정보 획득부(401)에서 어플리케이션 상태 정보를 획득하여 어플리케이션으로 할당되는 시스템 리소스를 조절할 수 있다.The system resource minimization apparatus 400 receives status information of the network from the network communication stack 410 configured as described above, acquires application status information from the application status information acquisition unit 401, and adjusts the system resources allocated to the application .

이 때, 시스템 리소스 최적화 장치(400)는 리소스 제어부(403)를 통해 CPU 코어 클럭 주파수나 코어 개수, 코어 타입 및 네트워크 대역폭을 조절할 수 있다. At this time, the system resource optimization apparatus 400 can control the CPU core clock frequency, the number of cores, the core type, and the network bandwidth through the resource control unit 403. [

이 때, 리소스 제어부(403)는 멀티코어 프로세스를 제어하여 CPU 코어 클럭 주파수, CPU 코어 개수 및 코어 타입 등을 조절할 수 있고, 네트워크 통신 스택(410)으로 패킷을 강제 누락시킬 포트 목록 및 강제 누락 주기를 제공하여 네트워크 대역폭을 조절할 수 있다.
At this time, the resource control unit 403 controls the multicore process to adjust the CPU core clock frequency, the number of CPU cores, and the core type. The resource control unit 403 controls the network communication stack 410 such that the port list and the forced miss cycle To adjust the network bandwidth.

도 5는 본 발명의 일실시예에 따른 어플리케이션 상태 정보를 나타낸 도면이다.5 is a diagram illustrating application status information according to an exemplary embodiment of the present invention.

도 5를 참조하면, 스트리밍 미디어 재생 어플리케이션에 있어서 동영상의 재생 속도와 관련된 어플리케이션 상태 정보(500)를 확인할 수 있다.Referring to FIG. 5, application status information 500 related to the playback speed of a moving image in the streaming media playback application can be checked.

도 5에 도시된 어플리케이션 상태 정보(500)의 품질 요구사항(510)을 살펴보면, 성능 측정 단위(511), 성능 최대치(512), 성능 정상치(513) 및 성능 최소치(514)를 포함하는 것을 확인할 수 있다.The quality requirement 510 of the application state information 500 shown in FIG. 5 is confirmed to include the performance measurement unit 511, the performance maximum value 512, the performance normal value 513, and the performance minimum value 514 .

이 때, 도 5에 도시된 어플리케이션 상태 정보는 성능 측정 단위(511)로 동영상의 재생 단위인 fps(frames per second)가 사용된 것을 확인할 수 있다. 즉, 스트리밍 미디어 재생 어플리케이션의 품질을 측정하는 성능 지표로서 fps를 사용할 수 있다.In this case, it can be seen that the application status information shown in FIG. 5 uses fps (frames per second), which is a playback unit of a moving image, as a performance measurement unit 511. In other words, fps can be used as a performance indicator for measuring the quality of a streaming media playback application.

또한, 성능 최대치(512)는 어플리케이션에 불필요하게 많은 시스템 리소스가 할당되는지 여부를 확인하는데 활용되는 값일 수 있다. 예를 들어, 어플리케이션 상태 정보(500)에 상응하는 스트리밍 미디어 재생 어플리케이션의 현재 fps를 측정하였을 때, 40fps를 초과하였다면 필요이상으로 많은 시스템 리소스가 할당된 것으로 판단할 수 있다. 따라서, 이 경우에는 스트리밍 미디어 재생 어플리케이션으로 할당되는 시스템 리소스를 감소시킬 수 있다. In addition, the maximum performance value 512 may be a value used for checking whether unnecessary system resources are allocated to an application. For example, when the current fps of the streaming media playback application corresponding to the application status information 500 is measured, if it exceeds 40 fps, it can be determined that more system resources are allocated than necessary. Therefore, in this case, the system resources allocated to the streaming media playback application can be reduced.

또한, 성능 최소치(514)는 네트워크 기반의 어플리케이션이 실행될 수 있는 최소한의 성능일 수 있다. Also, the performance minimum 514 may be the minimum performance at which a network based application can be run.

따라서, 성능 최대치(512)와 성능 최소치(514)를 통해 네트워크 기반의 어플리케이션이 실행될 때 만족해야 하는 성능의 범위를 표현할 수 있다. 예를 들어, 도 5에 상응하는 스트리밍 미디어 재생 어플리케이션의 경우에는 fps를 최소 25fps에서 최대 40fps 사이에 상응하게 유지시켰을 때, 전체적인 문제 없이 어플리케이션이 실행될 수 있다.Thus, a range of performance to be satisfied when a network-based application is executed through the performance maximum value 512 and the performance minimum value 514 can be expressed. For example, in the case of the streaming media playback application corresponding to FIG. 5, when the fps is maintained between 25 fps and 40 fps at minimum, the application can be executed without any problem as a whole.

또한, 성능 정상치(513)는 단말의 시스템 리소스가 충분한 상태에서 단말의 사용자에게 최적의 품질을 제공할 수 있는 값일 수 있다. 따라서, 성능 정상치(513)는 시스템 리소스 최적화 장치의 목표 품질 수치를 계산하는데 활용될 수 있다.
In addition, the performance normal value 513 may be a value that can provide an optimum quality to the user of the terminal in a state where the system resource of the terminal is sufficient. Therefore, the performance normal value 513 can be utilized to calculate the target quality value of the system resource optimization apparatus.

도 6은 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 방법을 나타낸 동작 흐름도이다.6 is a flowchart illustrating a self-adaptive system resource optimization method according to an exemplary embodiment of the present invention.

도 6을 참조하면, 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 방법은 어플리케이션에 상응하는 어플리케이션 상태 정보를 획득한다(S610). 단말에서 현재 가용할 수 있는 시스템 리소스를 최대한 활용하여 어플리케이션의 성능 및 품질을 유지하기 위해서, 복수 개의 어플리케이션들 각각 상응하는 어플리케이션 상태 정보를 획득할 수 있다. 이 때, 복수 개의 어플리케이션들은 자신의 품질에 대한 정보를 일정 주기마다 실시간으로 전송해 줄 수 있다.Referring to FIG. 6, a self-adaptive system resource optimization method according to an embodiment of the present invention acquires application state information corresponding to an application (S610). The application state information corresponding to each of the plurality of applications can be obtained in order to maximize utilization of the system resources currently available in the terminal and to maintain the performance and quality of the application. At this time, a plurality of applications can transmit information on their quality at regular intervals in real time.

이 때, 어플리케이션 상태 정보는 정적인 정보에 해당하는 품질 요구사항 및 어플리케이션에 대해 실시간으로 수집된 동적 상태 정보 중 적어도 하나를 포함할 수 있다.  At this time, the application status information may include at least one of quality requirements corresponding to static information and dynamic status information collected in real time for the application.

또한, 네트워크 어플리케이션이 단말에서 초기 실행될 때, 네트워크 어플리케이션의 품질 요구사항을 전송할 수 있으며, 이를 위해 네트워크 어플리케이션 자체에 대한 품질 요구사항이 정의될 수 있다. Further, when the network application is initially executed in the terminal, the quality requirement of the network application can be transmitted, and the quality requirement for the network application itself can be defined for this purpose.

또한, 어플리케이션 상태 정보는 어플리케이션의 자체 실행에 필요한 아이디 정보, 버전 정보, 아이콘, 필요한 리소스 정보 등에 상응하는 어플리케이션 특성 정보를 포함할 수도 있다.In addition, the application status information may include application characteristic information corresponding to ID information, version information, icons, necessary resource information, and the like necessary for the self-execution of the application.

이 때, 동적 상태 정보는 어플리케이션 식별정보, 포트번호, 순간 데이터 사용량, 평균 데이터 사용량 및 대역폭 중 적어도 하나에 상응하는 시스템 수집 정보 및 실행 시간, 프레임 레이트(FPS, Frame Per Second) 및 화면 크기 중 적어도 하나에 상응하는 어플리케이션 측정 정보 중 적어도 하나를 포함하고, 기설정된 체크 주기마다 체크하여 갱신될 수 있다. 예를 들어, 단말에 설치된 네트워크 어플리케이션이 실행된 후에 어플리케이션의 상태 정보가 지속적으로 변동될 수 있기 때문에, 기설정된 주기마다 실시간으로 동적 상태 정보를 체크하여 어플리케이션에 할당되는 시스템 리소스를 제어하는데 참고할 수 있다.At this time, the dynamic status information includes at least system collection information corresponding to at least one of the application identification information, the port number, the instantaneous data usage, the average data usage and the bandwidth, and the execution time, the frame rate (FPS) And at least one of the application measurement information corresponding to one of the application programs, and may be updated by checking every predetermined check period. For example, since the state information of the application may continuously change after the network application installed in the terminal is executed, dynamic state information may be checked in real time every predetermined period to control the system resource allocated to the application.

이 때, 시스템 수집 정보는 시스템, 즉 단말이나 시스템 리소스 최적화 장치를 통해 수집될 수 있으며, 어플리케이션 측정 정보는 어플리케이션을 통해 실시간으로 측정될 수 있다.At this time, the system gathering information can be collected through the system, that is, the terminal or the system resource optimizing apparatus, and the application measurement information can be measured in real time through the application.

이 때, 어플리케이션에 상응하는 소스 코드 및 어플리케이션의 성능을 외부 프로그램 및 시스템 커널로 중 적어도 어느 하나로 측정하여 생성된 외부 어플리케이션 상태 정보 중 적어도 하나를 기반으로 어플리케이션 상태 정보를 획득할 수 있다. 예를 들어, 어플리케이션에 소스 코드에 형태로 정의된 어플리케이션 상태 정보를 획득하거나, 어플리케이션의 성능을 측정하는 외부 프로그램을 실행하여 외부 어플리케이션 상태 정보를 생성할 수 있다.At this time, the application state information can be obtained based on at least one of the source code corresponding to the application and the external application state information generated by measuring the performance of the application with at least one of an external program and a system kernel. For example, it is possible to obtain application state information defined in the form of source code in an application or to generate external application state information by executing an external program measuring the performance of the application.

또한, 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 방법은은 어플리케이션의 실행을 위해 연결되는 네트워크의 전송 상태를 모니터링 한다(S620). 이 때, 네트워크 통신 스택을 통해 네트워크의 전송 상태를 지속적으로 보고받음으로써 모니터링을 수행할 수 있다. In addition, the self-adaptation-based system resource optimization method according to an embodiment of the present invention monitors the transmission state of the connected network to execute the application (S620). At this time, monitoring can be performed by continuously receiving and reporting the transmission status of the network through the network communication stack.

이 때, 네트워크 통신 스택으로부터 큐 모니터링 상태 정보를 실시간으로 획득하고, 큐 모니터링 상태 정보를 기반으로 네트워크의 전송 상태를 판단할 수 있다. 예를 들어, 네트워크 통신 스택은 네트워크 디바이스로부터 수신한 통신 메시지 중에서 단말의 어플리케이션에게 전달되어야 할 패킷만을 걸러낼 수 있다. 이 후, 어플리케이션에 전달된 패킷을 임시로 큐(queue)에 저장하였다가 전달될 수 있는데, 이 때 패킷이 저장되는 적어도 하나의 큐에 대한 큐 모니터링 상태 정보를 실시간으로 획득할 수 있다.At this time, the queue monitoring status information can be acquired in real time from the network communication stack, and the transmission status of the network can be determined based on the queue monitoring status information. For example, the network communication stack can filter only packets to be delivered to the application of the terminal among the communication messages received from the network device. Thereafter, the packet delivered to the application may be temporarily stored in a queue. In this case, the queue monitoring status information for at least one queue in which the packet is stored may be acquired in real time.

이 때, 큐 모니터링 상태 정보는 어플리케이션이 설치된 단말로 수신되는 TCP 패킷이 임시로 저장되는 적어도 하나의 큐의 상태를 단말에서 실행되고 있는 적어도 하나 이상의 어플리케이션 별로 모니터링 하여 생성될 수 있다. 예를 들어, 네트워크 디바이스로부터 수신된 통신 메시지 중 TCP 패킷만을 걸러내고, 시스템 리소스 최적화 장치에서 무시하도록 지정된 포드 목록을 기반으로 패킷들을 누락시켜 다시 한번 TCP 패킷을 필터링 할 수 있다. At this time, the queue monitoring status information may be generated by monitoring the state of at least one queue in which the TCP packet received at the terminal installed with the application is temporarily stored for each at least one application executing in the terminal. For example, it is possible to filter only TCP packets among communication messages received from a network device, and to reject TCP packets based on a list of pods designated to be ignored by the system resource optimization device.

이와 같이 네트워크 통신 스택에서 패킷을 필터링하여 전달함으로써 처리해야 할 메시지 수를 줄일 수 있어 시스템 리소스를 절약할 수 있고, 어플리케이션 별로 소요되는 네트워크 대역폭을 조절할 수도 있다.By filtering and delivering packets in the network communication stack, the number of messages to be processed can be reduced, so that system resources can be saved and the network bandwidth required for each application can be controlled.

이 때, 적어도 하나의 큐는 백로그 큐(Backlog queue), 프리큐(Prequeue), 역전 큐(Out of order sequeue) 및 수신큐(Received queue) 중 적어도 하나를 포함할 수 있다. At this time, the at least one queue may include at least one of a backlog queue, a prequeue, an out of order queue, and a received queue.

백로그 큐는 연결 요청 대기 상태에 있는 패킷이 저장되는 공간에 상응하며, 연결이 수락될 때까지 연결 요청 자체를 대기시킬 수 있는 상태에 있다는 것을 의미할 수 있다. 종래에는 백로그 큐의 크기를 5 정도로 설정하였으나, 웹 서버와 같이 잦은 연결 요청을 받는 서버를 구현할 경우에는 최소 15 이상의 크기로 설정될 수 있다.The backlog queue may correspond to the space in which the packets waiting for connection requests are stored and may be in a state in which the connection request itself can be queued until the connection is accepted. Conventionally, the backlog queue size is set to about 5. However, when a server receiving frequent connection requests such as a web server is implemented, the backlog queue size can be set to a minimum size of 15 or more.

역전큐는 여러 TCP 패킷이 중복되거나 순서가 많지 않게 들어와서 쌓이게 되는 공간에 상응하며, 역전큐에 TCP 패킷이 저장된다면 단말 외부의 네트워크 상태가 좋지 않음을 나타낼 수 있다. 또한, 네트워크 상태가 좋지 않음으로 인해 TCP 패킷 처리를 위해 CPU 리소스를 많이 사용하고 있다는 것을 알려줄 수도 있다.The reverse queue corresponds to the space in which multiple TCP packets are stacked or not stacked in order, and if a TCP packet is stored in the inversion queue, it may indicate that the network condition outside the terminal is not good. It can also tell you that you are using a lot of CPU resources to process TCP packets due to poor network conditions.

수신큐는 어플리케이션 레벨에서 패킷을 가져가지 않는 경우에 임시 저장되는 공간으로, 수신큐에 패킷이 임시 저장됨에 따라 어플리케이션이 이에 대해 대처할 수 있도록 알려줄 수 있다.The receive queue is a temporary storage space in case the packet is not taken at the application level, and can inform the application that the packet can be dealt with as the packet is temporarily stored in the receive queue.

프리큐는 수신된 TCP 패킷을 수신큐에 보낼 수 없을 때 임시 저장하는 공간에 상응할 수 있다.The free queue may correspond to a space for temporary storage when a received TCP packet can not be sent to the receive queue.

또한, 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 방법은 어플리케이션 상태 정보 및 전송 상태 중 적어도 하나를 고려하여 어플리케이션에 할당되는 시스템 리소스를 제어한다(S630). 즉, 어플리케이션의 상태와 네트워크의 상태를 고려하여 최적의 시스템 리소스 분배를 결정하고, 결정된 시스템 리소스를 어플리케이션에 할당할 수 있다. 이 때, 도 1에 도시된 네트워크 통신 스택(130)과 멀티코어 프로세스(140)를 조정함으로써 시스템 리소스를 제어할 수 있다. In addition, the self-adaptation-based system resource optimization method according to an embodiment of the present invention controls system resources allocated to an application in consideration of at least one of application state information and transmission state (S630). That is, the optimum system resource distribution can be determined in consideration of the state of the application and the state of the network, and the determined system resource can be allocated to the application. At this time, system resources can be controlled by adjusting the network communication stack 130 and the multicore process 140 shown in FIG.

이 때, 어플리케이션 상태 정보 및 전송 상태 중 적어도 하나를 기반으로 어플리케이션의 현재 품질 수치를 측정할 수 있고, 어플리케이션에 상응하는 목표 품질 수치와 현재 품질 수치의 일치 여부에 따라 시스템 리소스의 할당을 조절할 수 있다.At this time, the current quality value of the application can be measured based on at least one of the application state information and the transmission state, and the allocation of the system resource can be adjusted according to whether the target quality value corresponding to the application matches the current quality value .

예를 들어, 현재 어플리케이션에서 측정된 현재 품질 수치가 목표로 하는 목표 품질 수치에서 벗어났다고 가정한다면, 현재 품질 수치가 목표 품질 수치를 초과하였는지 또는 미만인지 여부를 판단할 수 있다. 만약, 현재 품질 수치가 목표 품질 수치를 초과하였다면 어플리케이션에 필요 이상의 시스템 리소스를 할당하고 있는 것으로 판단하고, 어플리케이션에 상응하는 포트의 통신 패킷을 강제로 누락하도록 네트워크 통신 스택을 조정하여 네트워크 대역폭과 CPU 리소스를 절약할 수 있다. For example, if it is assumed that the current quality value measured in the current application has deviated from the target quality value to be targeted, it can be determined whether the current quality value exceeds or is below the target quality value. If the current quality value exceeds the target quality value, it is determined that the application allocates more system resources than necessary, and the network communication stack is adjusted so that the communication packet of the port corresponding to the application is forcibly omitted, . &Lt; / RTI &gt;

또한, 현재 품질 수치가 목표 품질 수치 미만이라면 어플리케이션의 성능이 향상되도록 설정할 수 있다. 예를 들어, 역전큐의 상태를 조회하여 역전큐에 저장된 패킷이 기설정된 임계치 이상이라면, 네트워크 상태가 좋지 않거나 강제 누락 주기가 짧아 누락되는 패킷이 필요이상 많은 것으로 판단할 수 있다. 따라서, 이와 같은 경우에는 특정 포트의 강제 누락 주기를 길게 조절하여 역전큐가 발생하지 않도록 할 수 있다.Further, if the current quality value is less than the target quality value, the performance of the application can be set to be improved. For example, if the state of the inversion queue is checked and the packet stored in the inversion queue is equal to or greater than a preset threshold, it can be determined that the packet is missed because the network state is poor or the forced omission period is short. Therefore, in this case, it is possible to prevent the inversion queue from occurring by adjusting the forced omission period of the specific port to be long.

또한, 현재 품질 수치가 목표 품질 수치 미만이면서 역전큐에 저장된 패킷이 기설정된 임계치 이상인 상태가 아니라면, 현재 할당된 시스템 리소스가 어플리케이션의 성능을 만족시키지 못하는 수준이라고 판단할 수 있다. 따라서, 이 때에는 CPU 코어 클럭 주파수를 증가시켜 어플리케이션으로 시스템 리소스를 추가로 할당하고, 어플리케이션에 상응하는 포트를 완전히 개방할 수 있도록 강제 누락 주기를 삭제하여 누락되는 패킷이 없도록 조정할 수 있다. 또한, CPU 코어 클럭 주파수 이외에도 코어의 개수를 증가시키거나 고성능에 상응하는 타입으로 코어 타입을 전환함으로써 시스템 리소스를 추가로 할당할 수도 있다.If the current quality value is less than the target quality value and the packet stored in the inversion queue is not equal to or greater than the predetermined threshold value, it can be determined that the currently allocated system resource does not satisfy the performance of the application. Therefore, at this time, it is possible to increase the CPU core clock frequency so as to further allocate system resources to the application, and to eliminate the forcible drop period so as to completely open the port corresponding to the application, so that there is no missing packet. In addition to the CPU core clock frequency, system resources may be further allocated by increasing the number of cores or by switching the core type to a type corresponding to high performance.

이 때, 성능 측정 단위, 성능 최대치, 성능 정상치, 성능 최소치 중 적어도 하나를 포함하는 품질 요구사항을 기반으로 목표 품질 수치를 계산할 수 있다.At this time, the target quality value can be calculated based on the quality requirement including at least one of the performance measurement unit, the performance maximum value, the performance normal value, and the performance minimum value.

이 때, 성능 측정 단위는 어플리케이션에 대해서 측정하고자 하는 품질의 성능 지표를 나타낼 수 있다. 또한, 복수 개의 어플리케이션에 대해 전체적인 성능 개선을 위해 다른 성능 지표와 비교 및 변환에 활용될 수 있다.At this time, the performance measurement unit may represent a performance index of the quality to be measured for the application. In addition, it can be used for comparison and conversion with other performance indicators for overall performance improvement for a plurality of applications.

이 때, 성능 최대치와 성능 최소치는 네트워크 기반의 어플리케이션이 실행될 때 만족해야 할 품질의 범위를 표현할 수 있다. 즉, 성능 최소치부터 성능 최대치까지의 범위가 어플리케이션이 실행될 때 만족해야 할 품질의 범위에 상응할 수 있다. 또한, 성능 최소치는 어플리케이션이 가져야 하는 최소한의 품질 요구사항에 상응할 수 있고, 성능 최대치는 저전력과 같이 단말이 필요이상 시스템 리소스를 사용하지 않도록 하는데 활용될 수 있다.In this case, the maximum performance and the minimum performance can express a range of quality that should be satisfied when a network-based application is executed. That is, a range from a performance minimum to a performance maximum may correspond to a range of qualities that must be satisfied when an application is executed. Also, the minimum performance value may correspond to the minimum quality requirement that the application should have, and the maximum performance value may be utilized to prevent the terminal from using unnecessary system resources such as low power consumption.

성능 정상치는 단말의 시스템 리소스가 충분한 상태에서 사용자에게 최적의 품질에 상응하는 어플리케이션을 제공하는 값에 상응할 수 있으며, 목표 품질 수치를 계산하는 기준값에 상응할 수 있다.The performance normal value may correspond to a value that provides an application corresponding to the optimum quality to the user in a state in which the system resources of the terminal are sufficient, and may correspond to a reference value for calculating the target quality value.

이 때, CPU 코어 클럭 주파수, 코어 개수, 코어 타입 및 네트워크 대역폭 중 적어도 하나에 상응하는 시스템 리소스를 조절할 수 있다. 즉, 어플리케이션에 시스템 리소스를 더 할당해야 하는 경우에는 CPU 코어 클럭 주파수 증가, CPU 코어의 개수 증가 또는 코어의 타입을 고성능 타입으로 전환하는 등의 제어를 수행할 수 있고, 네트워크의 상태가 나쁜 경우에 네트워크 대역폭을 늘여서 원활한 통신이 가능하도록 조절할 수 있다.At this time, the system resource corresponding to at least one of the CPU core clock frequency, the number of cores, the core type, and the network bandwidth can be adjusted. That is, when more system resources are to be allocated to the application, it is possible to perform control such as increasing the CPU core clock frequency, increasing the number of CPU cores, or switching the core type to the high performance type. The network bandwidth can be increased to enable smooth communication.

이 때, 어플리케이션의 네트워크 포트번호로 수신된 패킷을 강제 누락시키는 강제 누락 주기를 조절하여 네트워크 대역폭을 조절할 수 있다. 예를 들어, 강제 누락 주기를 짧게 조절하여 네트워크 대역폭을 줄이거나, 강제 누락 주기를 길게 조절하여 네트워크 대역폭을 늘릴 수 있다.At this time, it is possible to adjust the network bandwidth by adjusting the forcible drop period for forcibly dropping the received packet to the network port number of the application. For example, you can shorten the forced drop period to shorten the network bandwidth, or adjust the forced drop period to increase the network bandwidth.

이 때, 목표 품질 수치를 기준으로 목표 품질 범위를 설정하고, 현재 품질 수치가 목표 품질 범위에 상응하면 목표 품질 수치와 현재 품질 수치가 일치하는 것으로 판단할 수 있다. 예를 들어, 목표 품질 수치가 N에 상응한다고 가정한다면, N을 기준으로 N을 초과하는 범위와 N 미만의 범위를 설정하여 목표 품질 범위를 설정할 수 있다. 이 후, 현재 품질 수치가 목표 품질 범위에 포함되는 경우 목표 품질 수치와 현재 품질 수치가 일치한다고 판단할 수 있다. At this time, the target quality range is set based on the target quality value, and it can be determined that the target quality value and the current quality value match when the current quality value corresponds to the target quality range. For example, if it is assumed that the target quality value corresponds to N, the target quality range can be set by setting a range exceeding N and a range of less than N based on N. [ Thereafter, when the current quality value is included in the target quality range, it can be determined that the target quality value matches the current quality value.

이 때, 목표 품질 범위는 개발자 또는 관리자에 의해 자유롭게 변경이 가능할 수 있다.
At this time, the target quality range can be freely changed by the developer or the manager.

도 7은 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 방법을 상세하게 나타낸 동작 흐름도이다.FIG. 7 is a flowchart illustrating a method of optimizing a self-adaptive system resource according to an exemplary embodiment of the present invention.

도 7을 참조하면, 본 발명의 일실시예에 따른 자가적응 기반의 시스템 리소스 최적화 방법은 먼저 어플리케이션에 상응하는 어플리케이션 상태 정보를 획득한다(S710).Referring to FIG. 7, a self-adaptive system resource optimization method according to an embodiment of the present invention acquires application state information corresponding to an application (S710).

이 때, 어플리케이션 상태 정보는 정적인 정보에 해당하는 품질 요구사항 및 어플리케이션에 대해 실시간으로 수집된 동적 상태 정보 중 적어도 하나를 포함할 수 있다.At this time, the application status information may include at least one of quality requirements corresponding to static information and dynamic status information collected in real time for the application.

또한, 동적 상태 정보는 어플리케이션 식별정보, 포트번호, 순간 데이터 사용량, 평균 데이터 사용량 및 대역폭 중 적어도 하나에 상응하는 시스템 수집 정보 및 실행 시간, 프레임 레이트(FPS, Frame Per Second) 및 화면 크기 중 적어도 하나에 상응하는 어플리케이션 측정 정보 중 적어도 하나를 포함하고, 기설정된 체크 주기마다 체크하여 갱신될 수 있다.The dynamic state information may also include at least one of system gathering information and execution time, frame rate (FPS), and screen size corresponding to at least one of application identification information, port number, instantaneous data usage, average data usage, And application measurement information corresponding to a predetermined check period, and may be updated by checking every predetermined check period.

이 후, 네트워크의 전송 상태를 모니터링 한다(S720).Thereafter, the transmission status of the network is monitored (S720).

이 때, 네트워크 통신 스택을 통해 네트워크의 전송 상태를 지속적으로 보고받음으로써 모니터링을 수행할 수 있다.At this time, monitoring can be performed by continuously receiving and reporting the transmission status of the network through the network communication stack.

또한, 네트워크 통신 스택으로부터 큐 모니터링 상태 정보를 실시간으로 획득하고, 큐 모니터링 상태 정보를 기반으로 네트워크의 전송 상태를 판단할 수 있다.In addition, it is possible to acquire queue monitoring status information from the network communication stack in real time, and determine the transmission status of the network based on the queue monitoring status information.

이 후, 어플리케이션 상태 정보에 포함된 품질 요구사항을 기반으로 목표 품질 수치를 계산하고, 어플리케이션 상태 정보 및 전송 상태 중 적어도 하나를 기반으로 어플리케이션의 현재 품질 수치를 측정한다(S730).Thereafter, the target quality value is calculated based on the quality requirement included in the application state information, and the current quality value of the application is measured based on at least one of the application state information and the transmission state (S730).

이 후, 현재 품질 수치가 목표 품질 수치와 일치하는지 확인하기 위해서, 현재 품질 수치가 목표 품질 범위에 상응하는지 여부를 판단한다(S735).Thereafter, in order to check whether the current quality value matches the target quality value, it is determined whether the current quality value corresponds to the target quality range (S735).

단계(S735)의 판단결과 현재 품질 수치가 목표 품질 범위에 상응하면, 시스템 리소스를 조절하지 않고 유지할 수 있다.As a result of the determination in step S735, if the current quality value corresponds to the target quality range, the system resource can be maintained without adjustment.

그러나, 단계(S735)의 판단결과 현재 품질 수치가 목표 품질 범위에 상응하지 않으면, 현재 품질 수치가 목표 품질 수치 미만인지 여부를 판단한다(S745).However, if it is determined in step S735 that the current quality value does not correspond to the target quality range, it is determined whether the current quality value is less than the target quality value (S745).

단계(S745)의 판단결과 현재 품질 수치가 목표 품질 수치 미만이 아니면, 네트워크 통신 스택에서 어플리케이션에 상응하는 포트의 강제 누락 주기를 짧게 조절한다(S750). 즉, 현재 품질 수치가 목표 품질 수치보다 높기 때문에 필요이상으로 많은 시스템 리소스가 할당되는 것을 알 수 있다. 따라서, 강제 누락 주기를 짧게 조절함으로써 어플리케이션에 상응하는 포트에서 패킷을 많이 누락시켜 네트워크 대역폭과 CPU 리소스를 절약할 수 있다.As a result of the determination in step S745, if the current quality value is not less than the target quality value, the mandatory drop period of the port corresponding to the application in the network communication stack is shortened (S750). That is, since the current quality value is higher than the target quality value, it can be seen that more system resources are allocated than necessary. Thus, by shortening the forced miss cycle, network bandwidth and CPU resources can be saved by missing a lot of packets on the port corresponding to the application.

단계(S745)의 판단결과 현재 품질 수치가 목표 품질 수치 미만이면, 역전큐가 임계치 이상인지 여부를 판단한다(S755).If it is determined in step S745 that the current quality value is less than the target quality value, it is determined whether the inversion queue is equal to or greater than the threshold value (S755).

단계(S755)의 판단결과 역전큐가 임계치 이상이면, 네트워크 통신 스택에서 어플리케이션에 상응하는 포트의 강제 누락 주기를 길게 조절한다(S760). 즉, 어플리케이션의 현재 품질 수치가 낮기 때문에 어플리케이션의 성능이 향상되도록 설정할 수 있는데, 이 때 역전큐가 임계치 이상이므로 네트워크 상태가 좋지 않거나 강제 누락 주기가 짧아 누락되는 패킷이 필요이상 많은 것으로 판단할 수 있다. 따라서, 이와 같은 경우에는 어플리케이션에 상응하는 포트의 강제 누락 주기를 길게 조절하여 역전큐가 발생하지 않도록 할 수 있다.As a result of the determination in step S755, if the inversion queue is equal to or greater than the threshold, the forcible drop period of the port corresponding to the application in the network communication stack is adjusted to be long (S760). That is, since the current quality level of the application is low, it is possible to set the performance of the application to be improved. At this time, since the inverse queue is above the threshold value, the network condition is poor or the forced omission cycle is short, . Therefore, in such a case, it is possible to prevent the occurrence of the inversion queue by adjusting the forcible drop period of the port corresponding to the application.

단계(S755)의 판단결과 역전큐가 임계치 이상이 아니면, 멀티코어 프로세스에서 CPU 코어 클럭 주파수를 증가시키고(S770), 네트워크 통신 스택에서 어플리케이션에 상응하는 포트의 강제 누락 주기를 삭제한다(S780). 즉, 어플리케이션의 성능을 향상시켜야 하는 상황에서 역전큐가 임계치 이상이 아니므로, 현재 할당된 시스템 리소스가 어플리케이션의 성능을 만족시키지 못하는 수준이라고 판단할 수 있다. 따라서, 이 때에는 CPU 코어 클럭 주파수를 증가시켜 어플리케이션으로 시스템 리소스를 추가로 할당하고, 어플리케이션에 상응하는 포트를 완전히 개방할 수 있도록 강제 누락 주기를 삭제하여 누락되는 패킷이 없도록 조정할 수 있다. 또한, 코어의 개수를 제어하거나 고성능 및 저전력에 상응할 수 있는 코어 타입을 적절하게 전환하여 시스템 리소스를 조절할 수도 있다.
If it is determined in step S755 that the inversion queue is not equal to or greater than the threshold value, the CPU core clock frequency is increased in step S770 and the forced omission cycle of the port corresponding to the application is deleted in step S780. That is, since the inversion queue is not equal to or greater than the threshold value in the case of improving the performance of the application, it can be determined that the currently allocated system resource does not satisfy the performance of the application. Therefore, at this time, it is possible to increase the CPU core clock frequency so as to further allocate system resources to the application, and to eliminate the forcible drop period so as to completely open the port corresponding to the application, so that there is no missing packet. It is also possible to control system resources by controlling the number of cores or appropriately switching core types which may correspond to high performance and low power.

도 8은 본 발명의 실시예가 구현된 컴퓨터 시스템을 나타낸 도면이다.8 is a diagram of a computer system in which an embodiment of the present invention is implemented.

도 8을 참조하면, 상술한 본 발명의 실시예는 컴퓨터 시스템에서 구현될 수 있다. 도 8에 도시된 바와 같이, 컴퓨터 시스템(820)은 버스(822)를 통하여 서로 통신하는 하나 이상의 프로세서(821), 메모리(823), 사용자 인터페이스 입력 장치(826), 사용자 인터페이스 출력 장치(827) 및 스토리지(828)를 포함할 수 있다. Referring to FIG. 8, the above-described embodiments of the present invention can be implemented in a computer system. 8, the computer system 820 includes one or more processors 821, a memory 823, a user interface input device 826, a user interface output device 827, And storage 828.

또한, 컴퓨터 시스템(820)은 네트워크(830)에 연결되는 하나 이상의 네트워크 인터페이스(829)를 더 포함할 수 있다. 프로세서(821)는 중앙 처리 장치 또는 메모리(823) 또는 스토리지(828)에 저장된 프로세싱 인스트럭션들을 실행하는 반도체 장치일 수 있다. 메모리(823) 및 스토리지(828)는 다양한 형태의 휘발성 또는 비휘발성 저장 매체일 수 있다. 예를 들어, 메모리(823)는 ROM(824)이나 RAM(825)을 포함할 수 있다.In addition, the computer system 820 may further include one or more network interfaces 829 coupled to the network 830. The processor 821 may be a central processing unit or a semiconductor device that executes the processing instructions stored in the memory 823 or the storage 828. [ Memory 823 and storage 828 may be various types of volatile or non-volatile storage media. For example, the memory 823 may include a ROM 824 or a RAM 825. [

그리고, IoT 시대를 대비하여 컴퓨터 시스템(820)을 소형의 컴퓨팅 디바이스로 구현시킨 경우, 컴퓨팅 디바이스에 이더넷(Ethernet) 케이블을 연결하면 무선 공유기처럼 동작해서 모바일 디바이스가 무선으로 게이트웨이에 붙어서 암복호화 기능을 할 수 있으므로, 이를 위해 컴퓨터 시스템(820)은 무선 통신 칩(와이파이 칩)(831)을 추가로 포함할 수 있다.When the computer system 820 is implemented as a small computing device in preparation for the IoT era, when an Ethernet cable is connected to a computing device, the mobile device acts as a wireless router, and the mobile device attaches to the gateway wirelessly, The computer system 820 may additionally include a wireless communication chip (Wi-Fi chip) 831 for this purpose.

따라서, 본 발명의 실시예는 컴퓨터로 구현된 방법이나 컴퓨터에서 실행 가능한 명령어들이 기록된 비일시적인 컴퓨터에서 읽을 수 있는 매체로 구현될 수 있다. 컴퓨터에서 읽을 수 있는 명령어들이 프로세서에 의해서 수행될 때, 컴퓨터에서 읽을 수 있는 명령어들은 본 발명의 적어도 한 가지 태양에 따른 방법을 수행할 수 있다.
Thus, embodiments of the invention may be embodied in a computer-implemented method or in a non-volatile computer readable medium having recorded thereon instructions executable by the computer. When computer readable instructions are executed by a processor, the instructions readable by the computer are capable of performing the method according to at least one aspect of the present invention.

이상에서와 같이 본 발명에 따른 네트워크 어플리케이션을 위한 자가적응 기반의 시스템 리소스 최적화 장치 및 방법은 상기한 바와 같이 설명된 실시예들의 구성과 방법이 한정되게 적용될 수 있는 것이 아니라, 상기 실시예들은 다양한 변형이 이루어질 수 있도록 각 실시예들의 전부 또는 일부가 선택적으로 조합되어 구성될 수도 있다.As described above, the self-adaptation-based system resource optimization apparatus and method for a network application according to the present invention are not limited to the configuration and method of the embodiments described above, All or some of the embodiments may be selectively combined.

110, 400: 시스템 리소스 최적화 장치
120: 네트워크 기반 어플리케이션 130, 410: 네트워크 통신 스택
140: 멀티코어 프로세스 150: 네트워크 디바이스
210, 401: 어플리케이션 상태 정보 획득부
220, 402: 네트워크 모니터링부
230, 403: 리소스 제어부 310: 품질 수치 측정부
320: 리소스 조절부 420: TCP 패킷 처리 모듈
421: 큐 모니터링 모듈 422: 큐 그룹
430: TCP 패킷 필터링 모듈 440: IP 패킷 처리 모듈
500: 어플리케이션 상태 정보 510: 품질 요구사항
511: 성능 측정 단위 512: 성능 최대치
513: 성능 정상치 514: 성능 최소치
820: 컴퓨터 시스템 821: 프로세서
822: 버스 823: 메모리
824: ROM 825: RAM
826: 사용자 인터페이스 입력 장치 827: 사용자 인터페이스 출력 장치
828: 스토리지 829: 네트워크 인터페이스
830: 무선 통신 칩 831: 네트워크
110, 400: System resource optimization device
120: network-based application 130, 410: network communication stack
140: multicore process 150: network device
210, 401: application state information obtaining unit
220, and 402:
230, and 403: a resource control unit 310:
320: resource control unit 420: TCP packet processing module
421: Queue monitoring module 422: Queue group
430: TCP packet filtering module 440: IP packet processing module
500: application state information 510: quality requirement
511: Performance measurement unit 512: Maximum performance
513: Performance normal value 514: Performance minimum value
820: Computer system 821: Processor
822: bus 823: memory
824: ROM 825: RAM
826: User interface input device 827: User interface output device
828: Storage 829: Network Interface
830: Wireless communication chip 831: Network

Claims (20)

어플리케이션에 상응하는 어플리케이션 상태 정보를 획득하는 어플리케이션 상태 정보 획득부;
상기 어플리케이션의 실행을 위해 연결되는 네트워크의 전송 상태를 모니터링하는 네트워크 모니터링부; 및
상기 어플리케이션 상태 정보 및 상기 전송 상태 중 적어도 하나를 고려하여 상기 어플리케이션에 할당되는 시스템 리소스를 제어하는 리소스 제어부
를 포함하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
An application status information acquisition unit for acquiring application status information corresponding to an application;
A network monitoring unit monitoring a transmission status of a network to which the application is connected for execution; And
A resource control unit for controlling a system resource allocated to the application in consideration of at least one of the application state information and the transmission state,
Based system resource optimization apparatus.
청구항 1에 있어서,
상기 리소스 제어부는
상기 어플리케이션 상태 정보 및 상기 전송 상태 중 적어도 하나를 기반으로 상기 어플리케이션의 현재 품질 수치를 측정하는 품질 수치 측정부; 및
상기 어플리케이션에 상응하는 목표 품질 수치와 상기 현재 품질 수치의 일치 여부에 따라 상기 시스템 리소스의 할당을 조절하는 리소스 조절부를 더 포함하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method according to claim 1,
The resource control unit
A quality metric measuring unit for measuring a current quality value of the application based on at least one of the application status information and the transmission status; And
Further comprising a resource adjuster for adjusting the allocation of the system resources according to a match between the target quality value corresponding to the application and the current quality value.
청구항 2에 있어서,
상기 어플리케이션 상태 정보는
상기 어플리케이션의 정적인 정보에 해당하는 품질 요구 사항 및 상기 어플리케이션에 대해 실시간으로 수집된 동적 상태 정보 중 적어도 하나를 포함하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method of claim 2,
The application status information
And at least one of quality requirements corresponding to static information of the application and dynamic state information collected in real time for the application.
청구항 3에 있어서,
상기 동적 상태 정보는
어플리케이션 식별정보, 포트번호, 순간 데이터 사용량, 평균 데이터 사용량 및 대역폭 중 적어도 하나에 상응하는 시스템 수집 정보 및 실행 시간, 프레임 레이트(FPS, Frame Per Second) 및 화면 크기 중 적어도 하나에 상응하는 어플리케이션 측정 정보 중 적어도 하나를 포함하고, 기설정된 체크 주기마다 체크하여 갱신되는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method of claim 3,
The dynamic state information
Corresponding to at least one of system gathering information and execution time, frame rate (FPS), and screen size corresponding to at least one of application identification information, port number, instantaneous data usage, average data usage and bandwidth, , And updates the check by checking every predetermined check period.
청구항 4에 있어서,
상기 리소스 조절부는
성능 측정 단위, 성능 최대치, 성능 정상치, 성능 최소치 중 적어도 하나를 포함하는 상기 품질 요구사항을 기반으로 상기 목표 품질 수치를 계산하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method of claim 4,
The resource adjustment unit
Wherein the target quality value is calculated based on the quality requirement including at least one of a performance measurement unit, a performance maximum value, a performance normal value, and a performance minimum value.
청구항 2에 있어서,
상기 네트워크 모니터링부는
네트워크 통신 스택으로부터 큐 모니터링 상태 정보를 실시간으로 획득하고, 상기 큐 모니터링 상태 정보를 기반으로 상기 네트워크의 전송 상태를 판단하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method of claim 2,
The network monitoring unit
Wherein the queue monitoring status information is acquired from the network communication stack in real time and the transmission status of the network is determined based on the queue monitoring status information.
청구항 6에 있어서,
상기 큐 모니터링 상태 정보는
상기 어플리케이션이 설치된 단말로 수신되는 TCP 패킷이 임시로 저장되는 적어도 하나의 큐의 상태를 상기 단말에서 실행되고 있는 적어도 하나 이상의 어플리케이션 별로 모니터링 하여 생성되는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method of claim 6,
The queue monitoring status information
Wherein the state of at least one queue in which the TCP packet received at the terminal installed with the application is temporarily stored is monitored by monitoring at least one application executed in the terminal.
청구항 7에 있어서,
상기 적어도 하나의 큐는
백로그 큐(Backlog queue), 프리큐(Prequeue), 역전 큐(Out of order sequeue) 및 수신큐(Received queue) 중 적어도 하나를 포함하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method of claim 7,
The at least one queue
Wherein the scheduling information includes at least one of a backlog queue, a prequeue, an out of order sequeue, and a received queue.
청구항 3에 있어서,
상기 어플리케이션 상태 정보 획득부는
상기 어플리케이션에 상응하는 소스 코드 및 상기 어플리케이션의 성능을 외부 프로그램 및 시스템 커널 중 적어도 하나로 측정하여 생성된 외부 어플리케이션 상태 정보 중 적어도 하나를 기반으로 상기 어플리케이션 상태 정보를 획득하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method of claim 3,
The application state information obtaining unit
And acquiring the application state information based on at least one of source code corresponding to the application and external application state information generated by measuring performance of the application with at least one of an external program and a system kernel, System resource optimization device.
청구항 2에 있어서,
상기 리소스 조절부는
CPU 코어 클럭 주파수, 코어 개수, 코어 타입 및 네트워크 대역폭 중 적어도 하나에 상응하는 상기 시스템 리소스를 조절하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method of claim 2,
The resource adjustment unit
Wherein the system resource control unit adjusts the system resource corresponding to at least one of a CPU core clock frequency, a number of cores, a core type, and a network bandwidth.
청구항 10에 있어서,
상기 리소스 조절부는
상기 어플리케이션의 네트워크 포트번호로 수신된 패킷을 강제 누락시키는 강제 누락 주기를 조절하여 상기 네트워크 대역폭을 조절하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method of claim 10,
The resource adjustment unit
And adjusts the network bandwidth by adjusting a forced omission period for forcibly dropping a packet received at a network port number of the application.
청구항 2에 있어서,
상기 리소스 조절부는
상기 목표 품질 수치를 기준으로 목표 품질 범위를 설정하고, 상기 현재 품질 수치가 상기 목표 품질 범위에 상응하면 상기 목표 품질 수치와 상기 현재 품질 수치가 일치하는 것으로 판단하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 장치.
The method of claim 2,
The resource adjustment unit
Based on the target quality value, determines a target quality range based on the target quality value, and determines that the target quality value matches the current quality value when the current quality value corresponds to the target quality range. Resource optimization device.
어플리케이션에 상응하는 어플리케이션 상태 정보를 획득하는 단계;
상기 어플리케이션의 실행을 위해 연결되는 네트워크의 전송 상태를 모니터링 하는 단계; 및
상기 어플리케이션 상태 정보 및 상기 전송 상태 중 적어도 하나를 고려하여 상기 어플리케이션에 할당되는 시스템 리소스를 제어하는 단계
를 포함하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 방법.
Obtaining application state information corresponding to an application;
Monitoring a transmission state of a connected network for execution of the application; And
Controlling a system resource allocated to the application in consideration of at least one of the application state information and the transmission state
Based system resource optimization method.
청구항 13에 있어서,
상기 시스템 리소스를 제어하는 단계는
상기 어플리케이션 상태 정보 및 상기 전송 상태 중 적어도 하나를 기반으로 상기 어플리케이션의 현재 품질 수치를 측정하는 단계; 및
상기 어플리케이션에 상응하는 목표 품질 수치와 상기 현재 품질 수치의 일치 여부에 따라 상기 시스템 리소스의 할당을 조절하는 단계를 더 포함하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 방법.
14. The method of claim 13,
The step of controlling the system resource
Measuring a current quality value of the application based on at least one of the application state information and the transmission state; And
Further comprising the step of adjusting the allocation of the system resources according to whether the target quality value corresponding to the application matches the current quality value.
청구항 14에 있어서,
상기 어플리케이션 상태 정보는
상기 어플리케이션의 정적인 정보에 해당하는 품질 요구사항 및 상기 어플리케이션에 대해 실시간으로 수집된 동적 상태 정보 중 적어도 하나를 포함하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 방법.
15. The method of claim 14,
The application status information
A quality requirement corresponding to static information of the application, and dynamic condition information collected in real time for the application.
청구항 15에 있어서,
상기 상태 정보는
어플리케이션 식별정보, 포트번호, 순간 데이터 사용량, 평균 데이터 사용량 및 대역폭 중 적어도 하나에 상응하는 시스템 수집 정보 및 실행 시간, 프레임 레이트(FPS, Frame Per Second) 및 화면 크기 중 적어도 하나에 상응하는 어플리케이션 측정 정보 중 적어도 하나를 포함하고, 기설정된 체크 주기마다 체크하여 갱신되는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 방법.
16. The method of claim 15,
The state information
Corresponding to at least one of system gathering information and execution time, frame rate (FPS), and screen size corresponding to at least one of application identification information, port number, instantaneous data usage, average data usage and bandwidth, And checking and updating each of the predetermined check cycles, wherein the self-adaptation based system resource optimization method comprises:
청구항 16에 있어서,
상기 조절하는 단계는
성능 측정 단위, 성능 최대치, 성능 정상치, 성능 최소치 중 적어도 하나를 포함하는 상기 품질 요구사항을 기반으로 상기 목표 품질 수치를 계산하는 단계를 포함하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 방법.
18. The method of claim 16,
The adjusting step
Calculating the target quality value based on the quality requirement including at least one of a performance measurement unit, a performance maximum value, a performance normal value, and a performance minimum value.
청구항 14에 있어서,
상기 모니터링 하는 단계는
네트워크 통신 스택으로부터 큐 모니터링 상태 정보를 실시간으로 획득하는 단계를 포함하고,
상기 큐 모니터링 상태 정보를 기반으로 상기 네트워크의 전송 상태를 판단하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 방법.
15. The method of claim 14,
The monitoring step
Obtaining queue monitoring status information in real time from a network communication stack,
Wherein the transmission state of the network is determined based on the queue monitoring state information.
청구항 15에 있어서,
상기 획득하는 단계는
상기 어플리케이션에 상응하는 소스 코드 및 상기 어플리케이션의 성능을 외부 프로그램 및 시스템 커널 중 적어도 하나로 측정하여 생성된 외부 어플리케이션 상태 정보 중 적어도 하나를 기반으로 상기 어플리케이션 상태 정보를 획득하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 방법.
16. The method of claim 15,
The obtaining step
And acquiring the application state information based on at least one of source code corresponding to the application and external application state information generated by measuring performance of the application with at least one of an external program and a system kernel, How to optimize system resources.
청구항 14에 있어서,
상기 조절하는 단계는
CPU 코어 클럭 주파수. 코어 개수, 코어 타입 및 네트워크 대역폭 중 적어도 하나에 상응하는 상기 시스템 리소스를 조절하고, 상기 어플리케이션의 네트워크 포트번호로 수신된 패킷을 강제 누락시키는 강제 누락 주기를 조절하여 상기 네트워크 대역폭을 조절하는 것을 특징으로 하는 자가적응 기반의 시스템 리소스 최적화 방법.
15. The method of claim 14,
The adjusting step
CPU core clock frequency. Wherein the network bandwidth is adjusted by adjusting the system resource corresponding to at least one of a number of cores, a core type, and a network bandwidth, and forcibly dropping a packet received at a network port number of the application. Adaptive-based system resource optimization method.
KR1020150044066A 2015-03-30 2015-03-30 Apparatus and method for optimizing resource of system based on self-adaptive for natwork application KR102066591B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020150044066A KR102066591B1 (en) 2015-03-30 2015-03-30 Apparatus and method for optimizing resource of system based on self-adaptive for natwork application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150044066A KR102066591B1 (en) 2015-03-30 2015-03-30 Apparatus and method for optimizing resource of system based on self-adaptive for natwork application

Publications (2)

Publication Number Publication Date
KR20160116434A true KR20160116434A (en) 2016-10-10
KR102066591B1 KR102066591B1 (en) 2020-01-15

Family

ID=57146003

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150044066A KR102066591B1 (en) 2015-03-30 2015-03-30 Apparatus and method for optimizing resource of system based on self-adaptive for natwork application

Country Status (1)

Country Link
KR (1) KR102066591B1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100027473A (en) * 2008-09-02 2010-03-11 삼성전자주식회사 A method for data transmission guaranteed quality of service in a terminal equipment and an apparatus thereof
KR20110046895A (en) * 2009-10-29 2011-05-06 주식회사 케이티 Method for mapping network interface in mobile terminal having multi network interface
KR20120021242A (en) * 2010-08-30 2012-03-08 가부시키가이샤 엔티티 도코모 Method and apparatus for allocating network rates
KR20130110197A (en) * 2010-11-15 2013-10-08 블랙베리 리미티드 Managing communications across a wireless network
KR20140040798A (en) * 2011-06-22 2014-04-03 시그너스 브로드밴드, 인코포레이티드 Systems and methods for detection for prioritizing and scheduling packets in a communication network
KR20140110486A (en) 2013-03-08 2014-09-17 주식회사 알투소프트 System for Resource Management in Mobile Cloud computing and Method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100027473A (en) * 2008-09-02 2010-03-11 삼성전자주식회사 A method for data transmission guaranteed quality of service in a terminal equipment and an apparatus thereof
KR20110046895A (en) * 2009-10-29 2011-05-06 주식회사 케이티 Method for mapping network interface in mobile terminal having multi network interface
KR20120021242A (en) * 2010-08-30 2012-03-08 가부시키가이샤 엔티티 도코모 Method and apparatus for allocating network rates
KR20130110197A (en) * 2010-11-15 2013-10-08 블랙베리 리미티드 Managing communications across a wireless network
KR20140040798A (en) * 2011-06-22 2014-04-03 시그너스 브로드밴드, 인코포레이티드 Systems and methods for detection for prioritizing and scheduling packets in a communication network
KR20140110486A (en) 2013-03-08 2014-09-17 주식회사 알투소프트 System for Resource Management in Mobile Cloud computing and Method thereof

Also Published As

Publication number Publication date
KR102066591B1 (en) 2020-01-15

Similar Documents

Publication Publication Date Title
US11431637B2 (en) Network congestion control method, apparatus, and system
US10116574B2 (en) System and method for improving TCP performance in virtualized environments
KR101973590B1 (en) Network bandwidth regulation using traffic scheduling
EP4072080A1 (en) Data flow control method and device
WO2015058698A1 (en) Data forwarding
US20150089500A1 (en) System and method for improving tcp performance in virtualized environments
US8059541B2 (en) End-host based network management system
EP4024778A1 (en) Method for determining required bandwidth for data stream transmission, and devices and system
US20170070444A1 (en) System for early system resource constraint detection and recovery
WO2010122486A2 (en) Dynamic adjustment of connection setup request parameters
US8341453B2 (en) Transmission apparatus that transmits data according to a protocol, and method for measuring time in the transmission apparatus
CN111034254A (en) Method and device for reducing network delay
US20230139633A1 (en) Data Packet Sending Method and Apparatus
CN112631788B (en) Data transmission method and data transmission server
US10432530B2 (en) System and method of providing compression technique for jitter sensitive application through multiple network links
US9326161B2 (en) Application-driven control of wireless networking settings
CN111698275B (en) Data processing method, device and equipment
JP2011203810A (en) Server, computer system, and virtual computer management method
EP3694164A1 (en) Data transmission method and device, and computer storage medium
JP2020017903A (en) Communication system, communication control method, and communication device
KR102066591B1 (en) Apparatus and method for optimizing resource of system based on self-adaptive for natwork application
JP2016012801A (en) Communication apparatus, communication system, and communication apparatus control method
US20210160161A1 (en) Processing local area network diagnostic data
US20220248259A1 (en) Data processing method and apparatus
CN113098580B (en) Satellite air interface message caching and speed limiting processing method, device, equipment and medium

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant