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::$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::$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::$_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::$_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::$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::$_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
Linux Swap Table: nuova architettura per migliorare le prestazioni della memoria virtuale

Linux Swap Table: nuova architettura per migliorare le prestazioni della memoria virtuale

Cos'è la Swap Table, una nuova infrastruttura per il kernel Linux che ottimizza la gestione della memoria virtuale, aumentando le prestazioni e semplificando la manutenzione del sistema.
Linux Swap Table: nuova architettura per migliorare le prestazioni della memoria virtuale

La gestione della memoria virtuale è da sempre uno degli aspetti più delicati non solo a livello di kernel Linux ma per qualunque sistema operativo. Nel corso degli anni, il sottosistema di Swap management ha subito numerose ottimizzazioni incrementali, spesso frutto di compromessi tra efficienza, scalabilità e complessità implementativa. Tuttavia, queste soluzioni parziali hanno portato con sé una crescente frammentazione del codice, riducendo la possibilità di evolvere il design in modo organico.

Oggi, un’importante proposta di revisione architetturale potrebbe segnare una svolta: l’introduzione di una nuova infrastruttura denominata Swap Table, che promette di migliorare sensibilmente le prestazioni del kernel Linux e rendere il sottosistema di swap più robusto e a prova di futuro.

Sottosistema per la gestione della memoria virtuale Linux: sono possibili ampi margini di miglioramento

Il progetto nasce da un’idea presentata da Kairui Song (Tencent) in occasione di un intervento alla conferenza LSF/MM/BPF, dedicata alle tematiche di memoria e storage all’interno del kernel Linux. La proposta mira a integrare in un’unica architettura le tre componenti fondamentali del sottosistema di swap:

  • Swap cache, cache in memoria, una “memoria intermedia” progettata per evitare letture lente dal disco.
  • Swap maps, strutture dati che tengono traccia di quali slot di swap sono occupati e quali sono liberi.
  • Swap allocator, decide dove scrivere nuove pagine nello swap, cioè come allocare gli slot liberi.

L’obiettivo è superare i limiti del design attuale, che si basa su una gestione minimale della memoria con prestazioni “accettabili”, ma che rende complicata l’implementazione di nuove feature e genera duplicazioni non trascurabili nel codice.

In altre parole, l’attuale sistema ha raggiunto un punto in cui ulteriori ottimizzazioni locali risultano sempre meno efficaci e sempre più complesse da integrare, mentre una revisione radicale potrebbe sbloccare guadagni prestazionali significativi e maggiore semplicità di manutenzione.

Infrastruttura e backend

Un insieme di 9 patch destinate al kernel Linux, introduce l’infrastruttura della Swap Table proposta da Song e la utilizza come backend per la gestione della swap cache. Questa prima tranche di interventi ha già evidenziato miglioramenti prestazionali notevoli:

  • Throughput e Requests per Second (RPS): +5%/+20%
  • Riduzione dei tempi di compilazione del kernel (benchmark make -j su varie architetture)
  • Miglioramenti tangibili per database in-memory come Redis e Valkey, con un incremento del throughput del 6-7%

Uno degli aspetti più interessanti è la scalabilità trasversale: i test hanno mostrato benefici sia su macchine ARM con 8 core e 1 GB di RAM, sia su server x86_64 con 48 core / 96 thread e 128 GB di memoria. Tutti indicatori che suggeriscono come il nuovo design riesca ad adattarsi bene a scenari molto diversi, dal mondo embedded fino all’enterprise computing.

I vantaggi della Swap Table

Oltre ai guadagni immediati in termini di performance, la Swap Table introduce vantaggi strutturali.

Tra questi, la riduzione della duplicazione del codice, con conseguente semplificazione della manutenzione del kernel; una maggiore estensibilità; gestione della memoria più efficiente, grazie a un approccio che mira a bilanciare consumo e velocità in maniera più moderna rispetto al modello minimalista attuale.

Ancora, la Swap Table apre all’utilizzo di nuove funzionalità di memory management, che potrebbero essere difficilmente realizzabili con l’infrastruttura attuale.

Note finali e conclusioni

Se confermati e consolidati nelle fasi successive dello sviluppo, i benefici potrebbero tradursi in una migliore esperienza per utenti finali e provider di servizi, con maggiore efficienza nei data center e riduzione dei costi operativi legati alla gestione della memoria.

Se il lavoro procederà come previsto, la Swap Table potrebbe diventare il nuovo punto di riferimento per la gestione dello swap su Linux, con un impatto significativo sulle prestazioni e sull’evoluzione futura dell’intero sottosistema di memory management.

Ti consigliamo anche

Link copiato negli appunti