You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -89,12 +90,6 @@ class BackgroundIOPriority(object):
53
+
@@ -90,12 +91,6 @@ class BackgroundIOPriority(object):
54
54
@param chainPollTime - float > 0, When chaining, this is the sleep time between checking if prior is finished.
55
55
Too low and the polling takes up CPU time, too high and you'll lose a little time in between chained writes, while gaining interactivity elsewhere.
56
56
@@ -63,24 +63,24 @@ index 8b9765c..b76cc28 100644
63
63
A high number means higher throughput at the cost of lest interactivity for other tasks, a low number means the opposite.
64
64
65
65
So, for example, a bandwidthPct of "50" will attempt to use "50%" of the available bandwidth. Note, this does not represent theroetical
66
-
@@ -107,7 +102,7 @@ class BackgroundIOPriority(object):
66
+
@@ -108,7 +103,7 @@ class BackgroundIOPriority(object):
67
67
See #bandwidthPct for the other half of the story. The higher this number, the more "fair" your application will be against a constant
68
68
rate of I/O by other applications, but the less able it may be to play fair when the external I/O is spiking.
69
69
70
70
- Also, consider that this is related to the #defaultChunkSize, as it is not a constant period of time. The default of "5" should be okay,
71
71
+ Also, consider that this is related to the #chunkSize, as it is not a constant period of time. The default of "5" should be okay,
72
72
but you may want to tune it if you use really large or really small chunk sizes.
73
-
74
-
75
-
@@ -116,7 +111,6 @@ class BackgroundIOPriority(object):
73
+
74
+
75
+
@@ -117,7 +112,6 @@ class BackgroundIOPriority(object):
76
76
77
77
78
78
self.chainPollTime = chainPollTime
79
79
- self.defaultChunkSize = defaultChunkSize
80
80
self.bandwidthPct = float(bandwidthPct)
81
81
if bandwidthPct <= 0 or bandwidthPct > 100:
82
82
raise ValueError('Given bandwidthPct %f must be > 0 and <= 100')
83
-
@@ -138,16 +132,16 @@ _SIZE_MEG = 1024 * 1024
83
+
@@ -139,16 +133,16 @@ _SIZE_MEG = 1024 * 1024
84
84
85
85
# BG_IO_PRIOS - Predefined I/O priorities, 1-10. The lower the number, the more throughput at the cost of interactivity
86
86
BG_IO_PRIOS = {
@@ -107,7 +107,7 @@ index 8b9765c..b76cc28 100644
107
107
}
108
108
109
109
110
-
@@ -165,7 +159,7 @@ class BackgroundWriteProcess(threading.Thread):
110
+
@@ -166,7 +160,7 @@ class BackgroundWriteProcess(threading.Thread):
111
111
'''
112
112
# Design question: What about errors?
113
113
@@ -116,7 +116,7 @@ index 8b9765c..b76cc28 100644
116
116
'''
117
117
__init__ - Create the BackgroundWriteProcess thread. You should probably use bgwrite or bgwrite_chunk instead of calling this directly.
118
118
119
-
@@ -179,6 +173,12 @@ class BackgroundWriteProcess(threading.Thread):
119
+
@@ -180,6 +174,12 @@ class BackgroundWriteProcess(threading.Thread):
120
120
121
121
@param ioPrio <int/BackgroundIOPriority> - If an integer (1-10), a predefined BackgroundIOPriority will be used. 1 is highest throughput, 10 is most interactivity. You can also pass in your own BackgroundIOPriority object if you want to define a custom profile.
122
122
@@ -129,7 +129,7 @@ index 8b9765c..b76cc28 100644
129
129
130
130
@raises ValueError - If ioPrio is neither a BackgroundIOPriority nor integer 1-10 inclusive
131
131
- If chainAfter is not a BackgroundWriteProcess or None
132
-
@@ -195,7 +195,8 @@ class BackgroundWriteProcess(threading.Thread):
132
+
@@ -196,7 +196,8 @@ class BackgroundWriteProcess(threading.Thread):
0 commit comments