-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
135 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
# openfreemap | ||
|
||
# TODO | ||
not deleted dedupl files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* soft nofile 1048576 | ||
* hard nofile 1048576 | ||
root soft nofile 1048576 | ||
root hard nofile 1048576 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
vm.swappiness = 1 | ||
|
||
net.core.somaxconn = 65535 | ||
|
||
fs.file-max = 100000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
local counter = 1 | ||
local lines = {} | ||
local base_path = "/planet/20231208_091355/tiles/" | ||
local file_path = "/data/ofm/benchmark/path_list_small.txt" | ||
|
||
for line in io.lines(file_path) do | ||
table.insert(lines, base_path .. line) | ||
end | ||
|
||
local function getNextUrl() | ||
-- Get the next URL from the list | ||
local url_path = lines[counter] | ||
counter = counter + 1 | ||
|
||
-- If we've gone past the end of the list, wrap around to the start | ||
if counter > #lines then | ||
counter = 1 | ||
end | ||
|
||
return url_path | ||
end | ||
|
||
request = function() | ||
-- Return the request object with the current URL path | ||
local path = getNextUrl() | ||
local headers = {} | ||
headers["Host"] = "ofm" | ||
return wrk.format('GET', path, headers, nil) | ||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mkdir -p mnt_ro | ||
sudo mount -v \ | ||
-t btrfs \ | ||
-o ro \ | ||
image.btrfs mnt_ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
server { | ||
server_name ofm tiles.openfreemaps.org; | ||
# test with | ||
# curl -H "Host: ofm" http://localhost/planet/20231208_091355/tiles/7/72/48.pbf | ||
|
||
|
||
#access_log /data/ofm/logs/nginx-access.log access_json; | ||
access_log off; | ||
error_log /data/ofm/logs/nginx-error.log; | ||
|
||
location /planet/20231208_091355 { | ||
gzip off; | ||
|
||
alias /data/ofm/runs/planet_20231208_091355/mnt_ro/extract; | ||
autoindex on; # Enables listing of directory | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from ssh_lib.config import scripts | ||
from ssh_lib.utils import apt_get_install, apt_get_update, put, put_str, sudo_cmd | ||
|
||
|
||
def k6(c): | ||
sudo_cmd( | ||
c, | ||
'curl https://dl.k6.io/key.gpg ' | ||
'| gpg --dearmor ' | ||
'| tee /usr/share/keyrings/k6-archive-keyring.gpg >/dev/null', | ||
) | ||
put_str( | ||
c, | ||
'/e' 'tc/apt/sources.list.d/k6.list', | ||
'deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main', | ||
) | ||
apt_get_update(c) | ||
apt_get_install(c, 'k6') | ||
|
||
|
||
def c1000k(c): | ||
c.run('wget https://github.com/ideawu/c1000k/archive/master.zip -O tmp.zip') | ||
c.run('unzip -o tmp.zip') | ||
c.run('rm tmp.zip') | ||
c.run('cd c1000k-master && make') | ||
|
||
# usage | ||
# ./server 7000 | ||
# ./client 127.0.0.1 7000 | ||
# make sure it runs till 1 million | ||
|
||
|
||
def benchmark(c): | ||
apt_get_install(c, 'wrk') | ||
c.sudo('mkdir -p /data/ofm/benchmark') | ||
put(c, f'{scripts}/benchmark/wrk_custom_list.lua', '/data/ofm/benchmark') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters