Mantis Bugtracker

Простой вид комментарии ] расширенный вид ] история ] печать ]
Номер Категория Серьезность Воспроизводимость Создан Изменен
0000062 [obex-data-server] General нововведение неприменима 2008-03-25 16:13 2008-10-17 19:28
Инициатор nbransby Видимость общая  
Ответственный skirsdeda
Приоритет высокий Решение открыт  
Состояние назначен   Версия продукта 0.3
Суть 0000062: Ability to set transport MTU sizes
Подробности In ods_session_setup_transport you call OBEX_SetTransportMTU with the constants ODS_OBEX_RX_MTU and ODS_OBEX_TX_MTU.

Could these be configured through the API instead (on a per session basis)?

Useful to optimize packets sizes based on the size of the files you want planning to send or receive. For example if I only plan to send files i would do something like...

packet_count = (file_size/0xFFFC) + std::min(1, size%0xFFFC);
transmit_mtu = std::max(OBEX_MINIMUM_MTU,
  (file_size/packet_count) + std::min(1, file_size%packet_count))+3);
OBEX_SetTransportMTU(obex, OBEX_MINIMUM_MTU, transmit_mtu)
Дополнительные сведения
Tэги Нет прикрепленных тэгов.
Вложенные файлы

- Связи

-  Комментарии
(0000181)
skirsdeda (администратор)
2008-03-25 16:24

Interesting idea. We have to think of a way how to implement this though...
(0000183)
RobertRawlins (инициатор)
2008-03-25 17:27

Yeah this is a nice idea, I like it.
(0000186)
nbransby (инициатор)
2008-03-25 17:31

How about simply modifying...

org.openobex.Session.Connect()

...to.,.

org.openobex.Session.Connect(int transmit_mtu, int recieve_mtu)

...?
(0000209)
heston_james (инициатор)
2008-04-05 18:25

nbransby's idea for the API implementation might be a nice way to handle this. After reading through bug 53 and seeing the proposed changes to the API which would meen we then manualy call Connect() we would be able to do this.
(0000211)
heston_james (инициатор)
2008-04-08 17:57

The only other thought I've been having with this that perhaps instead of making it a part of the Connect() method, we could just make this a property of the Session object.

The only reason I suggest this is that if we modify the Connect() method so that it requires an MTU then it becomes compulsory for developers to specify it when most would be more than happy using the default MTU size.

For the sake of simplicity do you think perhaps we should keep the Connect() method as it is and create a seperate method for specifying the MTU which can be called before the Connect() method for those that desire it?

Heston
(0000212)
skirsdeda (администратор)
2008-04-08 21:25

Connect method should be left as it is.
(0000213)
heston_james (инициатор)
2008-04-10 10:10

Agreed.

So what are your thoughts on how to implement this? shall we look at creating a new method for the session? something like SetSessionMTU(int transmit_mtu, int recieve_mtu) might work nicely?

Alternativly we could publish the set_property method onto the dbus interface and allow people to set the MTU using that.

My thoughts are currently sat with the new setter method. We can then set the default MTU's when the class is init'd and that way calling SetSessionMTU() isnt compulsory and if not called the default MTU's will be used.

What do you think? I dont mind doing the work to draft up a working patch if we can agree on how it should be implemented.

Heston
(0000214)
skirsdeda (администратор)
2008-04-10 10:15

It should be a function: SetMTU(int transmit_mtu, int receive_mtu)
(0000215)
heston_james (инициатор)
2008-04-10 13:31

Gear!

I'll work on implementing this later in the evening and I'll be sure to post a patch as soon as one is available.

Heston
(0000216)
heston_james (инициатор)
2008-04-11 10:54

Ok, the patch for this is comming along. I got a little distracted last night and didnt get chance to finish it but hope to do so this evening.

Tell me, what is the actual real world benefit to being able to change the MTU dependant on the file size? what do we gain by doing so?

Heston
(0000421)
skirsdeda (администратор)
2008-09-23 18:50

We should try using maximum MTU for all transfers, that way there will be no need to specifically set MTU all the time (and would be really difficult to implement MTU setting because it has to be done early).
(0000422)
heston_james (инициатор)
2008-09-24 17:47

Tadas, After our discussion yesterday I checked in with my fellow dev here and it appears we use 65535 as the MTU on our systems and seem to get good performance from it on files of all sizes, from 100 byte text files through to 5Mb videos.

I've not done much experimentation but this was the MAX_MTU value which was set in the open bex source I think.

Someone else may be able to chime in and say if there is a better MTU choice?

Cheers,

Heston
(0000479)
alexbk (инициатор)
2008-10-17 17:44
изменен: 2008-10-17 17:54

I agree - unless there is a good reason, it's best to set MTU to the max for the best performance. It's been increased to 32767, but I think it should be set even further to 65535.

(edited to remove misleading info)

(0000480)
heston_james (инициатор)
2008-10-17 17:57
изменен: 2008-10-17 17:58

(edit as Alex changed his comment ;-)

Tadas, was there any reason behind your choice of 32767 instead of 65535?

Heston

(0000482)
skirsdeda (администратор)
2008-10-17 19:28

I did some testing with obex-data-server by running ods Server and connecting to it with ods Session. For some reason, ods hangs with 65535 MTU (not crashes, but just stops in readstream AFAIK). Until I have some more time to investigate how that happens, I just increased RX MTU to safe limit (BTW, such values are also used by obexd).

- история
Дата изменения Пользователь Поле Изменение
2008-03-25 16:13 nbransby Новый вопрос
2008-03-25 16:22 skirsdeda Состояние новый => назначен
2008-03-25 16:22 skirsdeda Ответственный => skirsdeda
2008-03-25 16:24 skirsdeda Комментарий добавлен: 0000181
2008-03-25 17:27 RobertRawlins Комментарий добавлен: 0000183
2008-03-25 17:31 nbransby Комментарий добавлен: 0000186
2008-04-05 18:25 heston_james Комментарий добавлен: 0000209
2008-04-08 17:57 heston_james Комментарий добавлен: 0000211
2008-04-08 21:25 skirsdeda Комментарий добавлен: 0000212
2008-04-10 10:10 heston_james Комментарий добавлен: 0000213
2008-04-10 10:15 skirsdeda Комментарий добавлен: 0000214
2008-04-10 13:31 heston_james Комментарий добавлен: 0000215
2008-04-11 10:54 heston_james Комментарий добавлен: 0000216
2008-09-23 18:49 skirsdeda Приоритет обычный => высокий
2008-09-23 18:50 skirsdeda Комментарий добавлен: 0000421
2008-09-23 20:59 skirsdeda Целевая версия => 0.4
2008-09-24 17:47 heston_james Комментарий добавлен: 0000422
2008-10-17 17:44 alexbk Комментарий добавлен: 0000479
2008-10-17 17:44 alexbk Отслеживать: alexbk
2008-10-17 17:54 alexbk Комментарий изменен: 0000479
2008-10-17 17:57 heston_james Комментарий добавлен: 0000480
2008-10-17 17:58 heston_james Комментарий изменен: 0000480
2008-10-17 19:28 skirsdeda Комментарий добавлен: 0000482


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker