<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">On Several Social Network Analysis Problems</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">©</forename><surname>George</surname></persName>
						</author>
						<author>
							<persName><forename type="first">Vsevolod</forename><surname>Sevostyanov</surname></persName>
						</author>
						<author>
							<persName><forename type="first">Kirill</forename><surname>Smirnov</surname></persName>
						</author>
						<author role="corresp">
							<persName><forename type="first">Ilya</forename><surname>Shkuratov</surname></persName>
							<email>shkuratov.ilya@gmail.com</email>
						</author>
						<author>
							<affiliation key="aff0">
								<orgName type="institution">Saint-Petersburg University</orgName>
								<address>
									<country key="RU">Russia</country>
								</address>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff1">
								<orgName type="institution">Saint-Petersburg University</orgName>
								<address>
									<country key="RU">Russia</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">On Several Social Network Analysis Problems</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">0F00688C9A8A74C18D8D95AD627D55D0</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-25T05:40+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>In this paper we describe our approach to several problems offered at the ACM SIGMOD Programming Contest 2014. These problems belong to the area of a social network analysis and involve several types of queries to a social graph. The considered graph is modeled by the standard SNB benchmark. We briefly introduce this benchmark, the contest and the problems. Next, we describe our contribution, which is the following: the algorithms for evaluation of these queries and their efficient implementation. Furthermore, we present parallelization techniques for these algorithms and describe overall architecture of our solution.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction and Related Work</head><p>In this paper we study several problems offered at the ACM SIGMOD Programming Contest 2014 <ref type="bibr" target="#b0">[1]</ref>, a yearly programming contest focused on a data management topics.</p><p>This contest has a number of features, which distinguish it from a well-known ICPC series:</p><p>• Participants are offered some science-intensive task, which is usually an unsolved problem of current importance.</p><p>• The contest runs for several months and no on-site participation is required.</p><p>• Topic specificity -the clear data management focus is present. For example, contests of previous years involved construction of distributed query processing engine (2010), multidimensional index (2012) or document stream filtering system (2013).</p><p>Proceedings of the 16th All-Russian Conference "Digital Libraries: Advanced Methods and Technologies, Digital Collections" -RCDL-2014, Dubna, Russia, October 13-16, 2014.</p><p>• The participation is allowed to both graduate and undergraduate students, without any restriction on a number of attempts.</p><p>While this contest is not so well known as the ICPC, it is nevertheless popular. For example, last year there were more than 100 registered teams. The contest is relatively young -it runs for 6 th time this year.</p><p>In this paper we also describe the contest: the rules, the task, its timeline and required qualifications. Moreover, we present our experiences and provide a solution of the team "GenericPeople" (Ilya Shkuratov and Vsevolod Sevostyanov), which was ranked <ref type="foot" target="#foot_0">1</ref> 17 out of 33 teams on the preliminary (public) tests. While our approach is not the best, it still has merit:</p><p>• our solution can serve as an example demonstrating the required qualifications and which may help to assess the required effort and work intensity. These factors may be of interest for a person who is thinking about the participation;</p><p>• the solution successfully passed through all available tests (datasets of three different sizes) within the time limits specified by the contest organizers (5 and 10 minutes);</p><p>• the proposed algorithms passed all correctness tests;</p><p>• parallelization techniques of these algorithms may be of interest;</p><p>• the number reported in the leaderboard is the sum over all query types, at the present time we can say nothing regarding their individual performance;</p><p>• at last, the number was reported for three datasets; the proposed algorithms may behave differently (better or worse) on another dataset.</p><p>Thus, we deem current study as worthy to be presented and of some interest for the reader. Another motivation for this paper is the concise presentation of the solution for the contest problem, which is usually lacking. After the contest all what is left are the posters of the top five performing teams without detailed explanation (it is given orally at the conference). Also, these posters are (or at least were in the past years) not going into the conference proceedings and are kept on a website, which may disappear. Moreover, we present our experiences and describe (at least partially) the way we went through in order to produce a working solution. It is impossible to pass on all these aspects via poster.</p><p>This year contest was dedicated to a social network analysis topic. Social network is essentially a graph, whose vertices represent users and edges denote relations between them. An example of such relation may be "know each other", "follow" and so on. Additionally extra information like a place of work or study, geographical information, various tags, images, likes etc. is known.</p><p>In the past years massive amounts of such information were made available for analysis, forming a strong incentive for both academy and industry to come with means for its efficient storage and processing. Social data play a significant role in the whole "Big Data" movement.</p><p>A lot of analysis tools employ the MapReduce <ref type="bibr" target="#b5">[6]</ref> programming model. Industrial examples of such systems are PIG (Yahoo) <ref type="bibr" target="#b12">[13]</ref>, SCOPE (Microsoft) <ref type="bibr" target="#b3">[4]</ref>, Hive (Facebook) <ref type="bibr" target="#b17">[19]</ref>, Dremel (Google) <ref type="bibr" target="#b13">[14]</ref>. Academic examples are Starfish <ref type="bibr" target="#b8">[9]</ref>, HadoopDB <ref type="bibr" target="#b2">[3]</ref> and many others<ref type="foot" target="#foot_1">2</ref> . An alternative (which can be considered a poor man's solution) sometimes employed in production environment, is to use scripts written in scripting language like Python to commence the analysis. A data scientist has to analyze the problem and implement all necessary algorithms manually. While it may not favor the rapid development, it may allow to achieve a more efficient processing. Naturally, this approach is more flexible than using a standard tool and allows a fine-tuning of algorithms. However, it requires extensive technical expertise: knowledge of algorithms and data structures, the understanding of the data processing and so on. The tasks of the contest are representative examples of this "manual" approach and can be considered as a training for a data scientist.</p><p>Another aspect of the contest task is the graph analysis component. Graph analysis is a mature area of research which studies the efficient storage and processing of graph data. There are several graph database management systems (a special type of DBMS) and graph programming frameworks. These DBMS feature special query languages, query processing algorithms and data storage.</p><p>Some examples of the graph DBMS are Neo4j <ref type="bibr" target="#b11">[12]</ref>, InfiniteGraph <ref type="bibr" target="#b9">[10]</ref> and the framework examples are Apache Giraph <ref type="bibr" target="#b1">[2]</ref>, Signal/Collect <ref type="bibr" target="#b15">[17]</ref>. It is necessary to mention that two latter systems also follow the MapReduce model.</p><p>The contestants were given the task which consists of the datasets and four types of queries. The social graph was generated using the SNB [16] tool.</p><p>The goal was to develop a program which computes the results as fast as possible. The contestants had not only to devise the algorithms for efficient query processing on a large graph, but also to parallelize them. This is a must, given the fact that the evaluation of the resulting implementation was performed on a server-class equipment (8 cores).</p><p>Another important aspect was the order of computation for each sub-query. The contestants had to bear in mind the size of intermediate results and the memory bound. In other words, the contestants had to perform the work of a query optimizer: gather needed statistics, assess selectivities and develop an optimal processing strategy for each query type. Also, given the hardware multi-core capability, efficient inter-query type orders are also of interest.</p><p>The contribution of this paper is the following:</p><p>• The description of the ACM SIGMOD Programming Contest 2014 and its task;</p><p>• The contest from the participant's point of view: our experiences;</p><p>• The algorithms to handle the problems offered at the contest;</p><p>• A parallelization techniques for each of these algorithms;</p><p>• A general system architecture: subquery computation orders, inter-query type orders and chunkbased data loading. Now, we are going to describe our experience. The SNB description and its data schema is presented in the appendix section. Detailed description of our approach and data statistics can be found in the report <ref type="bibr" target="#b4">[5]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Contest description and experiences</head><p>Let's describe this year contest from the participants' point of view. We have already briefly described the contest and its specifics in the introduction section. You can find detailed information regarding the ACM SIGMOD Programming Contest series in the reference <ref type="bibr" target="#b16">[18]</ref>.</p><p>Our research group is a frequent participant of this contest; we had achieved good results twice in the past: in the 2010 <ref type="foot" target="#foot_2">3</ref> (team "spbu") and 2013 <ref type="foot" target="#foot_3">4</ref> (team "Rota Fortunae") year. Both times our teams achieved 3 rd place in the final ranking.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">General information</head><p>This year contest followed the general scheme described in the reference <ref type="bibr" target="#b16">[18]</ref>. However, there were several notable divergences:</p><p>1. The contest started noticeable later compared to previous years;</p><p>2. There were no 2 nd round, unlike early years. This change happened in 2013;</p><p>3. The absence of the dedicated correctness testing phase during the evaluation (it was performed concurrently with the performance evaluation);</p><p>4. There was a series of datasets which were progressively disclosed by the organizers, as the performance of the submissions improved;</p><p>5. The task did not explicitly required parallelization or concurrency support, but instead, implied it. It was possible to submit purely sequential implementation;</p><p>6. It was possible to submit only the executable, without source code during the preliminary evaluation.</p><p>The final evaluation required source code and this led to some compatibility difficulties;</p><p>7. Contestants were allowed to choose programming languages other than C++.</p><p>The provided task was a science-oriented problem related to social network analysis. The problem was to execute a number of queries to a graph representing some social network. The goal was to produce a correct answer and minimize the overall processing time. The graph and queries are fully described in the next section.</p><p>Below you can see the timeline of the contest.</p><p>• January 25, 2014 -Contest announced.</p><p>• February 1, 2014 -Detailed specification of the requirements and test data available.</p><p>• February 16, 2014 -A medium data set (10k people) with query workload and answers are available on the Task page. New query workload and answers for the small data set (1k people) are available on the Task page.</p><p>• March 1, 2014 -Team registration begins. Leaderboard available.</p><p>• March 11, 2014 -Workloads on a medium data set (10k people) have been added to the evaluation system.</p><p>• March 17, 2014 -Workloads on a large data set (100k people) have been added to the evaluation system.</p><p>• April 15, 2014 -Final submission deadline.</p><p>• May 15, 2014 -Finalists announcement.</p><p>• June 22-27, 2014 -Conference: announcement of the winner and the poster presentations.</p><p>In the overall the contest run for two and a half months. Also you can see that several datasets were progressively added to the evaluation pool. These datasets were progressively disclosed by the organizers as the performance of submissions improved. This is a rather new model of evaluation (appeared in 2013 contest) and it was employed in the following way. As soon as the several submissions were achieving some performance level, where it was hard to discern their quality due to inaccurate measurements (thread scheduling effects, for example), a new, larger dataset was added.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Communication with the contest organizers</head><p>Information about the order and rules of the contest were provided on a special web page <ref type="bibr" target="#b0">[1]</ref>, which was the main mean of communication between the organizers and the contestants. It also describes test data sets, the task and an evaluation environment. Later opportunities to register a team and submit solutions were added.</p><p>The organizers also created a Google Group in order to discuss any technical issues (e.g. code page problems) and to provide additional information that might be of interest to all of the contestants: test data-sets publication dates, disk space availability, size of data set for the final evaluation and so on.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Required skills and our experiences</head><p>Since the organizers of the contest considers Linux as its target platform, we decided to use C++ programming language as it looks to us an highly-optimizable one. Those who want to take part in the contest are advised to learn Linux development utilities such as gcc, make, valgrind (especially callgrind might be useful), gdb, etc. Also two bash scripts were required: one should build the solution and the other -run it with certain parameters.</p><p>You also may encounter restriction on size of submitted solution. It was 8 MB this year, thereby it was helpful for us to learn a couple of gcc flags. The first one is -s. It removes unneeded symbols from an executable, thus reducing its size without the loss of performance. The second flag may be useful, if you use external libraries: -MM instructs the compiler to generate source files dependencies. This helped us to familiarize with boost headers dependencies, strip boost from unneeded header files and further reduce submitted archive size.</p><p>Understanding compiler optimization methods may be of use as well. It allowed us to cope with the gcc optimizer bug, namely incorrect copy propagation after global common subexpression elimination pass. It leads to usage of the original pointer to the buffer instead of its copy, which cause segmentation fault on an attempt to free this buffer. The workaround is to add a dummy use of the original pointer after working with the buffer.</p><p>Another important skill is an ability to find necessary information on the subjects of the competition, i.e. the ability to work with digital libraries. Usually the task of the competition (or one of the tasks) is an unsolved scientific problem. Thus one may find useful information about methods have been tried or perspective approaches. These gave us several hints for the given task.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.4">Tools</head><p>Aside from the usual requirements this year contest posed an additional one: knowledge of some scripting language or a tool for data analysis. This language can be used for data mining: to detect hidden dependencies in the source data and to collect necessary statistics. We used Python programming language; other examples include R and Octave tools.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.5">Data</head><p>The schema for the data used in the task formulation is presented on Figure <ref type="figure">3</ref>. Data were stored as a set of CSV files. It is worthy to mention that not all of the files were needed for the query processing. Also, organizers had provided data only for two datasets -the one containing thousand and the one containing ten thousand of persons. These datasets are sufficient for the debug purposes, but they are not enough to tune algorithms for the final evaluation, which involved a graph of million of persons. The benchmark generation parameters were kept in secret and it was impossible to generate that graph by ourselves.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Problems</head><p>The contest offered <ref type="bibr" target="#b0">[1]</ref> the following problems (we fully provide them here for the better understanding of the reader and in case of the original website outage):</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Query Type 1 (Shortest Distance Over Frequent Communication Paths).</head><p>Given two integer person ids p1 and p2, and another integer x, find the minimum number of hops between p1 and p2 in the graph induced by persons who:</p><p>( Here, the closeness centrality of a person p is:</p><formula xml:id="formula_0">(r(p) − 1) • (r(p) − 1) (n − 1) • s(p) ,</formula><p>where r(p) is the number of vertices reachable from p (inclusive), s(p) is the sum of geodesic distances to all other reachable persons from p, and n is the number of vertices in the induced graph. When either multiplicand of the divisor is 0, the centrality is 0.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Algorithms</head><p>In this section we describe algorithms for the tasks of the contest. Due to the space constraints they are presented in a brief, a detailed version featuring algorithm listings can be found in the report <ref type="bibr" target="#b4">[5]</ref>.</p><p>In the rest of this paper we refer to the graph induced by "know each other" relation as graph, and to the breadthfirst search of that graph as BFS. This graph is used in every query type and BFS (as we show further) plays the key role in all of them. Thus, a shorthand notation would be useful.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Query Type 1 (Shortest Distance Over Frequent</head><p>Communication Paths)</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1.1">Algorithm description</head><p>An obvious strategy for evaluation of such query would be the following:</p><p>1. Run BFS from person p1 to person p2 and return hops count;</p><p>2. During the BFS traversal one needs to check the replies condition. For each edge, considered on a given BFS step, one has to calculate the number of mutual replies for the corresponding persons. If it is less than k, then the transition is not possiblethe edge does not exist.</p><p>This "naive" approach needs no preparation and can be ran just after the graph construction. For each pair of adjacent persons it is necessary to calculate the number of replies and this may take some time. Thus, the described BFS has the complexity O(m</p><formula xml:id="formula_1">• n • (|V | + |E|))</formula><p>where n denotes a cardinality of "comment is reply of comment" relation and m -cardinality of "comment has creator person".</p><p>Therefore, we propose a pretreatment phase that will compute number of replies once, which effectively eliminates the repeated calculations. Our goal is to find persons that made not less than k comments replying to each other. For each pair of persons connected by an edge e in the graph we will determine the number of mutual replies k e and attribute it to e. In this way, BFS on each step compares two numbers: given k and pre-calculated k e .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Query Type 2 (Interests with Large Communities)</head><p>In order to reduce the overhead related to connected component size estimation one needs to take into account restrictions which are specified by the query. To tackle the first restriction (the common tag requirement) we built a "tag-person" index. It allows to search persons which are interested in a given tag. We employ the resulting list during the node traversal. It allows us to avoid visiting nodes (persons) which are not interested in a given tag. Also we avoid expenses related to probing person interest list for a given tag.</p><p>The second restriction which we have to take into account -the birthdate restriction. This restriction can be tackled by projecting our graph to a given time interval. By doing so, we avoid excessive comparisons related to birthdate which take place during the query processing. In this case the comparisons are moved to the preprocessing phase, thus providing us no benefit. However, this approach may be beneficial, if used differently. The idea is to produce a decomposition of the whole time interval into disjoint several time slices. During the query processing we can use the projection corresponding to an interval d, specified by the query. These projections are constructed during the preprocessing phase. Thus, we can avoid some excessive comparisons during the query processing phase.</p><p>Thereby, the estimation of the connected component size for a single tag is essentially a BFS, performed on a graph whose time slice conforms to the date specified by the query. This algorithm can be easily parallelized. For example, one can divide tag set between threads equally and then construct a final result by joining results for the individual tags.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Query Type 3 (Socialization Suggestion)</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3.1">Algorithm description.</head><p>The common sense may provide the following idea of the straightforward evaluation:</p><p>1. for each vertex v in the graph perform BFS while keeping in mind the given hops count h;</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">upon completion BFS returns the list of reached people rp;</head><p>3. for v and each person v r from rp check information about their work places, study places and location for correlation with p;</p><p>4. if one of the places where both v and v r are involved is p or its subplace, then calculate the number of common interests ci;</p><p>5. store (sorted by ci) the resulting pairs (v, v r );</p><p>6. return the top-k pairs as a result.</p><p>This algorithm requires examination of all the persons returned by BFS. Since graph is a social its edge count follows power law, therefore there are some hubs and connectors with large degree and many vertices with only a few incident edges <ref type="bibr" target="#b10">[11]</ref>. Hubs and connectors shorten the paths between persons and thus, the size of rp may be significant. The time complexity of this algorithm is</p><formula xml:id="formula_2">O(|V | • (|V | + |E| + |rp| • |person.places| + |person.interests|)).</formula><p>It is desirable to reduce the number of persons to examine without the loss of result correctness. In order to do that we suggest to group persons by some of place types. SNB provides three place types: city, country and continent. The type country seems to be a good choice (see <ref type="bibr" target="#b4">[5]</ref> for the explanation).</p><p>Using the proposed partitioning we suggest a following improvement: use the type of p to determine which country c to process and then perform BFS for each person v from c bearing in mind the given hops count h. That way only persons from c are stored in rp, which reduces its size and allows us to reach our goal.</p><p>Described approach time complexity is</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>O(|persons in p|•(|V |+|E|+|rp|•|person.interests|)).</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4">Query Type 4 (Most Central People)</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4.1">The calculation of closeness centrality metric</head><p>First of all, we should note, that our graph is an undirected graph, therefore r(p) can be calculated once for each connected component. Thus, the problem is how to compute s(p). An algorithm selection. Given the fact that our graphs is an undirected one and the edges are of unit weights, a simple BFS modification would suffice for the evaluation of s(p). For this purpose we can label each visited vertex with the distance to the initial one. In this approach we do not increase asymptotic complexity of BFS and do not use additional memory. We would require O(|V | + |E|) time and O(|V | + |E|) memory. This estimation is better than estimation for many classical algorithms oriented for general cases of problem "minimal distance from one vertex to all other". For example, Dijkstra algorithm <ref type="bibr" target="#b6">[7]</ref> for graphs with non-negative weights, based on Fibonacci heap <ref type="bibr" target="#b7">[8]</ref> uses</p><formula xml:id="formula_3">O(|V | + |E|) memory and O(|V | • log |V | + |E|) time.</formula><p>Moreover, our approach is easily parallelizable: we can compute s(p) in parallel for different vertices.</p><p>The cut-off heuristic. One can note that closeness centrality is inversely proportional to s(p) within a connected component. Thus, we can propose a criterion for a vertex to enter the top-k of a given connected component which uses it's s(p). Let's define a threshold:</p><formula xml:id="formula_4">Θ = max s(p) p ∈ current_top_k</formula><p>. Now, we can interrupt the computation of s(p), if the current value had exceeded the threshold Θ.</p><p>Despite the simplicity of this cut-off heuristics it drastically decreased the evaluation time for the fourth query type. Unfortunately, we do not know the number and parameters of queries of this type during the final evaluation. But the implementation of this heuristic allowed to decrease the evaluation time for more than 380 seconds on a graph containing 100 thousand persons. The resulting time was 220 seconds.</p><p>We also construct a special index structure for this type of query. More details can be found in the report <ref type="bibr" target="#b4">[5]</ref>.</p><p>Other approaches. In the last few days of the contest we found the solution that fits almost perfectly into the described problem <ref type="bibr" target="#b14">[15]</ref>. It is developed for directed graphs with non-negative weights and reuses the CCV of a single vertex in order to estimate CCV for other vertices and reduce the further computations. Authors also use estimates in order to produce the cut-off of vertices which not to get into top-k. That method could be modified to take into account the memory restrictions. The experiments described by authors show that this approach may be particularly efficient for unweighted, undirected graph of a large size. It can reduce the amount of computations for a majority of vertices or even avoid their processing at all.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">System architecture</head><p>Graph structure. Considering the graph structure we bear in mind the following: (i) the cardinality of vertices may run up to a million, (ii) BFS is crucial for the evaluation of every query type. Therefore, our approach must have low memory footprint and provide efficient BFS evaluation. In order to satisfy these requirements we use representation similar to adjacency lists, but with arrays instead, that is, each vertex contains a pointer to an array of adjacent vertices. It allows us to meet the memory constrains and avoid unnecessary comparisons in the BFS implementation.</p><p>Layers.Three layers may be distinguished in our implementation: (i) file loading, (ii) structure initialization and preparation, (iii) query evaluation.</p><p>This layered structure is rather natural to the task and allows some flexibility in the setting up the order of query evaluation. That is a rather important feature for the performance improvement. The use of the first layer is to provide the interface to chunk-based file loading. It copes with the problem of big files which can be up several gigabytes in size. The use of the second layer is to parse loaded files and to build indexes and other structures required for the query evaluation. The last layer is responsible for the final results formation.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Experiments</head><p>In this paper we present some experiments illustrating the performance of our approach. Unfortunately, we could not provide detailed experimental data from the contest due to several reasons: (i) we do not have access to the final benchmarks (they are not yet released to public); (ii) we no more have access to the hardware used for the evaluation by the organizers (it was a server-class one); (iii) the two largest benchmarking query sets are unavailable too (we used the largest available dataset -the medium dataset, containing 10k persons).</p><p>Thus, we had to perform experiments on our own. The hardware and software setup was the following: i7-4930K CPU (6 cores), P9 X79WS motherboard, 4GB RAM; Ubuntu 14.04, kernel 3.13.0-24, x86_64.</p><p>The first series of experiments is presented on Figure <ref type="figure">1</ref>. They illustrate the basic approach when we sequentially evaluate queries of the same type. The results show the contribution of each query type to the overall processing time. In this series we vary the number of threads. Eventually we get a U-shaped graph, which shows that it's not useful to employ more than four threads for the processing in this scenario. It is the result of the algorithm parallelization imperfection (not all algorithms use all cores all the time) and of the synchronization overheads. This leads us to the idea of pre-treatment phase which will allow us to balance the load. The load balancing will be done by grouping tasks together into stages and reordering of query types.</p><p>To examine our idea, we had split the query evaluation into the following stages (the stages are described in the <ref type="bibr" target="#b4">[5]</ref>): (i) Q3 evaluation and Q1 preparation part 1, (ii) Q1 preparation part 2, Q2 preparation and Q4 preparation, (iii) Q1 evaluation, (iv) Q2 evaluation, (v) Q4 evaluation. Tasks belonging to one stage are executed in parallel. Figure <ref type="figure">2</ref> shows the results for this kind of processing. Despite that in fact we used our idea in the first two stages only, the performance boost of the evaluation with six threads is about 28% (compared to the best performance from Figure <ref type="figure">1</ref>) and 56% comparing the performance with the six threads. This may be considered a good result for the medium dataset, which we use for testing. Efficiency of such task grouping is determined by the "closeness" of the tasks executed in parallel in terms of time. The closer times of execution, the more efficiently we use the processor. We can perform the load balancing in two ways: by varying the number of threads for one task and by varying the number of tasks. Hence we can use this approach to tune performance further. However, effects of the load balancing may vary with the dataset. Taking such variation into account is rather difficult and requires a more detailed study of the data structures and the algorithms involved.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7">Conclusions</head><p>In this paper we described the ACM SIGMOD Contest 2014, its tasks, timeline and our experiences. Also we presented our approach to the offered problems and described the advantages over the naive processing. We discussed algorithms as well as parallelization techniques and presented the general system architecture. Its key points are the following: query type intermixing, query type reordering, continuous query processing and block file loading techniques. The dataset generator provided four types of graph workloads: small (1k vertices), medium (10k vertices), large (100k vertices) and huge (1M vertices). The last one would be used for the final evaluation by the contest organizers.</p><p>Unfortunately, only the first two datasets were fully released to the public. The third one was discussed in the mailing list, where some of the generator parameters for this dataset were disclosed. However, no queries are known. In this paper we use the largest available (on the current date) dataset -the medium one for the experimental evaluation. All of the queries are known at the start of the processing, contestants are not required to process them in a specific order.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 :Figure 2 :Figure 3 :</head><label>123</label><figDesc>Figure 1: Performance scalability (without pre-treatment phase).</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0"><head></head><label></label><figDesc></figDesc><graphic coords="9,62.93,53.25,470.60,396.15" type="bitmap" /></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">http://www.cs.albany.edu/~sigmod14contest/leaders. html, last accessed 02/05/2014.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1">A list can be found in http://dl.acm.org/citation.cfm?id= 1454166, last accessed 22/07/2014.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2">http://dbweb.enst.fr/events/sigmod10contest/ results/#winner, last accessed 22/07/2014.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_3">http://sigmod.kaust.edu.sa/finalists.html, last accessed 22/07/2014.</note>
		</body>
		<back>
			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8">Appendix: SNB Description</head><p>Let's briefly survey the SNB benchmark which was used during the contest and in the experimental section of this paper.</p><p>The purpose. In order to provide efficient evaluation for a variety of algorithms, tools, frameworks for social network data management tasks, a standard benchmark, called Social Network Benchmark (SNB) [16] was developed. This benchmark allows not only efficient, but also a repeatable evaluation for a variety of scenarios: online transactions, business intelligence and graph analytics. Authors of the benchmark tried to make it as realistic as possible.</p><p>Covered systems. This benchmark covers several types of systems: graph DBMS and graph programming frameworks, RDF database systems, relational and NoSQL database systems.</p><p>Data schema. The general data schema of the benchmark is presented on Figure <ref type="figure">3</ref> (illustration taken from [16]). It is called Social Intelligence Benchmark Data Schema. The schema uses UML notation to describe entities, attributes and their relationships of different cardinalities. The schema defines the result of the benchmark's data generator. Essentially it is a set of tables linked via primaryforeign key relationships.</p><p>The schema defines some social network and its most characteristic features:</p><p>1. users and their personal details, tags and likes; 2. relations between users (follows and knows); 3. textual content: posts and comment trees.</p><p>Generator and its output: technical details. This benchmark is essentially a synthetic data generator, which is implemented using MapReduce programming model. The generator is dictionary-based and is capable of generating correlated values. The result of the generator is the set CSV files, where each file contains records of the corresponding table.</p><p>The benchmark and the contest. The organizers of the contest used only the dataset generator, but not</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<monogr>
		<ptr target="http://www.cs.albany.edu/~sigmod14con-test.Accessed23/" />
		<title level="m">ACM SIGMOD 2014 Programming Contest web</title>
				<imprint>
			<date>05/14</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<ptr target="https://giraph.apache.org/.Accessed23/" />
		<title level="m">Apache Giraph website</title>
				<imprint>
			<date type="published" when="2014-05">05/2014</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">HadoopDB: an architectural hybrid of MapReduce and DBMS technologies for analytical workloads</title>
		<author>
			<persName><forename type="first">Azza</forename><surname>Abouzeid</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Kamil</forename><surname>Bajda-Pawlikowski</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Daniel</forename><surname>Abadi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Avi</forename><surname>Silberschatz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Alexander</forename><surname>Rasin</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Proc. VLDB Endow</title>
		<imprint>
			<biblScope unit="volume">2</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="922" to="933" />
			<date type="published" when="2009-08">2009. August 2009</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">SCOPE: easy and efficient parallel processing of massive data sets</title>
		<author>
			<persName><forename type="first">Ronnie</forename><surname>Chaiken</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Bob</forename><surname>Jenkins</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Per-Åke</forename><surname>Larson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Bill</forename><surname>Ramsey</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Darren</forename><surname>Shakib</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Simon</forename><surname>Weaver</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Jingren</forename><surname>Zhou</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Proc. VLDB Endow</title>
		<imprint>
			<biblScope unit="volume">1</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="1265" to="1276" />
			<date type="published" when="2008-08">2008. August 2008</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<ptr target="http://www.math.spbu.ru/user/chernishev/papers/sigmod2014contest-report.pdf" />
		<title level="m">On Several Social Network Analysis Problems: a Report</title>
				<editor>
			<persName><forename type="first">George</forename><surname>Chernishev</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">Vsevolod</forename><surname>Sevostyanov</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">Kirill</forename><surname>Smirnov</surname></persName>
		</editor>
		<imprint/>
	</monogr>
	<note>Ilya Shkuratov</note>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">MapReduce: simplified data processing on large clusters</title>
		<author>
			<persName><forename type="first">Jeffrey</forename><surname>Dean</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Sanjay</forename><surname>Ghemawat</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Commun. ACM</title>
		<imprint>
			<biblScope unit="volume">51</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="107" to="113" />
			<date type="published" when="2008">2008</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">A Note on Two Problems in Connexion with Graphs</title>
		<author>
			<persName><forename type="first">E</forename><surname>Dijkstra</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Numerische mathematik</title>
		<imprint>
			<biblScope unit="volume">1</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="269" to="271" />
			<date type="published" when="1959">1959</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Fibonacci Heaps And Their Uses In Improved Network Optimization Algorithms</title>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">L</forename><surname>Fredman</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">E</forename><surname>Tarjan</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 25th Annual Symposium on Foundations of Computer Science</title>
				<meeting>the 25th Annual Symposium on Foundations of Computer Science<address><addrLine>Washington, DC, USA</addrLine></address></meeting>
		<imprint>
			<publisher>IEEE Computer Society</publisher>
			<date type="published" when="1984">1984. 1984</date>
			<biblScope unit="page" from="338" to="346" />
		</imprint>
	</monogr>
	<note>SFCS &apos;84</note>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Starfish: A Self-tuning System for Big Data Analytics</title>
		<author>
			<persName><forename type="first">H</forename><surname>Herodotou</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Lim</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Luo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Borisov</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Dong</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Cetin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Babu</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of 5th Conf. on Innovative Data Systems Research (CIDR)</title>
				<meeting>of 5th Conf. on Innovative Data Systems Research (CIDR)</meeting>
		<imprint>
			<date type="published" when="2011">2011</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<monogr>
		<ptr target="http://www.objectivity.com/wp-content/uploads/Objectivity_WP_IG_Distr_Benchmark.pdf" />
		<title level="m">InfiniteGraph: The Distributed Graph Database</title>
				<imprint>
			<date type="published" when="2014-05-23">23/05/2014</date>
		</imprint>
	</monogr>
	<note>Whitepaper</note>
</biblStruct>

<biblStruct xml:id="b10">
	<monogr>
		<ptr target="https://github.com/ldbc/ldbc_socialnet_bm/wiki/Data-Generation#graph-generation.Accessed23/" />
		<title level="m">LDBC SocialNet Benchmark: Data Generation</title>
				<imprint>
			<date type="published" when="2014-05">05/2014</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<monogr>
		<ptr target="http://dist.neo4j.org/neo-technology-introduction.pdf" />
		<title level="m">The Neo Database -A Technology Introduction</title>
				<imprint>
			<date type="published" when="2014">20061123. 23/05/2014</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">Pig latin: a not-so-foreign language for data processing</title>
		<author>
			<persName><forename type="first">Christopher</forename><surname>Olston</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Benjamin</forename><surname>Reed</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Utkarsh</forename><surname>Srivastava</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Ravi</forename><surname>Kumar</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Andrew</forename><surname>Tomkins</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 2008 ACM SIG-MOD international conference on Management of data (SIGMOD &apos;08)</title>
				<meeting>the 2008 ACM SIG-MOD international conference on Management of data (SIGMOD &apos;08)<address><addrLine>New York, NY, USA</addrLine></address></meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="1099">2008. 1099</date>
			<biblScope unit="page">1110</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">Dremel: interactive analysis of web-scale datasets</title>
		<author>
			<persName><forename type="first">Sergey</forename><surname>Melnik</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Andrey</forename><surname>Gubarev</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Jing</forename><surname>Jing</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Geoffrey</forename><surname>Long</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Shiva</forename><surname>Romer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Matt</forename><surname>Shivakumar</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Theo</forename><surname>Tolton</surname></persName>
		</author>
		<author>
			<persName><surname>Vassilakis</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. VLDB Endow</title>
				<meeting>VLDB Endow</meeting>
		<imprint>
			<date type="published" when="2010-09">2010. September 2010</date>
			<biblScope unit="volume">3</biblScope>
			<biblScope unit="page" from="330" to="339" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<monogr>
		<author>
			<persName><forename type="first">Paul</forename><forename type="middle">W</forename><surname>Olsen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Alan</forename><forename type="middle">G</forename><surname>Labouseur</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Jeong-Hyon</forename><surname>Hwang</surname></persName>
		</author>
		<ptr target="http://www.ldbc.eu:8090/download/attachments/4325436/LDBC_SNB_Report_Nov2013.pdf" />
		<title level="m">Efficient Top-k Closeness Centrality</title>
				<imprint>
			<date>23/05/14</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<monogr>
		<title level="m">Signal/Collect Documentation</title>
				<imprint/>
	</monogr>
	<note>website</note>
</biblStruct>

<biblStruct xml:id="b16">
	<monogr>
		<ptr target="http://ipo.spb.ru/journal/index.php?article/1541/(inRussian" />
		<title level="m">ACM SIGMOD Programming Contest: an opportunity to study distinguished aspects of database systems and software engineer</title>
				<editor>
			<persName><forename type="first">K</forename><surname>Kirill</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">Georgiy</forename><forename type="middle">A</forename><surname>Smirnov</surname></persName>
		</editor>
		<editor>
			<persName><surname>Chernishev</surname></persName>
		</editor>
		<imprint>
			<date type="published" when="2012">2012. 2012</date>
			<biblScope unit="volume">6</biblScope>
			<biblScope unit="page" from="22" to="25" />
		</imprint>
	</monogr>
	<note>Компьютерные инструменты в образовании</note>
</biblStruct>

<biblStruct xml:id="b17">
	<analytic>
		<title level="a" type="main">Hive: a warehousing solution over a map-reduce framework</title>
		<author>
			<persName><forename type="first">Ashish</forename><surname>Thusoo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Sen</forename><surname>Joydeep</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Namit</forename><surname>Sarma</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Zheng</forename><surname>Jain</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Prasad</forename><surname>Shao</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Suresh</forename><surname>Chakka</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Hao</forename><surname>Anthony</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Pete</forename><surname>Liu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Raghotham</forename><surname>Wyckoff</surname></persName>
		</author>
		<author>
			<persName><surname>Murthy</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Proc. VLDB Endow</title>
		<imprint>
			<biblScope unit="volume">2</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="1626" to="1629" />
			<date type="published" when="2009-08">2009. August 2009</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
