Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$os_meta is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Intel cambia il kernel Linux: fino al 18% in più di prestazioni su database grazie a nuove patch

Intel cambia il kernel Linux: fino al 18% in più di prestazioni su database grazie a nuove patch

Intel ha rilasciato nuove patch per il kernel Linux che ottimizzano la gestione della memoria e la concorrenza dei processi, aumentando fino al 18% le prestazioni di PostgreSQL e migliorando l’efficienza dei sistemi basati su Linux, anche su CPU non Intel.
Intel cambia il kernel Linux: fino al 18% in più di prestazioni su database grazie a nuove patch

Intel ha recentemente introdotto una serie di patch per il kernel Linux che promettono miglioramenti significativi nelle prestazioni dei database, con incrementi stimati tra il 14% e il 18% su PostgreSQL, almeno stando ai risultati dei primi benchmark. L’iniziativa segue altri aggiornamenti mirati al Cache Aware Scheduling (esecuzione dei processi sui core della CPU in cui i dati necessari sono già presenti in cache) ma si concentra su un livello ancora più basso del sistema operativo: la gestione della memoria.

Intel rivede il sistema di gestione della memoria nel kernel Linux

Il lavoro, guidato da Thomas Gleixner (Intel), riguarda la riscrittura del sottosistema Linux relativo alla gestione della memoria mappata e alla concorrenza (Memory-Mapped Concurrency ID, MM CID). Le patch congegnate ottimizzano il modo in cui il kernel gestisce la concorrenza di accesso alla memoria, riducendo i colli di bottiglia nelle operazioni intensive, come quelle tipiche dei database.

Il pacchetto messo a punto comprende 19 patch che modificano in profondità il codice del kernel, con 426 aggiunte e 850 rimozioni di righe di codice. L’intervento mira espressamente a ristrutturare l’allocazione e la sincronizzazione della memoria per ottenere maggiore efficienza in scenari reali.

I dettagli tecnici: memoria mappata e concorrenza

Nel kernel Linux, la gestione della memoria è suddivisa in vari sottosistemi, uno dei quali si occupa delle memorie mappate. Si tratta di aree della memoria che non sono solo usate per dati temporanei, ma che sono collegate a file o dispositivi, permettendo al kernel e alle applicazioni di leggere e scrivere direttamente in memoria senza passare da operazioni di I/O su disco molto più lente.

Il problema principale qui è la concorrenza: più processi o thread possono accedere contemporaneamente alle stesse aree di memoria mappata. Per evitare conflitti o incoerenze, il kernel deve coordinare questi accessi. MM CID si occupa di coordinare le attività in corso garantendo coerenza dei dati e senza bloccare inutilmente i processi.

La riscrittura proposta da Intel mira a rendere il sottosistema più efficiente riducendo la contesa tra processi quando accedono alla stessa memoria. Inoltre, una gestione migliorata riduce il numero delle operazioni di sincronizzazione necessarie. Migliorando il throughput complessivo, i workload intensivi che fanno perno sulla memoria ottengono benefici di primo piano.

PostgreSQL e altre applicazioni che fanno molte operazioni concorrenti su grandi dataset in memoria possono ottenere performance nettamente migliori senza cambiare nulla a livello applicativo, perché il kernel coordina meglio l’accesso ai dati.

Impatto sulle prestazioni

I benchmark preliminari mostrano risultati sorprendenti. La gestione dei dati memorizzati all’interno di database PostgreSQL ha evidenziato un incremento prestazionale notevole, fino al 14%, con ulteriori possibilità di miglioramento tramite un ramo di codice secondario ancora in fase di test. Così si arriva al 18%.

Nelle attività di creazione e rimozione dei thread, le modifiche proposte da Gleixner hanno fatto registrare un miglioramento fino al 30% rispetto al kernel Linux upstream, evidenziando l’efficacia delle ottimizzazioni nella gestione della concorrenza.

Questi miglioramenti non sono limitati ai processori Intel: le patch, una volta integrate nel kernel, sono applicabili anche ad altre piattaforme compatibili con Linux, compresi i processori AMD, confermando la natura generale delle ottimizzazioni.

Perché PostgreSQL non usa i cosiddetti green threads

Alcuni sviluppatori hanno sottolineato che PostgreSQL continua a utilizzare un’architettura basata su processi multipli piuttosto che su thread leggeri (green threads o thread virtuali).

La scelta è storica e risale ormai a oltre trent’anni fa, quando PostgreSQL è stato progettato intorno al modello di processi Unix e ai segnali del sistema operativo. L’evoluzione verso un’architettura multithread è in corso, ma si tratta di un progetto a lungo termine, poiché richiede una conoscenza approfondita dei meccanismi interni del database e un testing rigoroso per garantire stabilità e affidabilità.

Implicazioni e Prospettive

Le patch di Intel rappresentano un esempio di come contributi hardware-oriented possano tradursi in vantaggi tangibili per l’intera comunità Linux, anche su architetture concorrenti.

Oltre al miglioramento delle prestazioni, queste ottimizzazioni offrono un incremento dell’efficienza delle risorse, riducendo la necessità di potenza di calcolo aggiuntiva.

Al momento, ulteriori test e benchmark sono in corso per valutare l’impatto su altre tipologie di workload, come applicazioni web, sistemi in-memory e altri database.

Ti consigliamo anche

Link copiato negli appunti