Καλώς ορίσατε στο dotNETZone.gr - Σύνδεση | Εγγραφή | Βοήθεια
σε

 

Αρχική σελίδα Ιστολόγια Συζητήσεις Εκθέσεις Φωτογραφιών Αρχειοθήκες

bandwidth

Îåêßíçóå áðü ôï ìÝëïò evagelos. Τελευταία δημοσίευση από το μέλος Thiseas στις 27-07-2013, 21:43. Υπάρχουν 7 απαντήσεις.
Ταξινόμηση Δημοσιεύσεων: Προηγούμενο Επόμενο
  •  26-09-2012, 19:14 71300

    bandwidth

    γεια σας παιδιά,

    έχω φτιάξει ένα πρόγραμμα το οποίο συνδέεται σε μια βάση sql και στέλνει και παίρνει queries (select, insert, update).

    Μπορώ με κάποιο τρόπο να δω τι bandwidth καταναλώνω;

    Ευχαριστώ

  •  26-09-2012, 20:44 71301 σε απάντηση της 71300

    Απ: bandwidth

    Το θέμα με τον SQL Server δεν είναι τόσο το δύκτιο καθώς είναι ο 4ος παράγοντας. Δεν υπάρχουν συγκεκριμένοι μετρητές για τον SQL Server παρά μόνο οι κλασσικοί που υπάρχουν έτσι μπορείς να μετρήσεις με τους παρακάτω:

    Network InterfaceBytes Total/sec

    Threshold: Sustained values of more than 80 percent of network bandwidth.

    Significance: This counter indicates the rate at which bytes are sent and received over each network adapter. This counter helps you know whether the traffic at your network adapter is saturated and if you need to add another network adapter. How quickly you can identify a problem depends on the type of network you have as well as whether you share bandwidth with other applications.

    Network InterfaceBytes Received/sec

    This counter indicates the rate at which bytes are received over each network adapter. You can calculate the rate of incoming data as a part of total bandwidth. This will help you know that you need to optimize on the incoming data from the client or that you need to add another network adapter to handle the incoming traffic.

    Network InterfaceBytes Sent/sec

    This counter indicates the rate at which bytes are sent over each network adapter. You can calculate the rate of incoming data as a part of total bandwidth. This will help you know that you need to optimize on the data being sent to the client or you need to add another network adapter to handle the outbound traffic.

    ServerBytes Total/sec

    This value should not be more than 50 percent of network capacity.

    This counter indicates the number of bytes sent and received over the network. Higher values indicate network bandwidth as the bottleneck. If the sum of Bytes Total/sec for all servers is roughly equal to the maximum transfer rates of your network, you may need to segment the network.

    Processor% Interrupt Time

    This counter indicates the percentage of time the processor spends receiving and servicing hardware interrupts. This value is an indirect indicator of the activity of devices that generate interrupts, such as network adapters.

    Network Interface(*)Output Queue Length

    This counter checks to see how many threads are waiting on the network adapter. If there are a lot of threads waiting on the network adapter, then the system is most likely saturating the network I/O most likely due to network latency or network bandwidth.

    Output Queue Length is the length of the output packet queue (in packets). If this is longer than two, there are delays and the bottleneck should be found and eliminated, if possible. Since the requests are queued by the Network Driver Interface Specification (NDIS) in this implementation, this will always be 0.

    /*antonch*/


    Antonios Chatzipavlis

  •  26-09-2012, 22:26 71303 σε απάντηση της 71301

    Απ: bandwidth

    Σε αυτά όμως αν την ώρα που κάνω το μαζικό update ή insert έχω ανοίξει το facebook ή παίζω ένα online παιχνίδι, μπορώ να τα ξεχωρίσω;
  •  27-09-2012, 02:27 71306 σε απάντηση της 71303

    Απ: bandwidth

    Με  αυτούς όχι.

    Υπάρχουν όμως και άλλοι τρόποι που απαιτούν όμως μεγαλύτερη εμπειρία με δίκτυα και τον sql server.

    Από τα συμφραζόμενα σου όμως καταλαβαίνω ότι θέλεις να μετρήσεις από την εφαρμογή σου τι στέλνει στον sql server. Αν το ζητούμενο σου είναι αυτό και εφόσον είσαι αυτός που έχει γράψει την εφαρμογή τότε μπορείς να το κάνεις με το Provider Statistics for SQL Server


    Antonios Chatzipavlis

  •  27-09-2012, 09:52 71309 σε απάντηση της 71306

    Απ: bandwidth

    Εκτός και αν μιλάμε για πολύ άσχημο κώδικα, ο οποίος στέλνει πολύ μεγάλα strings ή binaries στο server, το bandwidth επηρεάζει ελαχιστότατα την απόδοση του server.

    Αυτό που πραγματικά επηρεάζει, είναι ο αριθμός των εντολών και των συνδέσεων που πραγματοποιείς. Κάθε σύνδεση έχει κόστος και κάθε ανεξάρτητη εντολη απαιτεί ένα roundtrip πάνω από το δίκτυο το οποίο μπορεί να φάει πολλαπλάσιο χρόνο σε σχέση με την ίδια την εντολή. Αν στέλνεις π.χ. 1000 ανεξάρτητα απλά inserts αντί για ένα batch των 1000 inserts, η ταχύτητα θα είναι χονδρικά 1/1000 σε σχέση με το batch.

    Επιπλέον, αν ανοίγεις νέα σύνδεση για κάθε εντολή, θα έχεις μεγάλη καθυστέρηση. Το .NET χρησιμοποιεί connection pooling για να ανακυκλώσει ένα σετ από συνδέσεις κάθε φορά που ανοίγεις και κλείνεις ένα connection object. Αν για κάποιο λόγο το κλείσεις όμως (μέσω keyword στο connection string), θα καταλήξεις να ανοιγοκλείνεις συνδέσεις χωρίς λόγο.

    Αντί λοιπόν να κοιτάς το bandwidth, καλύτερα να βάλεις τον SQL Profiler για να δεις πόσες και ποιές εντολές στέλνονται στο server και πόσο χρόνο χρειάζονται. 

    Παναγιώτης Καναβός, Freelancer
    Twitter: http://www.twitter.com/pkanavos
  •  27-09-2012, 10:21 71310 σε απάντηση της 71309

    Απ: bandwidth

    Βάζοντας τον profiler πιθανολογώ ότι θα πρέπει να του πεις και τι πρέπει να διαλέξει για να βγάλει αποτέλεσμα.
    Εγω προτείνω να δει αυτο που θέλει σε συνδιασμό με τον profiler και αφου σε αυτόν έχει διαλέξει το tunning template και φυσικα έχει κάνει filtering στην βάση του.

    Antonios Chatzipavlis

  •  04-10-2012, 16:02 71347 σε απάντηση της 71309

    Απ: bandwidth

    Παναγιώτης Καναβός:

    Αν στέλνεις π.χ. 1000 ανεξάρτητα απλά inserts αντί για ένα batch των 1000 inserts, η ταχύτητα θα είναι χονδρικά 1/1000 σε σχέση με το batch.

     
    και αυτό πως το κάνω;
    έστω ότι έχω ένα dataset με 1000 rows
    πως θα κάνω με batch εργασία αντί για ένα loop for (inti=0; i<1000 i++)  insert into  ..... ;
  •  27-07-2013, 21:43 73692 σε απάντηση της 71347

    Απ: bandwidth

    evagelos:

    Παναγιώτης Καναβός:

    Αν στέλνεις π.χ. 1000 ανεξάρτητα απλά inserts αντί για ένα batch των 1000 inserts, η ταχύτητα θα είναι χονδρικά 1/1000 σε σχέση με το batch.

     
    και αυτό πως το κάνω;
    έστω ότι έχω ένα dataset με 1000 rows
    πως θα κάνω με batch εργασία αντί για ένα loop for (inti=0; i<1000 i++)  insert into  ..... ;

     

    https://www.simple-talk.com/sql/learn-sql-server/bulk-inserts-via-tsql-in-sql-server/

    or

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/953b00b9-f42e-466d-b25d-febf8b31938d/insert-records-in-batches

     


    Nothing to declare...
Προβολή Τροφοδοσίας RSS με μορφή XML
Με χρήση του Community Server (Commercial Edition), από την Telligent Systems