sqlschool.gr logo

articles

Articles of SQLschool.gr Team

Is the processor affinity mask the answer to dedicated SQL Server box?

Antonios Chatzipavlis
Tuesday 22 October 2013

Στο προηγούμενο μου post αναφέρθηκα γιατί πρέπει ο SQL Server να είναι μόνος τους σε ξεχωριστό server. Ένα αγαπητός συνάδελφος εξέφρασε την ερώτηση

«Δεν μπορείς να ορίσεις processor affinity;»

Εξαιρετική ερώτηση και για αυτό ας την απαντήσουμε.

Θα ξεκινήσω με το απλούστερο μέρος της απάντησης που αφορά το licensing.

Αν αυτό ίσχυε τότε δεν ήταν παράνομοι όσοι έχουν περισσότερα από ένα CPU στον server τους. Θα δήλωναν όσα είχαν αγοράσει και θα ήταν νόμιμοι. Όμως δεν ισχύει. Ειδικά τώρα που ο SQL Server 2012 είναι core based θα είχαν αρκετοί βγάλει ένα βραχνά από το κεφάλι τους. Θα μπορούσε κάποιος δηλαδή να αγοράσει ένα CPU με 6 ή περισσότερα cores και να πει ότι χρησιμοποιεί τα 4 με το affinity και να είναι εντάξει. Αυτό δεν ισχύει. Πρέπει να αγοράσει άδειες για όλα τα cores. Μην μου πείτε μα αφού έχω βάλει μόνο τα 4 και είμαι τίμιος, απλά δεν παίζει έτσι το σενάριο.

Και δεν παίζει έτσι το σενάριο διότι το processor affinity δεν σημαίνει αποκλειστική χρήση του cpu/core από τον SQL Server και ότι κάνεις άλλος δεν θα τον χρησιμοποιήσει. Όλα έχουν να κάνουν με το SQLOS και τους schedulers που δημιουργούνται. Δεν θα το γράψω αναλυτικότερα από ότι είναι γραμμένο στο documentation του προϊόντος (http://technet.microsoft.com/en-us/library/ms187104.aspx) και το οποίο εξηγεί θεωρώ ιδανικά το processor affinity mask.

Απλά θα πω (και θα το εξηγήσω αναλυτικά σε επόμενο post για να είναι ενιαίο και ολοκληρωμένο) ότι ο κάθε scheduler δεν ορίζεται σε συγκεκριμένο core/cpu αλλα μόνο αν κάνω χρήση του affinity mask. Εδώ μπλέκει και το Ι/Ο affinity αλλά σε επόμενο post αναλυτικά αυτά.


/*antonch*/

Antonios Chatzipavlis

Antonios Chatzipavlis

Antonios Chatzipavlis is a highly experienced Data Solutions Consultant and Trainer. He has been working in the IT industry since 1988, holding various roles such as senior developer, IT Manager, Data & AI Solutions Architect and Consultant.

Since 1995, Antonios has focused on modern technologies and software development tools, primarily by Microsoft. He has specialized in Data & AI since 2000, with expertise in Microsoft Data Platform (SQL Server, Azure SQL Databases, Azure Synapse Analytics, Microsoft Fabric, Power BI, AI) and Databricks.

Antonios is also a Microsoft Certified Trainer (MCT) for over 25 years, has been recognized as a Microsoft Most Valuable Professional (MVP) in Data Platform since 2010 and he is in the Data Expert 40 Powerlist 2024 by Boussias. He is the co-founder and visionary behind XLYTiCA, a company dedicated to Data & AI solutions.

Episode

Task Flows in Microsoft Fabric

image

More Episodes...

Tip

Get Certified: Become a Fabric Data Engineer

More Tips...

Become a member

If you want to receive updates from us become a member to our community.

Connect

Explore

Learn

sqlschool.gr © 2010-2025 All rights reserved

This site uses cookies for operational and analytics purposes only. By continuing to browse this site, you agree to their use.