PDA

View Full Version : Some thoughts on Tref and DIY


mad mikee
06-08-2005, 07:54 AM
There are a few threads w/ stuff about Tref and how it influences our OC. (AgentJCDenton in the Gskill BH-5 thread and the Tref thread come to mind). I have found the discussions useful.

However the frustration of not finding the 'ideal' TREF for many settings has led me to request this addition to the various biosi out there (Future DFI and ATI biosi especially :D )

1. First request
Replace the current tref selection w/ the following entries: 1.95 Auto, 3.9 Auto, 7.8 Auto, 15.6 Auto. These would calculate tref = FSB (integer) * the auto value and use the Truncated value (Accurate to 1 cycle) for TREF. Examples: Auto 7.8 x 275 = 2145, use that. Auto 3.9 x 311 (x 9 to get 2800 MHZ CPU) = 1212(.9 - toss that).

2. Second request
Allow US do the calculations and input our OWN value (saves bios programming, however, allows for GIGO tref values :doh: )

3. Third request - teh IDEAL :banana:
Do both 1 & 2 to so that we get a better tref for starters (1) and if the calc is slightly off for our particular piece of mem we can tweak it on our own (2)

BIOSI could have tables for the trefs for above refresh rates from 150-350 FSB and let us handle anything outside of that on our own :D

Cornelious0_0
06-08-2005, 08:22 AM
I'm completely in favor of this.....the tref selections seem to be the only thing in the BIOS for my Ultra-D that seem oddly out of order and in need of help.

Jimbo Mahoney
06-08-2005, 08:49 AM
From my understanding, if the Tref is too high, the memory isn't getting refreshed enough and risks losing data. If the Tref is too low, it's getting refreshed too often, causing instability due to power / heat issues.

I've done an excel spreadhseet where the user inputs their memory stick size and their memory speed and it calculates a theoretical ideal Tref.

It's here:

http://homepage.ntlworld.com/james.waynewright/Tref.xls

Let me know if it needs changing, or feel free to make it into a webpage as I don't have the 1337 5k1ll5 required to do that...

Does it work for people?

mad mikee
06-08-2005, 08:54 AM
Now if only we could put in those ideal values :rolleyes:

Would you please share methodology that led you in making this tool (being the inquiring minds we all are :D )
Tanks mIkeE

Jimbo Mahoney
06-08-2005, 09:11 AM
OK,

It started here:

http://www.dfi-street.com/forum/showpost.php?p=97498&postcount=3

Now I also know that 128Mbit memory modules (256MB) like 15.6us refresh and larger modules (512MB) prefer 7.8us.

That's where the first user-specified variable comes into the spreadsheet.

The second one is just based on the fact 1000/clock speed = absolute time period of 1 cycle.

So, for 200 Mhz = 5ns

Thus, as you ramp up the clock speed, you need to increase the Tref to keep the refresh period at 7.8us or 15.6us.

Get me?

Jimbo Mahoney
06-08-2005, 10:10 AM
OK, I've updated the spreadsheet so users can input their stick's default refresh period if they know it.

hovo73
06-08-2005, 10:13 AM
Thanks for the spreadsheet, but I am still unclear as to which values are "high" and which ones are "low". The values seem to be in complete disorder and I really don't know what "ramping" up really means?

For example, I have 2x512 sticks and I am trying to get 252 MHz, according to the spreadsheet, the ideal TREF value is 1968.75. How do I get that value, or the one closest to it?

EDIT: I don't know the default refresh period, how can I get it? (OCZ EL Gold BH-5)

Jimbo Mahoney
06-08-2005, 10:25 AM
OK, basically, the Tref in the BIOS is the number of cycles before a refresh occurs.

Since the higher the speed of the memory (in Mhz), the less time each cycle occupies.

Thus, in order to maintain the refresh period of the memory (normally 7.8us or 15.6us), you need to adjust the Tref as you adjust the memory speed.

Increasing the clock speed = decreasing the cycle length = need to increase the Tref setting in the BIOS.

This is all theory at the moment, hence the need for testing.

As far as the spreadsheet goes, just choose the value(s) closest to the theoretical value and test.

In principle, Everest can give you your RAM's refresh period, although it is telling me my G.Skill 4400LE is rated @ 2.5-4-4-8 @ 200 Mhz, so who knows if it's accurate or not :rolleyes:

WeStSiDePLaYa
06-08-2005, 12:35 PM
think anyone can write a little proggy to do this as not everyone has excel, also if the proggy only selects values that are OPTIONS in the bios. thanks! anybody else think its high time we get one?

pershoot
06-08-2005, 03:43 PM
Thanks for the spreadsheet, but I am still unclear as to which values are "high" and which ones are "low". The values seem to be in complete disorder and I really don't know what "ramping" up really means?

For example, I have 2x512 sticks and I am trying to get 252 MHz, according to the spreadsheet, the ideal TREF value is 1968.75. How do I get that value, or the one closest to it?

EDIT: I don't know the default refresh period, how can I get it? (OCZ EL Gold BH-5)

refresh should be 7.8us for those modules.

Cornelious0_0
06-08-2005, 04:43 PM
The spreadsheet is working fine for me.....nice little thing to have on hand....and once I take the time I want to do some proper CPU burn-in with my Venice I'll see how much it helps fine-tuning my Tref as opposed to just setting it to 3072 irregardless and that's it. :p:

Jimbo Mahoney
06-09-2005, 01:56 AM
OK, well it's working for me.

I also e-mailed it to a friend who reported positively:

"OK just tried it

Before: tref 1168 (166/7.8 in A64 Tweaker),

Everest latency 36.5, Read 7913, Write 3345

According to your spreadsheet, 512MB at 300 requires Tref of 2344. So tried 2336 (nearest value), which is 166/1.95 in A64 Tweaker (but 7.8 us in DOS Memtest A64 Options!).

Gives latency 36.5, Read 7928, Write 3369.

So a slight improvement."

mcnbns
06-09-2005, 04:24 AM
I messed aroung with Tref last night a bit, and finally got 260 MHz 2-2-2-5 stable. I used Tref 2048 through the BIOS, and A64Tweaker reports it as 133 MHz 3.9us, if that's of any use to anyone.

mrlobber
06-09-2005, 04:31 AM
I messed aroung with Tref last night a bit, and finally got 260 MHz 2-2-2-5 stable. I used Tref 2048 through the BIOS, and A64Tweaker reports it as 133 MHz 3.9us, if that's of any use to anyone.

According to Jimbo's calculation, the theoretical ideal value should be 2031, and obviously, 2048 is the closest to it. Did you find that value by yourself? If yes, that would be another confirmation this calculation is working :D

Jimbo Mahoney
06-09-2005, 06:48 AM
Oops. Edited

Cornelious0_0
06-09-2005, 07:15 AM
So then you ARE supposed to use the next highest value that's higher then the ideal value.....or lower then it?

g0dM@n
06-09-2005, 10:17 AM
think anyone can write a little proggy to do this as not everyone has excel, also if the proggy only selects values that are OPTIONS in the bios. thanks! anybody else think its high time we get one?
I can probably do that if I can remember stuff back from 5 years ago with Visual Basic.

I can try to write a program if someone can tell me how to make it *.exe.

THunDA
06-09-2005, 10:52 AM
Thanks for the spread sheet thingy.. Ill try this later.. :)

Jimbo Mahoney
06-09-2005, 11:08 AM
So then you ARE supposed to use the next highest value that's higher then the ideal value.....or lower then it?

Try both. I would use the one which is closest, whether higher or lower.

Too high and too low are both bad for different reasons.

g0dM@n
06-09-2005, 11:14 AM
Nice OC, Jimbo... is your Venice holding you from running higher mem?

Also, does anyone know the exact uS (microsecond, or cycle) value of the new TwinMOS Speed Premium (1A4T --> BH5)? I'm at work, but I'm curious if it's 7.8uS or not.

burningrave101
06-09-2005, 12:09 PM
Thanks for the spread sheet thingy.. Ill try this later.. :)

Ya know, once you figure out your refresh rate all you have to do is multiply that times the speed your RAM is running at and that will give you the tREF your shooting for. You get the same value if you calculate using the spreadsheet. I know cause i tried it :p.

flexy
06-09-2005, 04:13 PM
hey this is a VERY interesting thread.

Problem: I dont have excel and the excel-viewer doesnt allow changing values.

I am running two 512MB sticks and everest says default refresh is 7.8uS.

But now i am running at 291 FSB !

Could you explain (in easy terms)..how to calculate the TREF out from
the HTT/FSB and modules (7.8uS) i have ?

This was NOT that clear in that thread.

amrgb
06-09-2005, 04:23 PM
I have the exact same FSB as you.

Using the formula you should use a Tref of 7.8*291=2270. Following the theory you should try the Tref's near this value. Try 2336, 2560, 2592, 2064, 2048.

In practice, I have better results with lower Tref's, like 648, 780 and 908.

For me there is really one way to find the optimum Tref. Try them all with Superpi 32M as jot down the number of loops you can do before failure. For me it's much better than memtest. As an advantage you can easily change the Tref with A64 tweaker. The problem is to test the tref's that cannot be chosen in the tweaker.

Jimbo Mahoney
06-09-2005, 04:27 PM
Simply:

1 / memory speed

then divide your refresh rate by that number

e.g.

1 / 200 Mhz = 0.005

7.8/0.005 = 1560

Although amrgb's method is way easier! :rolleyes: silly me

flexy
06-09-2005, 04:50 PM
Simply:

1 / memory speed

then divide your refresh rate by that number

e.g.

1 / 200 Mhz = 0.005

7.8/0.005 = 1560

Although amrgb's method is way easier! :rolleyes: silly me


yeah i figured that out...


but something is weird...do we have to take DDR2 into account ?

I remember the default tref for my sticks (200 HTT) is 3170 or something for 200mhz.....and this would make sense if they use 400 (!) (DDR2) and not the 200 HTT...otherwise they would NOT come up with a default of 3170 but, as you said...something in the 1500 range !

Short: Do we have to multiply the result x 2 ??????

(look at the default tref values in bios if you set everything to auto and default HTT)

Vicar
06-09-2005, 05:24 PM
I knocked a calculator thingie up, since some people dont have Excel...

http://vicar.dyndns.org/php/tref.php should work, provided my new router feels like cooperating with me. Can't see if this link actually works from where I'm sitting, so if someone would just tell me if it works, it'd be great. :)

EDIT: My server is screwed. Use http://vicar.beyond-sanity.com/tref.php instead.

WeStSiDePLaYa
06-09-2005, 06:07 PM
I knocked a calculator thingie up, since some people dont have Excel...

http://vicar.dyndns.org/php/tref.php should work, provided my new router feels like cooperating with me. Can't see if this link actually works from where I'm sitting, so if someone would just tell me if it works, it'd be great. :)
not working

flexy
06-09-2005, 06:14 PM
doesnt work (that link) but i am almost 99,9% sure we have to take the result x 2 because of DDR2. will do some memtest runs and check whats happening.

13oost
06-09-2005, 07:31 PM
email it to me and ill put it on my server

i messed around with the excel sheet and got it more "automated" it also has some extra stuff that is just an idea...

http://13oost.com/Tref.xls

mcnbns
06-09-2005, 07:48 PM
According to Jimbo's calculation, the theoretical ideal value should be 2031, and obviously, 2048 is the closest to it. Did you find that value by yourself? If yes, that would be another confirmation this calculation is working :D
I'm not sure about Jimbo's calculation... I just multiplied my FSB by 7.8 to find Tref. I thought I read that somewhere, but I'm not sure. :slap: to me. :(

I'll have to try that online calculator Vicar made when it gets fixed (doesn't work for me, either).

In any case, if you're running UTT at 260MHz try 2048. It worked for me. :)

13oost
06-09-2005, 07:54 PM
his calculation is like 7.8/(1/FSB)..... do the algebra, its the same as 7.8xFSB....

hovo73
06-09-2005, 08:46 PM
Has anyone noticed that there are two different 2064 values in the table?

Also, how can picking the closest mathematica value work, if closest values sometime take you into completely different cathegory (frequency and timing) and values that are WAY off from each other are right next to each other? It just doesn't feel right.

Vicar
06-10-2005, 01:35 AM
Damn my server... Oh well. This will work:

http://vicar.beyond-sanity.com/tref.php

Jimbo Mahoney
06-10-2005, 02:32 AM
Has anyone noticed that there are two different 2064 values in the table?

Also, how can picking the closest mathematica value work, if closest values sometime take you into completely different cathegory (frequency and timing) and values that are WAY off from each other are right next to each other? It just doesn't feel right.


I have a feeling the tables we have been using are incorrect and just guess-work.

Jimbo Mahoney
06-10-2005, 02:34 AM
I remember the default tref for my sticks (200 HTT) is 3170 or something for 200mhz.....and this would make sense if they use 400 (!) (DDR2) and not the 200 HTT...otherwise they would NOT come up with a default of 3170 but, as you said...something in the 1500 range !

Short: Do we have to multiply the result x 2 ??????

(look at the default tref values in bios if you set everything to auto and default HTT)

The default values assume 15.6 us refresh time.

200 Mhz @ 15.6us = 3120 cycles

200 Mhz @ 7.8us = 1560 cycles

slayer899
06-10-2005, 06:12 AM
excuse my ignorance if this has already been stated but is the default refresh time for the 512x2 kits of OCZ Plat Rev.2 7.8us as well? i'd check with everest but i'm at work now and i'm trying to figure some calculations out. thanks

EDIT:and let me say that after reading this and a few other threads about this topic i would love to have an option in future bioses to input our own values or to have them be calculated for us...or both :D

Jimbo Mahoney
06-10-2005, 06:33 AM
OK, I made another change to the spreadsheet based on all this feedback.

There is now a table which is updated when you change the refresh period.

It lists all BIOS Tref values and gives you the clock speed they should be used with when you supply your refresh period.

It seems as if almost everyone has a refresh period of 7.8us.

I'll make a small web page listing the values too, so people can see it without using excel.

It won't be dynamic though, I'll just have a list of values at 7.8 and 15.6us.

Link to excel spreadsheet again:

http://homepage.ntlworld.com/james.waynewright/Tref.xls

Jimbo Mahoney
06-10-2005, 07:11 AM
Webpage here:

http://homepage.ntlworld.com/james.waynewright/Tref.html

Jimbo Mahoney
06-10-2005, 07:14 AM
Damn my server... Oh well. This will work:

http://vicar.beyond-sanity.com/tref.php

Seems to be working d00d!

Nice!

Also, I'm grateful for your reference to me, but I only started the spreadsheet based on the info Sharp provided from DFI Forums here:

http://www.dfi-street.com/forum/member.php?find=lastposter&t=13769

I'm not sure who was the first person to realise the relationship between refresh time, clock speed and Tref in cycles.

Jomiy
06-10-2005, 08:28 AM
Ya OCZ Plat Rev2 is 7.8us.

hmm multiply by 2 to take DDR into account? Shall try..

Jimbo Mahoney
06-10-2005, 10:02 AM
hmm multiply by 2 to take DDR into account? Shall try..

No, because it doesn't make sense.

DDR is still the same clock speed, it just sends data on both the rising and falling edges of the clock signal.

Hence Double Data Rate, not Double Clock Rate
;)

krampak
06-10-2005, 11:21 AM
It worked for me! It performs better now.

I thought 200 3.9us was the best setting for me, but I've calculated it (fro 240Mhz 2-2-2) and it does about 1875, so 1816 in bios -> 100Mhz 1.95us, now it's doing 0'2 seconds less at spi 1MB :woot: (tryied several times)

flexy
06-10-2005, 12:20 PM
The default values assume 15.6 us refresh time.

200 Mhz @ 15.6us = 3120 cycles

200 Mhz @ 7.8us = 1560 cycles

you might be right :)

notice that all "recommended" settings usually (eg. for two 512MB sticks) are "3072" or similiar.....would mean theyall refer to 256MB sticks (15.6uS)...whilest the majority of people have 7.8uS (512MB sticks).

In other words: 99% of all i read about recommended values (incl. on bleedingedge etc.) are WRONG then....

(Assuming our calculations are right !)

btw. nice website....but the arithmetic is really easy (darn i was always bad in math)..as said just multiply FSB/HTT x 7.8 :)

[XC] 4X4N
06-10-2005, 01:27 PM
I don't know about all of this tref speculation guys. I'm running 10x265 right now and going buy the spread sheet tref should be 2067. Closest is 2064. Tried it along with 2560 (which is my current setting), 3072, 3120, 3684, 4196, 4708. All are within .1 second in 1m super-pi. 4196 came put as the fastest. Didn't take the time to run a 16m or 32m pass to see if they are all stable. So I'm still just as confused about what is really the best setting.

flexy
06-10-2005, 06:55 PM
I don't know about all of this tref speculation guys. I'm running 10x265 right now and going buy the spread sheet tref should be 2067. Closest is 2064. Tried it along with 2560 (which is my current setting), 3072, 3120, 3684, 4196, 4708. All are within .1 second in 1m super-pi. 4196 came put as the fastest. Didn't take the time to run a 16m or 32m pass to see if they are all stable. So I'm still just as confused about what is really the best setting.

if anything then its more a stability thing, in my opinion. Performance gains might be minimal ?!

blackjok3r
06-10-2005, 08:06 PM
yeah tref is a stability thing, but an extremly wrong value will impact perfromance.

EDIT: for 2x256MB BH-5 the tref should be 3900, but there isn't a very close value to this? I'm using 4116 atm but, and seems ok, its stable and slightly faster than 3120.
Everest reports my modules to be 7.8us but there better with 15.6us. So for 256 its 15.6, and for 512 it's 7.8us. :fact:

Jimbo Mahoney
06-11-2005, 04:32 AM
I have to agree with the stability thing.

This is NOT a performance setting. It's 99% a stability setting.

All it's doing is adjusting the frequency the bucket gets topped up:

http://computer.howstuffworks.com/ram1.htm

Too slow (high Tref), and the memory loses its contents.

Too fast (low Tref), and the memory overheats / overstresses / becomes less stable.

Yes, it DOES affect performance, but not much.

fareastgq
06-11-2005, 10:40 PM
Nice read and good results guys, I just book marked your calculater Vicar, and dl'd your sheet J. :) Is it possible for u guys to calculate all the other timings with a formula also? that would be the ultimate ram tweak. Unfortunately, I know nothing of use to help u guys out with this. Only thing is Vicar, when I do the sticks and spd calculation, it's 2140, when I do the refresh and mhz, it's 2137, did you intend it to work this way?

Jimbo Mahoney
06-12-2005, 06:52 AM
Nice read and good results guys, I just book marked your calculater Vicar, and dl'd your sheet J. :) Is it possible for u guys to calculate all the other timings with a formula also? that would be the ultimate ram tweak. Unfortunately, I know nothing of use to help u guys out with this. Only thing is Vicar, when I do the sticks and spd calculation, it's 2140, when I do the refresh and mhz, it's 2137, did you intend it to work this way?

What do mean 'all other timings'? Do you mean CAS, tRCD, tRP, tRAS? If so, there are already guidelines on how to calculate them properly. But if you are looking for an easy way to work out the ideal timings at a given FSB, you are fresh out of luck.

One thing you can do, though, to calculate the total (theoretical) latency of the mem is this:

1000/clock speed = ns per cycle

CAS + tRCD + tRP + 2 cycles = total cycles

total x ns = total latency

e.g.

225 Mhz @ 2-2-2-6 =

1000 / 225 = 4.44 ns

2+2+2+2 = 8

8 x 4.44 = 35.5 ns

The only thing I'm not sure about is whether having 1T timing reduces that 'add 2 cycles' to 'add 1 cycle'. I don't think it does...


Re:one formula gives 2140 and the other gives 2137 - that's my fault, since (I assume) Vicar just used my Excel calculations in his program. It is completely irrelevant since we are dealing with ideal Tref values and are limited in the BIOS as to which ones we select. It comes about because:

4 / 512 = 0.0078125

and is not exactly 0.0078 which is what our refresh rate actually is.

It was the only way I could think of to convert memory size into a refresh rate if you didn't know your refresh rate.

As it turns out, almost everyone seems to have 7.8us memory anyway!

Vicar
06-12-2005, 08:19 AM
Like Mahoney said, I'm simply using the formulaes in his spreadsheet... So blame him for all discrepancies! ;)

Jimbo Mahoney
06-12-2005, 09:32 AM
So blame him for all discrepancies! ;)

hehe