  Fog computing emerged as a crucial platform for the deployment of IoT
applications. The complexity of such applications requires methods that handle
the resource diversity and network structure of Fog devices while maximizing
the service placement and reducing resource wastage. Prior studies in this
domain primarily focused on optimizing specific application requirements and
fail to address the network topology combined with the different types of
resources encountered in Fog devices. To overcome these problems, we propose a
multilayer resource-aware partitioning method to minimize the resource wastage
and maximize the service placement and deadline satisfaction rates in a Fog
infrastructure with high multi-user application placement requests. Our method
represents the heterogeneous Fog resources as a multilayered network graph and
partitions them based on network topology and resource features. Afterward, it
identifies the appropriate device partitions for placing an application
according to its requirements, which need to overlap in the same network
topology partition. Simulation results show that our multilayer resource-aware
partitioning method is able to place twice as many services, satisfy deadlines
for three times as many application requests, and reduce the resource wastage
by up to 15-32 times compared to two availability-aware and resource-aware
methods.
