{"id":114563,"date":"2024-03-25T18:26:02","date_gmt":"2024-03-25T16:26:02","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov"},"modified":"2024-03-25T18:26:02","modified_gmt":"2024-03-25T16:26:02","slug":"eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov","status":"publish","type":"post","link":"https:\/\/prohoster.info\/it\/blog\/news\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov","title":{"rendered":"Esperimento con l'uso di SQLite come contenitore per l'archiviazione di file","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Il progetto Pack ha tentato di creare un formato per l'archiviazione di file basato sulla libreria SQLite e sull'algoritmo di compressione ZSTD (Zstandard). Il prototipo preparato, scritto in linguaggio Pascal e distribuito sotto licenza Apache 2.0, ha superato nella velocit\u00e0 di creazione degli archivi i pi\u00f9 comuni strumenti di archiviazione, dato che il suo funzionamento si limitava alla lettura dei dati, alla compressione tramite la libreria libzstd e all'esecuzione di operazioni SQL per aggiungere i dati compressi al file del database SQLite.      <\/p>\n<p>Durante la compressione di una cartella con 81.000 file, per un totale di 1,25 GB, Pack si \u00e8 rivelato pi\u00f9 veloce dell'utility ZIP di 112 volte, completando l'operazione in 1,3 secondi contro i 146 secondi di ZIP. La dimensione dell'archivio creato da Pack \u00e8 risultata inferiore del 23% (194 MB per Pack e 253 MB per ZIP). A titolo di confronto, l'utility tar ha completato la compressione in 4,7 secondi senza compressione e in 28,5 secondi con compressione gzip, mentre l'archiviatore RAR ha eseguito il test in 27,5 secondi e 7z in 54,2 secondi. Le dimensioni degli archivi sono state: tar.gz \u2014 214 MB, RAR \u2014 235 MB, 7z \u2014 135 MB. Si segnala che Pack supera anche gli altri archivi per velocit\u00e0 di estrazione e accesso casuale ai file, utilizzando meno memoria RAM. ZIP: 253 MB, 146 s 7z: 135 MB, 54,2 s pi\u00f9 veloce di ZIP di 2,7 volte tar.gz: 214 MB, 28,5 s x 5,1 RAR: 235 MB, 27,5 s x 5,3 tar: 1345 MB, 4,7 s x 31 Pack: 194 MB, 1,3 s x 112      <\/p>\n<p>Non si fa menzione dell'influenza della cache dei file sui risultati del test. Probabilmente, la bassa velocit\u00e0 di ZIP \u00e8 dovuta all'ordine di esecuzione dei test senza considerare la memorizzazione nella cache dei dati in memoria \u2014 il test con zip \u00e8 stato eseguito con la cache fredda, mentre gli altri test sono stati eseguiti con la cache riscaldata. In condizioni normali, Zstandard dimostra una velocit\u00e0 di compressione 3-5 volte superiore rispetto a zlib e una decompressione due volte pi\u00f9 veloce, con un livello di compressione superiore del 10-15%.       <\/p>\n<p>Nota: un'idea simile di memorizzare file compressi come blob in un database SQLite \u00e8 stata implementata nel 2014 nell'archiviatore sqlar, creato dagli sviluppatori di SQLite come esperimento per valutare l'efficacia della memorizzazione dei blob in SQLite. In sqlar viene utilizzato zlib per la compressione e la dimensione dei file \u00e8 circa del 2% maggiore rispetto all'utility ZIP.<br \/>\n<br \/>Fonte: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=60842\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0435\u043a\u0442 Pack \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SQLite \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u0436\u0430\u0442\u0438\u044f ZSTD (Zstandard). \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Pascal \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u044b\u0439 \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 Apache 2.0, \u043e\u0431\u043e\u0433\u043d\u0430\u043b \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440\u044b, \u043f\u0440\u0438 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a \u0447\u0442\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u0436\u0430\u0442\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 libzstd \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e SQL-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u043e [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-114563","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u043e\u0435\u043a\u0442 Pack \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SQLite \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u0436\u0430\u0442\u0438\u044f ZSTD (Zstandard).\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/it\/blog\/news\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"it_IT\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c SQLite \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u043e\u0435\u043a\u0442 Pack \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SQLite \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u0436\u0430\u0442\u0438\u044f ZSTD (Zstandard).\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/it\/blog\/news\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-03-25T16:26:02+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-03-25T16:26:02+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Esperimento con SQLite come contenitore per l'archiviazione di file | ProHoster","description":"Il progetto Pack ha tentato di creare un formato per l'archiviazione di file basato sulla libreria SQLite e sull'algoritmo di compressione ZSTD (Zstandard).","canonical_url":"https:\/\/prohoster.info\/it\/blog\/news\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"it_IT","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c SQLite \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 | ProHoster","og:description":"\u041f\u0440\u043e\u0435\u043a\u0442 Pack \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SQLite \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u0436\u0430\u0442\u0438\u044f ZSTD (Zstandard).","og:url":"https:\/\/prohoster.info\/it\/blog\/news\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2024-03-25T16:26:02+00:00","article:modified_time":"2024-03-25T16:26:02+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts\/114563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/comments?post=114563"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/posts\/114563\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/media?parent=114563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/categories?post=114563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/it\/wp-json\/wp\/v2\/tags?post=114563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}